ansible/roles/lychee/templates/docker-compose.yml.j2

63 lines
1.5 KiB
Django/Jinja

version: "{{ compose_version }}"
networks:
proxy:
name: "{{ traefik_network }}"
db:
name: lychee_db
volumes:
db:
name: lychee_db
uploads:
name: lychee_uploads
services:
lychee:
container_name: lychee
image: "lycheeorg/lychee:{{ lychee_version }}"
volumes:
- uploads:/uploads
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
labels:
traefik.http.routers.lychee.entrypoints: websecure
traefik.http.routers.lychee.rule: "Host(`pic.{{ domain_name }}`)"
traefik.http.services.lychee.loadbalancer.server.port: 80
traefik.enable: true
environment:
PUID: 1001
PGID: 1001
PHP_TZ: Europe/Paris
DB_CONNECTION: pgsql
DB_HOST: lychee_db
DB_PORT: 5432
DB_DATABASE: lychee
DB_USERNAME: lychee
DB_PASSWORD: "{{ lychee_db_password }}"
APP_NAME: Lychee
APP_ENV: production
APP_DEBUG: "false"
APP_URL: "https://pic.{{ domain_name }}"
STARTUP_DELAY: 5
TRUSTED_PROXIES: "*"
networks:
- proxy
- db
restart: unless-stopped
lychee_db:
image: "postgres:{{ postgres_version }}-alpine"
container_name: lychee_db
volumes:
- db:/var/lib/postgresql/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
environment:
POSTGRES_USER: lychee
POSTGRES_PASSWORD: "{{ lychee_db_password }}"
POSTGRES_DB: lychee
networks:
- db
restart: unless-stopped