summaryrefslogtreecommitdiff
path: root/templates/journal-compose.yml.j2
diff options
context:
space:
mode:
Diffstat (limited to 'templates/journal-compose.yml.j2')
-rw-r--r--templates/journal-compose.yml.j231
1 files changed, 31 insertions, 0 deletions
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