# Cap on exe.dev: https://exe.dev/deploy/cap # Based on Cap's own docker-compose.yml, with images pinned by digest, # secrets from .env, data on the VM's disk, and ports on localhost only # (nginx on port 8000 is the way in). name: cap services: cap-web: # The "latest" build of Nov 16 2026 (commit f415c09) image: ghcr.io/capsoftware/cap-web:latest@sha256:b93679f183fa5ce417e03d0b59dd9bdf094d5491cacf291dbada3fc024b82718 restart: unless-stopped depends_on: mysql: condition: service_healthy minio: condition: service_healthy env_file: .env environment: DATABASE_URL: mysql://cap:${MYSQL_PASSWORD}@mysql:3306/cap WEB_URL: ${CAP_URL} NEXTAUTH_URL: ${CAP_URL} CAP_AWS_ACCESS_KEY: ${MINIO_ROOT_USER} CAP_AWS_SECRET_KEY: ${MINIO_ROOT_PASSWORD} CAP_AWS_BUCKET: cap CAP_AWS_REGION: us-east-1 S3_PUBLIC_ENDPOINT: ${CAP_URL} S3_INTERNAL_ENDPOINT: http://minio:9000 S3_PATH_STYLE: "true" MEDIA_SERVER_URL: http://media-server:3456 MEDIA_SERVER_WEBHOOK_URL: http://cap-web:3000 ports: - "127.0.0.1:3000:3000" healthcheck: test: ["CMD", "wget", "-q", "-O", "/dev/null", "http://127.0.0.1:3000/"] interval: 30s timeout: 10s retries: 3 start_period: 60s media-server: image: ghcr.io/capsoftware/cap-media-server:latest@sha256:f510bd041e7cc3cb4fcb2f89bef76967639f4e6af714553d439927f818ac76d8 restart: unless-stopped environment: PORT: 3456 MEDIA_SERVER_WEBHOOK_SECRET: ${MEDIA_SERVER_WEBHOOK_SECRET} healthcheck: test: ["CMD", "bun", "-e", "fetch('http://127.0.0.1:3456/health').then((r) => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1))"] interval: 30s timeout: 10s retries: 3 start_period: 10s mysql: image: mysql:8.0 restart: unless-stopped environment: MYSQL_DATABASE: cap MYSQL_USER: cap MYSQL_PASSWORD: ${MYSQL_PASSWORD} MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD} command: - --max_connections=1000 - --character-set-server=utf8mb4 - --collation-server=utf8mb4_unicode_ci volumes: - ./mysql:/var/lib/mysql healthcheck: test: ["CMD-SHELL", "mysqladmin ping -h 127.0.0.1 -u cap -p\"$$MYSQL_PASSWORD\""] interval: 10s timeout: 5s retries: 10 start_period: 30s minio: image: pgsty/minio:RELEASE.2026-08-04T00-00-00Z@sha256:b6bfe7239bfc83fb90d31612d9704d86039dd714f7904b3f1ad68f211e602372 restart: unless-stopped command: server /data --console-address ":9001" environment: MINIO_ROOT_USER: ${MINIO_ROOT_USER} MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD} ports: - "127.0.0.1:9000:9000" # MinIO's console, at https://.exe.xyz:9001/ (always private) - "9001:9001" volumes: - ./minio:/data healthcheck: test: ["CMD", "mc", "ready", "local"] interval: 30s timeout: 10s retries: 3 start_period: 10s # mc, MinIO's client, for one-off jobs: making the bucket, backups. # Not started by "up"; run it with "docker compose run --rm mc ...". mc: image: pgsty/mc:RELEASE.2026-09-16T00-00-00Z@sha256:cfc83108c3abb371f8fb84d99c1fdc88f8c237e022409b0081fb7c0a3be634dd profiles: [tools] depends_on: minio: condition: service_healthy environment: MC_HOST_local: http://${MINIO_ROOT_USER}:${MINIO_ROOT_PASSWORD}@minio:9000 MC_CONFIG_DIR: /tmp/mc