mirror of
https://github.com/civitai/civitai.git
synced 2026-09-20 22:08:18 +08:00
a7b09fbefe
The `createbuckets` service in docker-compose.base.yml has been failing on
every local `docker compose up`, so the modelshare and images buckets are
never created. It uses two mc subcommands that no longer exist:
mc config host add -> mc alias set
mc policy set -> mc anonymous set
The image is unpinned (`minio/mc`), so this broke silently whenever upstream
dropped them. On mc RELEASE.2025-08-13T08-35-41Z the container exits 1 with:
mc: <ERROR> `config` is not a recognized command.
Because the entrypoint is a single `&&` chain, the first failure aborts it and
neither bucket is made. Nothing else in the stack reports a problem, so the
failure is easy to miss until something tries to use object storage.
Also add `--ignore-existing` to both `mc mb` calls. Without it the fix would
only work once: `mc mb` on an existing bucket exits 1 ("you already own it"),
which aborts the same `&&` chain, so the service would go back to failing on
the second and every subsequent `docker compose up`.
Verified against a running local MinIO:
- before: container exits 1, `mc ls` shows no buckets
- after: exits 0, both buckets created and set public
- re-run: exits 0 again (idempotent)
- control: `mc mb` on an existing bucket is rc=1 without the flag, rc=0 with it
148 lines
3.2 KiB
YAML
148 lines
3.2 KiB
YAML
services:
|
|
prisma-pit:
|
|
image: postgres:17
|
|
ports:
|
|
- "15433:5432"
|
|
environment:
|
|
- POSTGRES_PASSWORD=postgres
|
|
- POSTGRES_USER=modelshare
|
|
- POSTGRES_DB=postgres
|
|
volumes:
|
|
- prisma-pit:/var/lib/postgresql/data
|
|
restart: unless-stopped
|
|
|
|
db:
|
|
build:
|
|
context: containers/db
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "15432:5432"
|
|
environment:
|
|
- POSTGRES_PASSWORD=postgres
|
|
- POSTGRES_DB=civitai
|
|
volumes:
|
|
- db:/var/lib/postgresql/data
|
|
|
|
notification-db:
|
|
build:
|
|
context: containers/notification-db
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "15434:5432"
|
|
environment:
|
|
- POSTGRES_PASSWORD=postgres
|
|
- POSTGRES_DB=postgres
|
|
volumes:
|
|
- notification-db:/var/lib/postgresql/data
|
|
|
|
logical-db:
|
|
build:
|
|
context: containers/logical-db
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "15435:5432"
|
|
environment:
|
|
- POSTGRES_PASSWORD=postgres
|
|
- POSTGRES_DB=postgres
|
|
volumes:
|
|
- logical-db:/var/lib/postgresql/data
|
|
|
|
redis:
|
|
image: redis:7-bookworm
|
|
command: redis-server --requirepass "redis"
|
|
restart: unless-stopped
|
|
ports:
|
|
- "6379:6379"
|
|
volumes:
|
|
- redis:/data/redis
|
|
|
|
redis-sys:
|
|
image: redis:7-bookworm
|
|
command: redis-server --requirepass "redis"
|
|
restart: unless-stopped
|
|
ports:
|
|
- "6378:6379"
|
|
volumes:
|
|
- redis-sys:/data/redis
|
|
|
|
minio:
|
|
image: minio/minio
|
|
ports:
|
|
- "9000:9000"
|
|
- "9001:9001"
|
|
environment:
|
|
- MINIO_ROOT_USER=minioadmin
|
|
- MINIO_ROOT_PASSWORD=minioadmin
|
|
volumes:
|
|
- minio:/data/minio
|
|
command: minio server /data/minio --console-address ":9001"
|
|
restart: unless-stopped
|
|
|
|
meilisearch:
|
|
image: getmeili/meilisearch:v1.11
|
|
ports:
|
|
- "7700:7700"
|
|
environment:
|
|
- MEILI_MASTER_KEY=meilisearch
|
|
volumes:
|
|
- meilisearch:/meili_data/meilisearch
|
|
|
|
createbuckets:
|
|
image: minio/mc
|
|
depends_on:
|
|
- minio
|
|
entrypoint: >
|
|
/bin/sh -c "/usr/bin/mc alias set minio http://minio:9000 minioadmin minioadmin && /usr/bin/mc mb --ignore-existing minio/modelshare && /usr/bin/mc anonymous set public minio/modelshare && /usr/bin/mc mb --ignore-existing minio/images && /usr/bin/mc anonymous set public minio/images && exit 0"
|
|
|
|
maildev:
|
|
image: maildev/maildev
|
|
environment:
|
|
- MAILDEV_SMTP_PORT=1025
|
|
- MAILDEV_WEB_PORT=1080
|
|
ports:
|
|
- "1025:1025"
|
|
- "1080:1080"
|
|
restart: unless-stopped
|
|
|
|
clickhouse:
|
|
build:
|
|
context: containers/clickhouse
|
|
dockerfile: Dockerfile
|
|
ulimits:
|
|
nofile:
|
|
soft: 262144
|
|
hard: 262144
|
|
ports:
|
|
- "18123:8123"
|
|
- "19000:9000"
|
|
volumes:
|
|
- clickhouse:/var/lib/clickhouse
|
|
- clickhouse:/var/log/clickhouse-server
|
|
|
|
# ngrok:
|
|
# image: ngrok/ngrok:latest
|
|
# restart: unless-stopped
|
|
# command:
|
|
# - "start"
|
|
# - "--all"
|
|
# - "--config"
|
|
# - "/etc/ngrok.yml"
|
|
# volumes:
|
|
# - ./docker-init/ngrok/config.yaml:/etc/ngrok.yml
|
|
# ports:
|
|
# - "8080:8080"
|
|
# - "4040:4040"
|
|
# environment:
|
|
# NGROK_AUTHTOKEN: ${NGROK_AUTHTOKEN}
|
|
|
|
volumes:
|
|
prisma-pit:
|
|
db:
|
|
notification-db:
|
|
logical-db:
|
|
redis:
|
|
redis-sys:
|
|
minio:
|
|
meilisearch:
|
|
clickhouse:
|