2023-09-07 20:44:52 +02:00
|
|
|
version: '3.9'
|
2021-10-30 12:54:14 -04:00
|
|
|
services:
|
2021-12-21 20:22:58 +01:00
|
|
|
ghostfolio:
|
|
|
|
build: ../
|
|
|
|
env_file:
|
|
|
|
- ../.env
|
|
|
|
environment:
|
2023-05-18 12:02:07 +02:00
|
|
|
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}?connect_timeout=300&sslmode=prefer
|
2022-09-15 17:20:03 +02:00
|
|
|
NODE_ENV: production
|
2023-09-07 20:44:52 +02:00
|
|
|
REDIS_HOST: redis
|
2022-05-29 07:18:57 -05:00
|
|
|
REDIS_PASSWORD: ${REDIS_PASSWORD}
|
2021-12-21 20:22:58 +01:00
|
|
|
ports:
|
|
|
|
- 3333:3333
|
2023-05-08 20:13:45 +02:00
|
|
|
depends_on:
|
|
|
|
postgres:
|
|
|
|
condition: service_healthy
|
|
|
|
redis:
|
|
|
|
condition: service_healthy
|
2024-01-21 11:48:32 +01:00
|
|
|
healthcheck:
|
|
|
|
test: ['CMD-SHELL', 'curl -f http://localhost:3333/api/v1/health']
|
|
|
|
interval: 10s
|
|
|
|
timeout: 5s
|
|
|
|
retries: 5
|
2021-10-30 12:54:14 -04:00
|
|
|
postgres:
|
2023-09-17 06:52:41 +02:00
|
|
|
image: postgres:15
|
2021-10-30 12:54:14 -04:00
|
|
|
env_file:
|
|
|
|
- ../.env
|
2023-05-08 20:13:45 +02:00
|
|
|
healthcheck:
|
|
|
|
test: ['CMD-SHELL', 'pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}']
|
|
|
|
interval: 10s
|
|
|
|
timeout: 5s
|
|
|
|
retries: 5
|
2021-10-30 12:54:14 -04:00
|
|
|
volumes:
|
|
|
|
- postgres:/var/lib/postgresql/data
|
|
|
|
redis:
|
2023-09-07 20:44:52 +02:00
|
|
|
image: redis:alpine
|
2024-01-04 20:14:45 +01:00
|
|
|
env_file:
|
|
|
|
- ../.env
|
|
|
|
command: ['redis-server', '--requirepass', $REDIS_PASSWORD]
|
2023-05-08 20:13:45 +02:00
|
|
|
healthcheck:
|
2024-01-04 20:14:45 +01:00
|
|
|
test: ['CMD-SHELL', 'redis-cli --pass $REDIS_PASSWORD ping | grep PONG']
|
2023-05-08 20:13:45 +02:00
|
|
|
interval: 10s
|
|
|
|
timeout: 5s
|
|
|
|
retries: 5
|
2021-10-30 12:54:14 -04:00
|
|
|
|
|
|
|
volumes:
|
|
|
|
postgres:
|