services: change-vol-ownership: image: ubuntu user: root restart: 'no' exclude_from_hc: true volumes: - 'server-local-data:/tmp/server-local-data' - 'docker-data:/tmp/docker-data' command: "bash -c \" chown -R 1000:1000 /tmp/server-local-data && chown -R 1000:1000 /tmp/docker-data && echo 'Volume ownership changed successfully'\"\n" server: image: 'twentycrm/twenty:${TWENTY_VERSION:-latest}' volumes: - 'server-local-data:/app/packages/twenty-server/.local-storage' - 'docker-data:/app/docker-data' environment: - SERVICE_FQDN_SERVER_3000 - NODE_PORT=3000 - 'PG_DATABASE_URL=postgres://postgres:$SERVICE_PASSWORD_POSTGRES@db:5432/default' - FRONTEND_URL=$SERVICE_FQDN_SERVER - SERVER_URL=$SERVICE_FQDN_SERVER - 'REDIS_URL=redis://redis:6379' - SIGN_IN_PREFILLED=true - 'STORAGE_TYPE=${STORAGE_TYPE:-local}' - 'STORAGE_S3_REGION=${STORAGE_S3_REGION}' - 'STORAGE_S3_NAME=${STORAGE_S3_NAME}' - 'STORAGE_S3_ENDPOINT=${STORAGE_S3_ENDPOINT}' - APP_SECRET=$SERVICE_BASE64_32_SECRET depends_on: change-vol-ownership: condition: service_completed_successfully db: condition: service_healthy healthcheck: test: 'curl --fail http://localhost:3000/healthz || exit 1' interval: 10s timeout: 5s retries: 30 start_period: 40s worker: image: 'twentycrm/twenty:${TWENTY_VERSION:-latest}' command: - yarn - 'worker:prod' volumes: - 'server-local-data:/app/packages/twenty-server/.local-storage' - 'docker-data:/app/docker-data' environment: - 'PG_DATABASE_URL=postgres://postgres:$SERVICE_PASSWORD_POSTGRES@db:5432/default' - SERVER_URL=$SERVICE_FQDN_SERVER - 'REDIS_URL=redis://redis:6379' - DISABLE_DB_MIGRATIONS=true - 'STORAGE_TYPE=${STORAGE_TYPE:-local}' - 'STORAGE_S3_REGION=${STORAGE_S3_REGION}' - 'STORAGE_S3_NAME=${STORAGE_S3_NAME}' - 'STORAGE_S3_ENDPOINT=${STORAGE_S3_ENDPOINT}' - APP_SECRET=$SERVICE_BASE64_32_SECRET - IS_SIGN_UP_DISABLED=true depends_on: db: condition: service_healthy server: condition: service_healthy db: image: 'postgres:16' volumes: - 'db-data:/var/lib/postgresql/data' environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=$SERVICE_PASSWORD_POSTGRES healthcheck: test: 'pg_isready -U postgres -h localhost -d default' interval: 5s timeout: 5s retries: 10 redis: image: redis volumes: - 'redis-data:/data' healthcheck: test: - CMD - redis-cli - ping interval: 5s timeout: 5s retries: 10 volumes: db-data: null redis-data: null server-local-data: null docker-data: null