-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathdocker-compose.yml
95 lines (90 loc) · 2.5 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
89
90
91
92
93
94
95
services:
rt:
build:
context: .
image: firefart/requesttracker:latest
restart: unless-stopped
deploy:
mode: replicated
replicas: 5
endpoint_mode: vip
volumes:
- ./RT_SiteConfig.pm:/opt/rt5/etc/RT_SiteConfig.pm:ro
- ./msmtp/msmtp.conf:/etc/msmtprc:ro
- ./msmtp/:/msmtp:ro
- ./getmail/getmailrc:/getmail/getmailrc:ro
- ./gpg/:/opt/rt5/var/data/gpg
- ./smime/:/opt/rt5/var/data/smime
- ./shredder/:/opt/rt5/var/data/RT-Shredder
- /etc/localtime:/etc/localtime:ro
# make the host available inside the image
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- net
cron:
build:
context: .
image: firefart/requesttracker:latest
restart: unless-stopped
# the cron daemon needs to run as root
user: root
command: [ "/root/cron_entrypoint.sh" ]
# disable the healthcheck from the main dockerfile
healthcheck:
disable: true
depends_on:
rt:
condition: service_healthy
restart: true
# we send rt-mailgate over to caddy
caddy:
condition: service_healthy
restart: true
volumes:
- ./RT_SiteConfig.pm:/opt/rt5/etc/RT_SiteConfig.pm:ro
- ./msmtp/msmtp.conf:/etc/msmtprc:ro
- ./msmtp/:/msmtp:ro
- ./getmail/getmailrc:/getmail/getmailrc:ro
- ./gpg/:/opt/rt5/var/data/gpg
- ./smime/:/opt/rt5/var/data/smime
- ./crontab:/root/crontab:ro # needed so we can add it ro. Permissions are changed in startup script
- ./cron/:/cron
- ./shredder/:/opt/rt5/var/data/RT-Shredder
- /etc/localtime:/etc/localtime:ro
# make the host available inside the image
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- net
caddy:
image: caddy:latest
restart: unless-stopped
ports:
- "0.0.0.0:443:443"
- "127.0.0.1:8080:8080" # expose mailgate vhost to host
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- ./certs/:/certs/:ro
- /etc/localtime:/etc/localtime:ro
- vol_caddy_data:/data
- vol_caddy_config:/config
healthcheck:
test: [ "CMD", "wget", "-O", "-", "-q", "http://127.0.0.1:1337/" ]
interval: 10s
timeout: 10s
retries: 3
depends_on:
rt:
condition: service_healthy
restart: true
networks:
- net
volumes:
vol_caddy_data:
vol_caddy_config:
networks:
net:
driver: bridge
driver_opts:
com.docker.network.bridge.name: br_rt