2023-08-13 14:28:56 +00:00
|
|
|
version: "3.9"
|
|
|
|
|
|
|
|
services:
|
|
|
|
ghostfolio:
|
2023-08-13 14:54:02 +00:00
|
|
|
container_name: ghostfolio
|
2023-08-13 14:28:56 +00:00
|
|
|
image: ghostfolio/ghostfolio:1.300.0
|
|
|
|
restart: unless-stopped
|
|
|
|
ports:
|
|
|
|
- ${APP_PORT}:8080
|
|
|
|
environment:
|
|
|
|
NODE_ENV: production
|
|
|
|
HOST: 0.0.0.0
|
|
|
|
PORT: 3333
|
|
|
|
ACCESS_TOKEN_SALT: $GHOSTFOLIO_ACCESS_TOKEN_SALT
|
|
|
|
DATABASE_URL: postgresql://ghostfolio:${GHOSTFOLIO_DB_PASSWORD}@ghostfolio-postgres:5432/ghostfolio?sslmode=prefer
|
|
|
|
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
|
|
|
|
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
|
|
|
|
|
|
|
|
ghostfolio-postgres:
|
2023-08-13 14:54:02 +00:00
|
|
|
container_name: ghostfolio-postgres
|
2023-08-13 14:58:48 +00:00
|
|
|
image: postgres:14
|
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
|
|
|
|
volumes:
|
|
|
|
- ${APP_DATA_DIR}/data/postgres:/var/lib/postgresql/data
|
|
|
|
networks:
|
|
|
|
- tipi_main_network
|
|
|
|
|
|
|
|
ghostfolio-redis:
|
2023-08-13 14:54:02 +00:00
|
|
|
container_name: ghostfolio-redis
|
2023-08-13 14:58:48 +00:00
|
|
|
image: redis:6.2
|
2023-08-13 14:28:56 +00:00
|
|
|
restart: unless-stopped
|
|
|
|
command: >
|
|
|
|
--requirepass ${GHOSTFOLIO_REDIS_PASSWORD}
|
|
|
|
volumes:
|
|
|
|
- ${APP_DATA_DIR}/data/redis:/data
|
|
|
|
networks:
|
|
|
|
- tipi_main_network
|