docker-compose.yml•2.83 kB
networks:
traefik:
external: true
ambienz-network:
external: true
ambienz-twenty:
name: ambienz-twenty
external: false
volumes:
ambienz-twenty-storage:
name: ambienz-twenty-storage
ambienz-twenty-mcp-data:
name: ambienz-twenty-mcp-data
services:
ambienz-twenty-server:
image: twentycrm/twenty:latest
container_name: ambienz-twenty-server
restart: always
volumes:
- ambienz-twenty-storage:/app/packages/twenty-server/.local-storage
environment:
NODE_PORT: 3000
PG_DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/twenty
SERVER_URL: ${TWENTY_SERVER_URL}
REDIS_URL: redis://${REDIS_HOST}:${REDIS_PORT}/${REDIS_DB}
STORAGE_TYPE: ${TWENTY_STORAGE_TYPE}
APP_SECRET: ${TWENTY_APP_SECRET}
healthcheck:
test: curl --fail http://localhost:3000/healthz
interval: 5s
timeout: 5s
retries: 20
networks:
- traefik
- ambienz-network
- ambienz-twenty
labels:
- traefik.enable=true
- traefik.http.routers.ambienz-twenty-server.rule=Host(`${TWENTY_DOMAIN}`)
- traefik.http.routers.ambienz-twenty-server.entrypoints=websecure
- traefik.http.routers.ambienz-twenty-server.tls.certresolver=letsencrypt
- traefik.http.routers.ambienz-twenty-server.service=ambienz-twenty-server
- traefik.http.services.ambienz-twenty-server.loadbalancer.server.port=3000
ambienz-twenty-worker:
image: twentycrm/twenty:latest
container_name: ambienz-twenty-worker
restart: always
command: ["yarn", "worker:prod"]
volumes:
- ambienz-twenty-storage:/app/packages/twenty-server/.local-storage
environment:
PG_DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/twenty
SERVER_URL: ${TWENTY_SERVER_URL}
REDIS_URL: redis://${REDIS_HOST}:${REDIS_PORT}/${REDIS_DB}
DISABLE_DB_MIGRATIONS: "true"
DISABLE_CRON_JOBS_REGISTRATION: "true"
STORAGE_TYPE: ${TWENTY_STORAGE_TYPE}
APP_SECRET: ${TWENTY_APP_SECRET}
depends_on:
ambienz-twenty-server:
condition: service_healthy
networks:
- ambienz-network
- ambienz-twenty
ambienz-twenty-mcp-server:
build:
context: ./
dockerfile: Dockerfile
container_name: ambienz-twenty-mcp-server
restart: always
environment:
PORT: 3001
TWENTY_API_KEY: ${TWENTY_MCP_API_KEY}
TWENTY_BASE_URL: ${TWENTY_MCP_BASE_URL}
ports:
- "3001:3001"
networks:
- ambienz-network
- ambienz-twenty
depends_on:
ambienz-twenty-server:
condition: service_healthy
healthcheck:
test: curl --fail http://localhost:3001/ || exit 1
interval: 30s
timeout: 10s
retries: 3