-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathproduction-template.yml
75 lines (68 loc) · 2.34 KB
/
production-template.yml
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
version: '3'
volumes:
traefik_certs:
mysql_data:
external: true
services:
traefik:
image: traefik:latest
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--entryPoints.web.address=:80"
- "--entryPoints.websecure.address=:443"
- "--certificatesResolvers.le.acme.email=<YOUR_EMAIL>"
- "--certificatesResolvers.le.acme.storage=acme.json"
- "--certificatesResolvers.le.acme.tlsChallenge=true"
- "--certificatesResolvers.le.acme.httpChallenge=true"
- "--certificatesResolvers.le.acme.httpChallenge.entryPoint=web"
restart: always
ports:
- "0.0.0.0:80:80"
- "0.0.0.0:443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- traefik_certs:/etc/traefik/acme
labels:
# Redirect all HTTP to HTTPS temporarily (to be changed
# to a permanent redirect once setup is complete).
- traefik.http.routers.http_catchall.rule=HostRegexp(`{any:.+}`)
- traefik.http.routers.http_catchall.entrypoints=web
- traefik.http.routers.http_catchall.middlewares=https_redirect
- traefik.http.middlewares.https_redirect.redirectscheme.scheme=https
- traefik.http.middlewares.https_redirect.redirectscheme.permanent=false
depends_on:
- bookworm
- nginx
nginx:
image: nginx:latest
volumes:
- ./serve:/usr/share/nginx/html/
- ./bookworm/Bookworm-Vega/build:/usr/share/nginx/html/vega/
labels:
- traefik.http.routers.nginx.rule=Host(`<YOUR_DOMAIN>`)
- traefik.http.routers.nginx.tls=true
- traefik.http.routers.nginx.tls.certresolver=le
mariadb:
image: mariadb:latest
volumes:
- mysql_data:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD='<PASSWORD_IS_INSECURE>'
bookworm:
build:
context: .
dockerfile: ./compose/bookworm/Dockerfile
environment:
- MYSQL_ROOT_PASSWORD='<PASSWORD_IS_INSECURE>'
depends_on:
- mariadb
volumes:
- ./corpus:/corpus
# command: bookworm serve
command: gunicorn --bind 0.0.0.0:10012 bookworm:app
labels:
- traefik.http.routers.bookworm.rule=Host(`<YOUR_DOMAIN>`) && PathPrefix(`/cgi-bin`)
- traefik.http.routers.bookworm.tls=true
- traefik.http.routers.bookworm.tls.certresolver=le
- traefik.http.services.bookworm.loadbalancer.server.port=10012