From abe2aeceab858d6ad3a838ffe2970a0e9e2a4606 Mon Sep 17 00:00:00 2001 From: Mark Powers Date: Sat, 20 Jul 2024 16:20:13 -0500 Subject: Initial commit --- templates/journal-compose.yml.j2 | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 templates/journal-compose.yml.j2 (limited to 'templates/journal-compose.yml.j2') diff --git a/templates/journal-compose.yml.j2 b/templates/journal-compose.yml.j2 new file mode 100644 index 0000000..8cf20dc --- /dev/null +++ b/templates/journal-compose.yml.j2 @@ -0,0 +1,31 @@ +services: + journal_api: + container_name: journal_api + build: ./journal_api.git/ + restart: always + environment: +{% for key, value in journal_env.items() %} + - {{ key }}={{ value }} +{% endfor %} + + volumes: + - ./data/journal_static:/static + - ./data/journal_data:/data + command: ["gunicorn", "--max-requests", "1000", "--max-requests-jitter", "50", "journal.wsgi", "--bind=0.0.0.0:80", "--capture-output", "--access-logfile" ,"-" ] + labels: +{% with router_name="journal", host_prefix="api.journal", container_port="80" %} +{% include "util/traefik_labels.txt.j2" %} +{% endwith %} + + journal_static_files: + image: nginx + restart: always + volumes: + - ./data/journal_static:/usr/share/nginx/html/static + labels: + - traefik.enable=true + - traefik.http.routers.journal_static.rule=Host(`api.journal.{{host}}`) && Pathprefix(`/static`) + - traefik.http.routers.journal_static.tls=true + - traefik.http.routers.journal_static.tls.certresolver=letsencrypt + - traefik.http.routers.journal_static.entrypoints=websecure + - traefik.http.services.journal_static.loadbalancer.server.port=80 -- cgit v1.2.3