app-store/apps/ghostfolio/docker-compose.yml

91 lines
3.1 KiB
YAML
Raw Permalink Normal View History

2023-08-13 14:28:56 +00:00
version: "3.9"
services:
ghostfolio:
2023-08-13 14:54:02 +00:00
container_name: ghostfolio
image: ghostfolio/ghostfolio:2.90.0
2023-08-13 14:28:56 +00:00
restart: unless-stopped
ports:
2023-08-13 15:08:46 +00:00
- ${APP_PORT}:3333
2023-08-13 14:28:56 +00:00
environment:
NODE_ENV: production
HOST: 0.0.0.0
PORT: 3333
ACCESS_TOKEN_SALT: $GHOSTFOLIO_ACCESS_TOKEN_SALT
2023-08-13 19:05:46 +00:00
DATABASE_URL: postgresql://ghostfolio:${GHOSTFOLIO_DB_PASSWORD}@ghostfolio-db:5432/ghostfolio?sslmode=prefer
2023-08-13 14:28:56 +00:00
JWT_SECRET_KEY: ${GHOSTFOLIO_JWT_SECRET_KEY}
POSTGRES_DB: ghostfolio
POSTGRES_USER: ghostfolio
POSTGRES_PASSWORD: ${GHOSTFOLIO_DB_PASSWORD}
REDIS_HOST: ghostfolio-redis
REDIS_PASSWORD: ${GHOSTFOLIO_REDIS_PASSWORD}
REDIS_PORT: 6379
networks:
- tipi_main_network
2023-08-13 15:08:46 +00:00
depends_on:
2023-08-13 19:24:46 +00:00
ghostfolio-db:
condition: service_healthy
ghostfolio-redis:
condition: service_healthy
2023-08-13 14:28:56 +00:00
labels:
# Main
traefik.enable: true
traefik.http.middlewares.ghostfolio-web-redirect.redirectscheme.scheme: https
traefik.http.services.ghostfolio.loadbalancer.server.port: 3333
# Web
traefik.http.routers.ghostfolio-insecure.rule: Host(`${APP_DOMAIN}`)
traefik.http.routers.ghostfolio-insecure.entrypoints: web
traefik.http.routers.ghostfolio-insecure.service: ghostfolio
traefik.http.routers.ghostfolio-insecure.middlewares: ghostfolio-web-redirect
# Websecure
traefik.http.routers.ghostfolio.rule: Host(`${APP_DOMAIN}`)
traefik.http.routers.ghostfolio.entrypoints: websecure
traefik.http.routers.ghostfolio.service: ghostfolio
traefik.http.routers.ghostfolio.tls.certresolver: myresolver
# Local domain
traefik.http.routers.ghostfolio-local-insecure.rule: Host(`ghostfolio.${LOCAL_DOMAIN}`)
traefik.http.routers.ghostfolio-local-insecure.entrypoints: web
traefik.http.routers.ghostfolio-local-insecure.service: ghostfolio
traefik.http.routers.ghostfolio-local-insecure.middlewares: ghostfolio-web-redirect
# Local domain secure
traefik.http.routers.ghostfolio-local.rule: Host(`ghostfolio.${LOCAL_DOMAIN}`)
traefik.http.routers.ghostfolio-local.entrypoints: websecure
traefik.http.routers.ghostfolio-local.service: ghostfolio
traefik.http.routers.ghostfolio-local.tls: true
2023-08-13 19:05:46 +00:00
ghostfolio-db:
container_name: ghostfolio-db
image: postgres:15.4-alpine
2023-08-13 15:00:18 +00:00
restart: unless-stopped
environment:
2023-08-13 14:28:56 +00:00
POSTGRES_DB: ghostfolio
POSTGRES_USER: ghostfolio
POSTGRES_PASSWORD: ${GHOSTFOLIO_DB_PASSWORD}
PGDATA: /var/lib/postgresql/data
2023-08-13 19:05:46 +00:00
healthcheck:
test: ["CMD", "pg_isready", "-d", "ghostfolio"]
interval: 10s
timeout: 5s
retries: 5
2023-08-13 14:28:56 +00:00
volumes:
2023-08-13 19:05:46 +00:00
- ${APP_DATA_DIR}/data/db:/var/lib/postgresql/data
2023-08-13 14:28:56 +00:00
networks:
- tipi_main_network
ghostfolio-redis:
2023-08-13 19:09:33 +00:00
container_name: ghostfolio-redis
image: redis:7-alpine
2023-08-13 14:28:56 +00:00
restart: unless-stopped
command: >
--requirepass ${GHOSTFOLIO_REDIS_PASSWORD}
2023-08-13 19:05:46 +00:00
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
2023-08-13 14:28:56 +00:00
volumes:
- ${APP_DATA_DIR}/data/redis:/data
networks:
- tipi_main_network