-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
88 lines (82 loc) · 2.18 KB
/
docker-compose.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
version: '3.7'
services:
https-portal:
image: steveltn/https-portal:1.12.0
container_name: https-portal
volumes:
- https-portal-certs:/var/lib/https-portal
ports:
- '80:80'
- '443:443'
restart: unless-stopped
environment:
DOMAINS: '${LEARNOCAML_DOMAIN} -> http://learnocaml:8080'
# TODO => uncomment next line after a successful deployment test
# STAGE: 'production'
NUMBITS: '4096'
ACCESS_LOG: 'stdout'
ERROR_LOG: 'stderr'
networks:
- proxy-net
depends_on:
- learnocaml
logging:
driver: "journald"
learnocaml:
container_name: backend
# image: ocamlsf/learn-ocaml:0.13
image: pfitaxel/learn-ocaml:staging
environment:
# (ocaml variable) <container_name>.<network_name>:
FROM_DOMAIN: "backend.localdomain"
# (alpine msmtp variable) hostname of the SMTP server:
SMTPSERVER: "postfix"
env_file:
- root-url.env
- reply-to.env
depends_on:
- postfix
volumes:
- ${LEARNOCAML_REPO}:/repository:ro
- learn-ocaml-sync:/sync
networks:
- proxy-net
- learnocaml-net
restart: unless-stopped
logging:
driver: "journald"
postfix:
container_name: postfix
image: juanluisbaptiste/postfix
environment:
ALWAYS_ADD_MISSING_HEADERS: "yes"
# (postfix variable) DNS of myself, the server sending mails:
SERVER_HOSTNAME: "mail.localdomain"
# (postfix variable) remote MTA credentials:
SMTP_PASSWORD_FILE: "/secrets/smtp_password"
env_file:
- smtp.env
volumes:
- "./secrets:/secrets"
networks:
- learnocaml-net
logging:
driver: "journald"
volumes:
learn-ocaml-sync:
driver: local
https-portal-certs:
driver: local
networks:
proxy-net:
driver: bridge
learnocaml-net:
driver: bridge
name: localdomain
# @ https://docs.docker.com/config/containers/logging/configure/
# @ https://docs.docker.com/config/containers/logging/journald/
# @ https://github.com/SteveLTN/https-portal#quick-start
# % docker logs https-portal
# % journalctl CONTAINER_NAME=https-portal
# % docker logs backend
# % journalctl CONTAINER_NAME=backend