docker-compose.yml (4221B)
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, every access token stops verifying at restart 33 # and stored secrets are kept in the clear. 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 # localhost and 127.0.0.1 are different origins, and only registered 38 # ones may be signed in from. Defaults to public_url alone. 39 CONDUCTOR_LOCAL_REDIRECT_URIS: "${CONDUCTOR_LOCAL_REDIRECT_URIS:-http://127.0.0.1:8080,http://localhost:8080}" 40 CONDUCTOR_OIDC_DISCOVERY_URL: "${CONDUCTOR_OIDC_DISCOVERY_URL:-}" 41 CONDUCTOR_OIDC_CLIENT_ID: "${CONDUCTOR_OIDC_CLIENT_ID:-}" 42 CONDUCTOR_OIDC_ADMIN_ROLE: "${CONDUCTOR_OIDC_ADMIN_ROLE:-}" 43 CONDUCTOR_DATABASE_URL: "${CONDUCTOR_DATABASE_URL:-}" 44 CONDUCTOR_S3_ENDPOINT: "${CONDUCTOR_S3_ENDPOINT:-}" 45 CONDUCTOR_S3_BUCKET: "${CONDUCTOR_S3_BUCKET:-}" 46 CONDUCTOR_S3_ACCESS_KEY_ID: "${CONDUCTOR_S3_ACCESS_KEY_ID:-}" 47 CONDUCTOR_S3_SECRET_ACCESS_KEY: "${CONDUCTOR_S3_SECRET_ACCESS_KEY:-}" 48 volumes: 49 - conductor-data:/data 50 51 worker: 52 image: "${CONDUCTOR_WORKER_IMAGE:-finwo/conductor-worker:latest}" 53 restart: unless-stopped 54 depends_on: 55 - conductor 56 environment: 57 CONDUCTOR_URL: http://conductor:8080 58 CONDUCTOR_WORKER_NAME: "${CONDUCTOR_WORKER_NAME:-compose-worker}" 59 # Mint one with: docker compose exec conductor node src/admin-cli.js token:add compose-worker 60 CONDUCTOR_WORKER_TOKEN: "${CONDUCTOR_WORKER_TOKEN:?set CONDUCTOR_WORKER_TOKEN, see docs/deployment.md}" 61 CONDUCTOR_WORKER_ARCHES: "${CONDUCTOR_WORKER_ARCHES:-}" 62 CONDUCTOR_WORKER_CONCURRENCY: "${CONDUCTOR_WORKER_CONCURRENCY:-2}" 63 volumes: 64 # The socket, and nothing else. A job's tree is unpacked into its 65 # own container over this socket rather than shared from here, so 66 # the worker keeps no state and needs no volume of its own. 67 - /var/run/docker.sock:/var/run/docker.sock 68 69 postgres: 70 profiles: ["postgres"] 71 image: postgres:17-alpine 72 restart: unless-stopped 73 environment: 74 POSTGRES_USER: conductor 75 POSTGRES_PASSWORD: "${POSTGRES_PASSWORD:-conductor}" 76 POSTGRES_DB: conductor 77 volumes: 78 - conductor-postgres:/var/lib/postgresql/data 79 healthcheck: 80 test: ["CMD-SHELL", "pg_isready -U conductor"] 81 interval: 10s 82 timeout: 5s 83 retries: 5 84 85 # Set CONDUCTOR_S3_ENDPOINT=http://minio:9000 and the rest of the S3 86 # variables to have the conductor use this. 87 minio: 88 profiles: ["s3"] 89 image: quay.io/minio/minio:RELEASE.2025-09-07T16-13-09Z 90 restart: unless-stopped 91 command: server /data --console-address ":9001" 92 environment: 93 MINIO_ROOT_USER: "${MINIO_ROOT_USER:-conductor}" 94 MINIO_ROOT_PASSWORD: "${MINIO_ROOT_PASSWORD:-conductor-secret}" 95 ports: 96 - "${MINIO_PORT:-9000}:9000" 97 - "${MINIO_CONSOLE_PORT:-9001}:9001" 98 volumes: 99 - conductor-minio:/data 100 101 volumes: 102 conductor-data: 103 conductor-postgres: 104 conductor-minio: