2024-10-31 13:37:56 +01:00
|
|
|
name: ghostfolio
|
2021-04-13 21:53:58 +02:00
|
|
|
services:
|
2021-12-21 20:22:58 +01:00
|
|
|
ghostfolio:
|
2024-08-03 16:55:18 +02:00
|
|
|
image: docker.io/ghostfolio/ghostfolio:latest
|
2024-10-31 13:37:56 +01:00
|
|
|
container_name: gf-application
|
2024-04-02 21:26:14 +03:00
|
|
|
init: true
|
2024-08-03 16:55:18 +02:00
|
|
|
cap_drop:
|
|
|
|
- ALL
|
|
|
|
security_opt:
|
|
|
|
- no-new-privileges:true
|
2021-12-21 20:22:58 +01:00
|
|
|
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
|
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
|
2024-08-03 16:55:18 +02:00
|
|
|
|
2021-04-13 21:53:58 +02:00
|
|
|
postgres:
|
2024-08-03 16:55:18 +02:00
|
|
|
image: docker.io/library/postgres:15
|
2024-10-31 13:37:56 +01:00
|
|
|
container_name: gf-postgres
|
2024-08-03 16:55:18 +02:00
|
|
|
cap_drop:
|
|
|
|
- ALL
|
|
|
|
cap_add:
|
|
|
|
- CHOWN
|
|
|
|
- DAC_READ_SEARCH
|
|
|
|
- FOWNER
|
|
|
|
- SETGID
|
|
|
|
- SETUID
|
|
|
|
security_opt:
|
|
|
|
- no-new-privileges:true
|
2021-04-13 21:53:58 +02: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-04-13 21:53:58 +02:00
|
|
|
volumes:
|
|
|
|
- postgres:/var/lib/postgresql/data
|
2024-08-03 16:55:18 +02:00
|
|
|
|
2021-04-13 21:53:58 +02:00
|
|
|
redis:
|
2024-08-03 16:55:18 +02:00
|
|
|
image: docker.io/library/redis:alpine
|
2024-10-31 13:37:56 +01:00
|
|
|
container_name: gf-redis
|
2024-08-03 16:55:18 +02:00
|
|
|
user: '999:1000'
|
|
|
|
cap_drop:
|
|
|
|
- ALL
|
|
|
|
security_opt:
|
|
|
|
- no-new-privileges:true
|
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-10-22 10:52:23 -07: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-04-13 21:53:58 +02:00
|
|
|
|
|
|
|
volumes:
|
|
|
|
postgres:
|