blob: 8cf20dc0d6dd4b9b0d83ae5d456041dec7211031 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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
|