infrastructure/ansible/plays/services/wallabag/docker-compose.yaml
Tobias Manske e8bbb4b167
Some checks failed
continuous-integration/drone/push Build is failing
Postgres db macro
2024-02-05 18:44:13 +01:00

44 lines
1.4 KiB
YAML

{% import 'macro/postgres.j2' as pg with context %}
---
version: '3'
services:
wallabag:
image: wallabag/wallabag:latest
restart: unless-stopped
depends_on:
db:
condition: service_healthy
environment:
- "POSTGRES_USER={{ wallabag.db.user }}"
- "POSTGRES_PASSWORD={{ wallabag.db.password }}"
- "SYMFONY__ENV__DATABASE_DRIVER=pdo_pgsql"
- "SYMFONY__ENV__DATABASE_HOST=db"
- "SYMFONY__ENV__DATABASE_PORT=5432"
- "SYMFONY__ENV__DATABASE_NAME={{ wallabag.db.user }}"
- "SYMFONY__ENV__DATABASE_USER={{ wallabag.db.user }}"
- "SYMFONY__ENV__DATABASE_PASSWORD={{ wallabag.db.password }}"
- "SYMFONY__ENV__DOMAIN_NAME=https://wallabag.tobiasmanske.de"
- "SYMFONY__ENV__SECRET={{ wallabag.secret }}"
- "SYMFONY__ENV__FOSUSER_REGISTRATION=true"
labels:
- "traefik.enable=true"
- "traefik.docker.network=${COMPOSE_PROJECT_NAME}_default"
- "traefik.http.routers.wallabag.rule=Host(`wallabag.tobiasmanske.de`)"
- "traefik.http.routers.wallabag.entryPoints=websecure"
- "traefik.http.services.wallabag.loadbalancer.server.port=80"
networks:
- backend
- default
{{ pg.postgres("db", wallabag.db.user, wallabag.db.password, wallabag.db.user, ["backend"], version="15-alpine") }}
volumes:
db_data:
networks:
backend:
internal: true
postgres:
internal: true
...