72 lines
2.1 KiB
YAML
72 lines
2.1 KiB
YAML
services:
|
|
gramps-db:
|
|
profiles: ["apps","all","gramps"]
|
|
image: postgres:13
|
|
container_name: gramps-db
|
|
restart: always
|
|
env_file:
|
|
- ${PROJECT_ROOT}/secrets/stack-secrets.env
|
|
environment:
|
|
POSTGRES_USER: ${GRAMPS_DB_USER}
|
|
POSTGRES_PASSWORD_FILE: /run/secrets/gramps_db_password
|
|
POSTGRES_DB: ${GRAMPS_DB_NAME}
|
|
secrets:
|
|
- gramps_db_password
|
|
volumes:
|
|
- ${PROJECT_ROOT}/apps/gramps/db:/var/lib/postgresql
|
|
networks:
|
|
- gramps
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -h gramps-db -p 5432 -U $$POSTGRES_USER -d $$POSTGRES_DB"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 12
|
|
start_period: 30s
|
|
|
|
grampsweb:
|
|
profiles: ["apps","all","gramps"]
|
|
image: ghcr.io/gramps-project/grampsweb:latest
|
|
container_name: gramps-web
|
|
depends_on:
|
|
- gramps-db
|
|
restart: always
|
|
env_file:
|
|
- ${PROJECT_ROOT}/secrets/stack-secrets.env
|
|
environment:
|
|
DB_URI: postgresql://${GRAMPS_DB_USER}:${GRAMPS_DB_PASSWORD}@gramps-db:5432/${GRAMPS_DB_NAME}
|
|
GRAMPSWEB_LOGLEVEL: INFO
|
|
INITIAL_ADMIN: ${GRAMPS_INITIAL_ADMIN}
|
|
INITIAL_ADMIN_PASSWORD: ${GRAMPS_INITIAL_ADMIN_PASSWORD}
|
|
GRAMPSWEB_MEDIAPATH: /app/media
|
|
GRAMPSWEB_TREE: "main"
|
|
volumes:
|
|
- ${PROJECT_ROOT}/apps/gramps/data/users:/app/users
|
|
- ${PROJECT_ROOT}/apps/gramps/data/media:/app/media
|
|
- ${PROJECT_ROOT}/apps/gramps/data/cache:/app/cache
|
|
labels:
|
|
- "traefik.http.routers.gramps.rule=Host(`familytree.lan.ddnsgeek.com`)"
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.gramps.entrypoints=websecure"
|
|
- "traefik.http.routers.gramps.tls.certresolver=myresolver"
|
|
- "io.portainer.accesscontrol.public"
|
|
- "traefik.http.services.gramps.loadbalancer.server.port=5000"
|
|
- "traefik.docker.network=core_traefik"
|
|
networks:
|
|
- traefik
|
|
- gramps
|
|
healthcheck:
|
|
test:
|
|
- CMD-SHELL
|
|
- wget -qO- http://127.0.0.1:5000/ >/dev/null
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 6
|
|
start_period: 60s
|
|
|
|
networks:
|
|
gramps:
|
|
|
|
secrets:
|
|
gramps_db_password:
|
|
file: ${PROJECT_ROOT}/secrets/gramps_db_password.txt
|