Files
image2api/docker-compose.yml
T
chiyiandDevin 5226e11cfc docs: 清理 OpenAI 时代残留,文档改述 vivid 协议 + 渠道架构
- README/README.en 重写:同构网关 + vivid 四端点 + 渠道同步/调度,
  明确不支持 OpenAI 协议上游;移除账号池/七大平台/OpenAI 兼容描述
- backend/frontend README、.env.example 更新(补 RUSTFS/COOKIE_SECURE/
  CHANNEL_SECRET)
- docker-compose 增加 CHANNEL_SECRET(渠道 key AES-GCM 密钥)
- 清掉代码注释/文档示例里的 OpenAI/gpt-image-2 残留

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-10-19 01:43:24 +08:00

130 lines
3.9 KiB
YAML

services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_DB: vivid_ai
POSTGRES_USER: postgres
POSTGRES_PASSWORD: change-me-postgres
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test:
- CMD-SHELL
- pg_isready -U postgres -d vivid_ai
interval: 5s
timeout: 5s
retries: 10
restart: unless-stopped
labels: []
redis:
image: redis:7-alpine
command:
- redis-server
- --appendonly
- yes
volumes:
- redisdata:/data
healthcheck:
test:
- CMD
- redis-cli
- ping
interval: 5s
timeout: 5s
retries: 10
restart: unless-stopped
labels: []
rustfs:
image: rustfs/rustfs:latest
environment:
RUSTFS_ACCESS_KEY: vividai
RUSTFS_SECRET_KEY: vividai-secret-change-me
RUSTFS_ADDRESS: :9000
RUSTFS_VOLUMES: /data
volumes:
- rustfsdata:/data
restart: unless-stopped
labels: []
createbucket:
image: quay.io/minio/mc:latest
depends_on:
- rustfs
entrypoint: |
/bin/sh -c " until mc alias set s3 http://rustfs:9000 vividai vividai-secret-change-me; do
echo 'waiting for rustfs...'; sleep 2;
done; mc mb -p s3/vivid-ai || true; echo 'bucket ready'; "
restart: no
labels: []
backend:
build:
context: ./backend
environment:
APP_ENV: production
APP_TITLE: image2api
HTTP_ADDR: 0.0.0.0:6666
POSTGRES_DSN: host=postgres user=postgres password=change-me-postgres dbname=vivid_ai port=5432 sslmode=disable TimeZone=Asia/Shanghai
REDIS_ADDR: redis:6379
REDIS_PASSWORD: ""
REDIS_DB: "0"
RUSTFS_ENDPOINT: http://rustfs:9000
RUSTFS_BUCKET: vivid-ai
RUSTFS_ACCESS_KEY: vividai
RUSTFS_SECRET_KEY: vividai-secret-change-me
CORS_ORIGINS: http://localhost:2000
COOKIE_SECURE: "false"
# 渠道上游 API Key 的 AES-GCM 加密密钥——生产环境务必改成随机值并保持不变
CHANNEL_SECRET: change-me-channel-secret
volumes:
- generated:/app/data/generated
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
createbucket:
condition: service_completed_successfully
healthcheck:
test:
- CMD
- wget
- -qO-
- http://127.0.0.1:6666/health
interval: 10s
timeout: 5s
retries: 10
restart: unless-stopped
labels: []
web:
build:
context: ./frontend
ports:
- 2000:2000
depends_on:
- backend
restart: unless-stopped
labels:
- traefik.docker.network=dokploy-network
- traefik.http.routers.image2api-image2api-2lszlu-8-web.rule=Host(`image.cyi.cc`)
- traefik.http.routers.image2api-image2api-2lszlu-8-web.entrypoints=web
- traefik.http.services.image2api-image2api-2lszlu-8-web.loadbalancer.server.port=2000
- traefik.http.routers.image2api-image2api-2lszlu-8-web.service=image2api-image2api-2lszlu-8-web
- traefik.http.routers.image2api-image2api-2lszlu-8-web.middlewares=redirect-to-https@file
- traefik.http.routers.image2api-image2api-2lszlu-8-websecure.rule=Host(`image.cyi.cc`)
- traefik.http.routers.image2api-image2api-2lszlu-8-websecure.entrypoints=websecure
- traefik.http.services.image2api-image2api-2lszlu-8-websecure.loadbalancer.server.port=2000
- traefik.http.routers.image2api-image2api-2lszlu-8-websecure.service=image2api-image2api-2lszlu-8-websecure
- traefik.http.routers.image2api-image2api-2lszlu-8-websecure.tls=true
- traefik.http.routers.image2api-image2api-2lszlu-8-websecure.tls.certresolver=letsencrypt
- traefik.enable=true
networks:
- default
- dokploy-network
volumes:
pgdata: null
redisdata: null
rustfsdata: null
generated: null
networks:
dokploy-network:
external: true