Files
templates/blueprints/twenty/docker-compose.yml
Vincent Vu d155f2f1f6 feat(blueprints): n8n + worker/runner + redis/postgres + ollama & fix(blueprints): twentycrm (#364)
* feat(n8n): add n8n runner with Postgres and Ollama configuration

* feat(meta): update n8n runner version to nightly and enhance description

* feat(docker): update PostgreSQL image to 17-alpine and enhance healthcheck command

* feat(n8n): update environment variables and enhance configuration for Redis and Ollama integration

* feat(n8n): replace hardcoded N8N_PROXY_HOPS with environment variable and fix encryption key variable name

* feat(n8n): comment out SMTP environment variables in docker-compose.yml

* feat(n8n): set default value for N8N_PROXY_HOPS environment variable

* Update blueprints/n8n-runner-postgres-ollama/docker-compose.yml

* Update blueprints/n8n-runner-postgres-ollama/docker-compose.yml

* Update blueprints/n8n-runner-postgres-ollama/docker-compose.yml

* Update blueprints/n8n-runner-postgres-ollama/docker-compose.yml

* Update blueprints/n8n-runner-postgres-ollama/docker-compose.yml

* feat(twenty): update HTTP protocol handling in environment variables and enhance healthcheck configuration

* refactor(docker-compose): remove container names for n8n services

---------

Co-authored-by: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
2025-10-25 18:32:26 -06:00

100 lines
2.6 KiB
YAML

services:
twenty-change-vol-ownership:
image: ubuntu
user: root
volumes:
- twenty-server-local-data:/tmp/server-local-data
- twenty-docker-data:/tmp/docker-data
command: >
bash -c "
chown -R 1000:1000 /tmp/server-local-data
&& chown -R 1000:1000 /tmp/docker-data"
twenty-server:
image: twentycrm/twenty:latest
volumes:
- twenty-server-local-data:/app/packages/twenty-server/${STORAGE_LOCAL_PATH:-.local-storage}
- twenty-docker-data:/app/docker-data
environment:
PORT: 3000
SERVER_URL: ${HTTP_PROTOCOL}://${TWENTY_HOST}
FRONT_BASE_URL: ${HTTP_PROTOCOL}://${TWENTY_HOST}
PG_DATABASE_URL: postgres://${DB_USER}:${DB_PASSWORD}@twenty-postgres:5432/twenty
ENABLE_DB_MIGRATIONS: "true"
REDIS_URL: redis://twenty-redis:6379
IS_SIGN_UP_DISABLED: ${IS_SIGN_UP_DISABLED:-false}
SIGN_IN_PREFILLED: "false"
IS_CONFIG_VARIABLES_IN_DB_ENABLED: "true"
STORAGE_TYPE: local
APP_SECRET: ${APP_SECRET}
depends_on:
twenty-change-vol-ownership:
condition: service_completed_successfully
twenty-postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:3000/healthz"]
interval: 5s
timeout: 5s
retries: 30
start_period: 30s
restart: always
twenty-worker:
image: twentycrm/twenty:latest
command: ["yarn", "worker:prod"]
environment:
PG_DATABASE_URL: postgres://${DB_USER}:${DB_PASSWORD}@twenty-postgres:5432/twenty
SERVER_URL: ${HTTP_PROTOCOL}://${TWENTY_HOST}
FRONT_BASE_URL: ${HTTP_PROTOCOL}://${TWENTY_HOST}
REDIS_URL: redis://twenty-redis:6379
ENABLE_DB_MIGRATIONS: "false"
STORAGE_TYPE: local
APP_SECRET: ${APP_SECRET}
depends_on:
twenty-postgres:
condition: service_healthy
twenty-server:
condition: service_healthy
restart: always
twenty-postgres:
image: postgres:17-alpine
volumes:
- twenty-postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: twenty
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d twenty"]
interval: 5s
timeout: 5s
retries: 10
restart: always
twenty-redis:
image: redis:latest
volumes:
- twenty-redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 10
restart: always
volumes:
twenty-docker-data:
twenty-postgres-data:
twenty-server-local-data:
twenty-redis-data: