ansible-role-docker_wikijs/templates/docker-compose.yml

56 lines
1.5 KiB
YAML
Raw Normal View History

2022-04-26 00:07:08 +02:00
# {{ ansible_managed }}
version: '3.1'
services:
db:
image: postgres:13
environment:
POSTGRES_DB: {{ docker_wikijs_db_name }}
POSTGRES_PASSWORD: {{ docker_wikijs_db_password }}
POSTGRES_USER: {{ docker_wikijs_db_user }}
TZ: Europe/Paris
logging:
driver: "none"
restart: unless-stopped
volumes:
- /data1/{{ docker_wikijs_service_id }}/db_data:/var/lib/postgresql/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
networks:
- wikijs
wiki:
image: ghcr.io/requarks/wiki:2.5.277
volumes:
- ./definition.yml:/wiki/server/modules/authentication/oidc/definition.yml
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
depends_on:
- db
environment:
DB_TYPE: postgres
DB_HOST: db
DB_PORT: 5432
DB_USER: {{ docker_wikijs_db_user }}
DB_PASS: {{ docker_wikijs_db_password }}
DB_NAME: {{ docker_wikijs_db_name }}
TZ: Europe/Paris
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik"
- "traefik.http.routers.{{ docker_wikijs_service_id }}.entrypoints=web"
- "traefik.http.routers.{{ docker_wikijs_service_id }}.rule=Host(`{{ docker_wikijs_fqdn }}`)"
- "traefik.http.services.{{ docker_wikijs_service_id }}.loadbalancer.server.port=3000"
networks:
- traefik
- wikijs
networks:
traefik:
external: true
wikijs:
internal: true