fix: use quay.io/minio/mc (minio/mc unavailable on Docker Hub)

This commit is contained in:
dokploy-bot
2026-09-19 14:51:05 +02:00
parent 4fb7fc9204
commit be23e9fe77
+33 -41
View File
@@ -1,10 +1,3 @@
# image2api — one-command stack: PostgreSQL + Redis + RustFS (S3) + backend
# (built from source) + frontend/nginx (HTTP only on port 2000). Self-contained:
# docker compose up -d --build
# No .env needed — all values are inline below. TLS + domain are handled by YOUR
# OWN reverse proxy in front of the web container (host port 2000).
# ⚠ Before exposing to production, change the passwords/keys (POSTGRES_PASSWORD,
# RUSTFS_ACCESS_KEY/SECRET_KEY) and set CORS_ORIGINS to your real site origin.
services: services:
postgres: postgres:
image: postgres:16-alpine image: postgres:16-alpine
@@ -15,54 +8,53 @@ services:
volumes: volumes:
- pgdata:/var/lib/postgresql/data - pgdata:/var/lib/postgresql/data
healthcheck: healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d vivid_ai"] test:
- CMD-SHELL
- pg_isready -U postgres -d vivid_ai
interval: 5s interval: 5s
timeout: 5s timeout: 5s
retries: 10 retries: 10
restart: unless-stopped restart: unless-stopped
labels: []
redis: redis:
image: redis:7-alpine image: redis:7-alpine
command: ["redis-server", "--appendonly", "yes"] command:
- redis-server
- --appendonly
- yes
volumes: volumes:
- redisdata:/data - redisdata:/data
healthcheck: healthcheck:
test: ["CMD", "redis-cli", "ping"] test:
- CMD
- redis-cli
- ping
interval: 5s interval: 5s
timeout: 5s timeout: 5s
retries: 10 retries: 10
restart: unless-stopped restart: unless-stopped
labels: []
# RustFS — S3-compatible object storage. The backend talks plain S3 (v4-signed)
# on port 9000. Media is served (cookie-authed) via the backend's /images
# proxy, so the bucket stays private.
rustfs: rustfs:
image: rustfs/rustfs:latest image: rustfs/rustfs:latest
environment: environment:
RUSTFS_ACCESS_KEY: vividai RUSTFS_ACCESS_KEY: vividai
RUSTFS_SECRET_KEY: vividai-secret-change-me RUSTFS_SECRET_KEY: vividai-secret-change-me
RUSTFS_ADDRESS: ":9000" RUSTFS_ADDRESS: :9000
RUSTFS_VOLUMES: /data RUSTFS_VOLUMES: /data
volumes: volumes:
- rustfsdata:/data - rustfsdata:/data
restart: unless-stopped restart: unless-stopped
labels: []
# One-shot: wait for RustFS, create the bucket, then exit. mc (the MinIO client)
# speaks S3 so it works against RustFS too.
createbucket: createbucket:
image: minio/mc:latest image: quay.io/minio/mc:latest
depends_on: depends_on:
- rustfs - rustfs
entrypoint: > entrypoint: |
/bin/sh -c " /bin/sh -c " until mc alias set s3 http://rustfs:9000 vividai vividai-secret-change-me; do
until mc alias set s3 http://rustfs:9000 vividai vividai-secret-change-me; do
echo 'waiting for rustfs...'; sleep 2; echo 'waiting for rustfs...'; sleep 2;
done; done; mc mb -p s3/vivid-ai || true; echo 'bucket ready'; "
mc mb -p s3/vivid-ai || true; restart: no
echo 'bucket ready'; labels: []
"
restart: "no"
backend: backend:
build: build:
context: ./backend context: ./backend
@@ -78,9 +70,7 @@ services:
RUSTFS_BUCKET: vivid-ai RUSTFS_BUCKET: vivid-ai
RUSTFS_ACCESS_KEY: vividai RUSTFS_ACCESS_KEY: vividai
RUSTFS_SECRET_KEY: vividai-secret-change-me RUSTFS_SECRET_KEY: vividai-secret-change-me
# Set to the URL your reverse proxy serves the site on (comma-separated).
CORS_ORIGINS: http://localhost:2000 CORS_ORIGINS: http://localhost:2000
# true only if your reverse proxy serves HTTPS; false for plain HTTP.
COOKIE_SECURE: "false" COOKIE_SECURE: "false"
volumes: volumes:
- generated:/app/data/generated - generated:/app/data/generated
@@ -92,25 +82,27 @@ services:
createbucket: createbucket:
condition: service_completed_successfully condition: service_completed_successfully
healthcheck: healthcheck:
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:6666/health"] test:
- CMD
- wget
- -qO-
- http://127.0.0.1:6666/health
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 10 retries: 10
restart: unless-stopped restart: unless-stopped
labels: []
web: web:
build: build:
context: ./frontend context: ./frontend
# nginx serves the SPA + proxies the API on container port 2000 (HTTP only).
# Point your own reverse proxy at host:2000.
ports: ports:
- "2000:2000" - 2000:2000
depends_on: depends_on:
- backend - backend
restart: unless-stopped restart: unless-stopped
labels: []
volumes: volumes:
pgdata: pgdata: null
redisdata: redisdata: null
rustfsdata: rustfsdata: null
generated: generated: null