From f31b83e84a222857ad36e4c9d3a6c1cc96d086f1 Mon Sep 17 00:00:00 2001 From: Sturdy <91910406+apollo-sturdy@users.noreply.github.com> Date: Wed, 31 Jan 2024 14:03:33 +0100 Subject: [PATCH] feat: add separate postgres instance to calcom --- apps/calcom/docker-compose.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/apps/calcom/docker-compose.yml b/apps/calcom/docker-compose.yml index 3a285201..2c16786d 100644 --- a/apps/calcom/docker-compose.yml +++ b/apps/calcom/docker-compose.yml @@ -10,9 +10,11 @@ services: - ${APP_PORT}:3000 networks: - tipi_main_network + depends_on: + - db-calcom environment: - - DATABASE_HOST=${POSTGRES_HOST} - - DATABASE_URL=postgresql://${POSTGRES_USERNAME}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}/calcom + - DATABASE_HOST=db-calcom + - DATABASE_URL=postgresql://${POSTGRES_USERNAME}:${POSTGRES_PASSWORD}@db-calcom/calcom - POSTGRES_USER=${POSTGRES_USERNAME} - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} - POSTGRES_DB=calcom @@ -55,3 +57,16 @@ services: traefik.http.routers.calcom-local.entrypoints: websecure traefik.http.routers.calcom-local.service: calcom traefik.http.routers.calcom-local.tls: true + + db-calcom: + container_name: db-calcom + image: postgres:16.1 + restart: on-failure + volumes: + - ${APP_DATA_DIR}/data/db:/var/lib/postgresql/data + environment: + - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} + - POSTGRES_USER=${POSTGRES_USERNAME} + - POSTGRES_DB=calcom + networks: + - tipi_main_network