docker-compose.yml (3764B)
1 # deploy/docker-compose.yml - a conductor and one worker 2 # 3 # docker compose -f deploy/docker-compose.yml up -d 4 # 5 # That pulls the published images. To run your own build of them instead, 6 # add the override next to it: 7 # 8 # docker compose -f deploy/docker-compose.yml \ 9 # -f deploy/docker-compose.build.yml up -d --build 10 # 11 # Out of the box this is sqlite on a volume with artifacts on disk, which 12 # is a perfectly reasonable way to run it. Postgres and MinIO are behind 13 # profiles; turn them on when you want them: 14 # 15 # docker compose --profile postgres --profile s3 up -d 16 # 17 # The administrator password is printed once in the conductor log on first 18 # start. Set CONDUCTOR_ADMIN_PASSWORD to choose it instead. 19 20 name: conductor 21 22 services: 23 conductor: 24 image: "${CONDUCTOR_IMAGE:-finwo/conductor:latest}" 25 restart: unless-stopped 26 ports: 27 - "${CONDUCTOR_PORT:-8080}:8080" 28 environment: 29 # Must match how the outside world reaches this, because workers are 30 # handed absolute callback URLs built from it. 31 CONDUCTOR_PUBLIC_URL: "${CONDUCTOR_PUBLIC_URL:-http://127.0.0.1:8080}" 32 # Without these two, sessions do not survive a restart and stored 33 # secrets are kept in the clear. Generate with: openssl rand -hex 32 34 CONDUCTOR_SESSION_SECRET: "${CONDUCTOR_SESSION_SECRET:-}" 35 CONDUCTOR_SECRET_KEY: "${CONDUCTOR_SECRET_KEY:-}" 36 CONDUCTOR_ADMIN_PASSWORD: "${CONDUCTOR_ADMIN_PASSWORD:-}" 37 CONDUCTOR_DATABASE_URL: "${CONDUCTOR_DATABASE_URL:-}" 38 CONDUCTOR_S3_ENDPOINT: "${CONDUCTOR_S3_ENDPOINT:-}" 39 CONDUCTOR_S3_BUCKET: "${CONDUCTOR_S3_BUCKET:-}" 40 CONDUCTOR_S3_ACCESS_KEY_ID: "${CONDUCTOR_S3_ACCESS_KEY_ID:-}" 41 CONDUCTOR_S3_SECRET_ACCESS_KEY: "${CONDUCTOR_S3_SECRET_ACCESS_KEY:-}" 42 volumes: 43 - conductor-data:/data 44 45 worker: 46 image: "${CONDUCTOR_WORKER_IMAGE:-finwo/conductor-worker:latest}" 47 restart: unless-stopped 48 depends_on: 49 - conductor 50 environment: 51 CONDUCTOR_URL: http://conductor:8080 52 CONDUCTOR_WORKER_NAME: "${CONDUCTOR_WORKER_NAME:-compose-worker}" 53 # Mint one with: docker compose exec conductor node src/admin-cli.js token:add compose-worker 54 CONDUCTOR_WORKER_TOKEN: "${CONDUCTOR_WORKER_TOKEN:?set CONDUCTOR_WORKER_TOKEN, see docs/deployment.md}" 55 CONDUCTOR_WORKER_ARCHES: "${CONDUCTOR_WORKER_ARCHES:-}" 56 CONDUCTOR_WORKER_CONCURRENCY: "${CONDUCTOR_WORKER_CONCURRENCY:-2}" 57 volumes: 58 # The socket, and nothing else. A job's tree is unpacked into its 59 # own container over this socket rather than shared from here, so 60 # the worker keeps no state and needs no volume of its own. 61 - /var/run/docker.sock:/var/run/docker.sock 62 63 postgres: 64 profiles: ["postgres"] 65 image: postgres:17-alpine 66 restart: unless-stopped 67 environment: 68 POSTGRES_USER: conductor 69 POSTGRES_PASSWORD: "${POSTGRES_PASSWORD:-conductor}" 70 POSTGRES_DB: conductor 71 volumes: 72 - conductor-postgres:/var/lib/postgresql/data 73 healthcheck: 74 test: ["CMD-SHELL", "pg_isready -U conductor"] 75 interval: 10s 76 timeout: 5s 77 retries: 5 78 79 # Set CONDUCTOR_S3_ENDPOINT=http://minio:9000 and the rest of the S3 80 # variables to have the conductor use this. 81 minio: 82 profiles: ["s3"] 83 image: quay.io/minio/minio:RELEASE.2025-09-07T16-13-09Z 84 restart: unless-stopped 85 command: server /data --console-address ":9001" 86 environment: 87 MINIO_ROOT_USER: "${MINIO_ROOT_USER:-conductor}" 88 MINIO_ROOT_PASSWORD: "${MINIO_ROOT_PASSWORD:-conductor-secret}" 89 ports: 90 - "${MINIO_PORT:-9000}:9000" 91 - "${MINIO_CONSOLE_PORT:-9001}:9001" 92 volumes: 93 - conductor-minio:/data 94 95 volumes: 96 conductor-data: 97 conductor-postgres: 98 conductor-minio: