2024-03-29 17:25:41 +03:00
|
|
|
version: "3.9"
|
2024-03-22 11:16:39 +03:00
|
|
|
name: twenty
|
|
|
|
|
|
|
|
services:
|
2024-06-12 22:17:31 +03:00
|
|
|
change-vol-ownership:
|
|
|
|
image: ubuntu
|
|
|
|
user: root
|
|
|
|
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"
|
|
|
|
|
2024-03-22 11:16:39 +03:00
|
|
|
server:
|
|
|
|
image: twentycrm/twenty:${TAG}
|
|
|
|
volumes:
|
2024-06-12 22:17:31 +03:00
|
|
|
- server-local-data:/app/packages/twenty-server/${STORAGE_LOCAL_PATH:-.local-storage}
|
|
|
|
- docker-data:/app/docker-data
|
2024-03-22 11:16:39 +03:00
|
|
|
ports:
|
|
|
|
- "3000:3000"
|
|
|
|
environment:
|
|
|
|
PORT: 3000
|
2024-11-15 11:38:30 +03:00
|
|
|
PG_DATABASE_URL: postgres://${PGUSER_SUPERUSER:-postgres}:${PGPASSWORD_SUPERUSER:-twenty}@${PG_DATABASE_HOST:-db:5432}/default
|
2024-03-22 11:16:39 +03:00
|
|
|
SERVER_URL: ${SERVER_URL}
|
|
|
|
FRONT_BASE_URL: ${FRONT_BASE_URL:-$SERVER_URL}
|
2024-11-15 11:38:30 +03:00
|
|
|
REDIS_URL: ${REDIS_URL:-redis://redis:6379}
|
2024-03-22 11:16:39 +03:00
|
|
|
|
2024-03-29 17:25:41 +03:00
|
|
|
ENABLE_DB_MIGRATIONS: "true"
|
2024-03-22 11:16:39 +03:00
|
|
|
|
|
|
|
SIGN_IN_PREFILLED: ${SIGN_IN_PREFILLED}
|
2024-03-27 23:28:03 +03:00
|
|
|
STORAGE_TYPE: ${STORAGE_TYPE}
|
|
|
|
STORAGE_S3_REGION: ${STORAGE_S3_REGION}
|
|
|
|
STORAGE_S3_NAME: ${STORAGE_S3_NAME}
|
|
|
|
STORAGE_S3_ENDPOINT: ${STORAGE_S3_ENDPOINT}
|
2024-09-27 20:10:26 +03:00
|
|
|
|
2024-10-30 14:07:11 +03:00
|
|
|
APP_SECRET: ${APP_SECRET}
|
2024-03-22 11:16:39 +03:00
|
|
|
depends_on:
|
2024-06-12 22:17:31 +03:00
|
|
|
change-vol-ownership:
|
|
|
|
condition: service_completed_successfully
|
2024-03-22 11:16:39 +03:00
|
|
|
db:
|
|
|
|
condition: service_healthy
|
|
|
|
healthcheck:
|
2024-03-27 23:28:03 +03:00
|
|
|
test: curl --fail http://localhost:3000/healthz
|
2024-03-22 11:16:39 +03:00
|
|
|
interval: 5s
|
|
|
|
timeout: 5s
|
|
|
|
retries: 10
|
|
|
|
restart: always
|
|
|
|
|
2024-05-31 14:29:58 +03:00
|
|
|
worker:
|
|
|
|
image: twentycrm/twenty:${TAG}
|
|
|
|
command: ["yarn", "worker:prod"]
|
|
|
|
environment:
|
2024-11-15 11:38:30 +03:00
|
|
|
PG_DATABASE_URL: postgres://${PGUSER_SUPERUSER:-postgres}:${PGPASSWORD_SUPERUSER:-twenty}@${PG_DATABASE_HOST:-db:5432}/default
|
2024-05-31 14:29:58 +03:00
|
|
|
SERVER_URL: ${SERVER_URL}
|
|
|
|
FRONT_BASE_URL: ${FRONT_BASE_URL:-$SERVER_URL}
|
2024-11-15 11:38:30 +03:00
|
|
|
REDIS_URL: ${REDIS_URL:-redis://redis:6379}
|
2024-05-31 14:29:58 +03:00
|
|
|
|
2024-06-12 22:17:31 +03:00
|
|
|
ENABLE_DB_MIGRATIONS: "false" # it already runs on the server
|
2024-05-31 14:29:58 +03:00
|
|
|
|
|
|
|
STORAGE_TYPE: ${STORAGE_TYPE}
|
|
|
|
STORAGE_S3_REGION: ${STORAGE_S3_REGION}
|
|
|
|
STORAGE_S3_NAME: ${STORAGE_S3_NAME}
|
|
|
|
STORAGE_S3_ENDPOINT: ${STORAGE_S3_ENDPOINT}
|
2024-09-27 20:10:26 +03:00
|
|
|
|
2024-10-30 14:07:11 +03:00
|
|
|
APP_SECRET: ${APP_SECRET}
|
2024-05-31 14:29:58 +03:00
|
|
|
depends_on:
|
|
|
|
db:
|
|
|
|
condition: service_healthy
|
2024-06-12 22:17:31 +03:00
|
|
|
server:
|
|
|
|
condition: service_healthy
|
2024-05-31 14:29:58 +03:00
|
|
|
restart: always
|
|
|
|
|
2024-03-22 11:16:39 +03:00
|
|
|
db:
|
2024-11-15 11:38:30 +03:00
|
|
|
image: twentycrm/twenty-postgres-spilo:${TAG}
|
2024-03-22 11:16:39 +03:00
|
|
|
volumes:
|
2024-11-15 11:38:30 +03:00
|
|
|
- db-data:/home/postgres/pgdata
|
2024-03-22 11:16:39 +03:00
|
|
|
environment:
|
2024-11-15 11:38:30 +03:00
|
|
|
PGUSER_SUPERUSER: ${PGUSER_SUPERUSER:-postgres}
|
|
|
|
PGPASSWORD_SUPERUSER: ${PGPASSWORD_SUPERUSER:-twenty}
|
|
|
|
ALLOW_NOSSL: "true"
|
|
|
|
SPILO_PROVIDER: "local"
|
2024-03-22 11:16:39 +03:00
|
|
|
healthcheck:
|
2024-11-15 11:38:30 +03:00
|
|
|
test: pg_isready -U ${PGUSER_SUPERUSER:-postgres} -h localhost -d postgres
|
2024-03-22 11:16:39 +03:00
|
|
|
interval: 5s
|
|
|
|
timeout: 5s
|
|
|
|
retries: 10
|
|
|
|
restart: always
|
|
|
|
|
2024-09-27 20:10:26 +03:00
|
|
|
redis:
|
|
|
|
image: redis
|
|
|
|
ports:
|
|
|
|
- "6379:6379"
|
|
|
|
restart: always
|
|
|
|
|
2024-03-22 11:16:39 +03:00
|
|
|
volumes:
|
2024-06-12 22:17:31 +03:00
|
|
|
docker-data:
|
2024-03-22 11:16:39 +03:00
|
|
|
db-data:
|
|
|
|
server-local-data:
|