-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
docker-compose.yml
143 lines (136 loc) · 3.64 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
services:
rt:
build:
context: .
image: firefart/requesttracker:latest
restart: always
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: always
# the cron daemon needs to run as root
user: root
command: ["/root/cron_entrypoint.sh"]
# no need for tini here
entrypoint: ""
# disable the healthcheck from the main dockerfile
healthcheck:
disable: true
depends_on:
rt:
condition: service_healthy
restart: true
# we send rt-mailgate over to nginx
nginx:
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
nginx:
build:
context: nginx
image: firefart/requesttracker:nginx-latest
ports:
- "0.0.0.0:443:443"
- "127.0.0.1:8080:8080" # expose mailgate vhost to host
# uncomment to enable debug mode
# command: [nginx-debug, '-g', 'daemon off;']
depends_on:
rt:
condition: service_healthy
restart: true
dozzle:
condition: service_healthy
restart: true
pgadmin:
condition: service_healthy
restart: true
volumes:
- ./nginx/certs/:/certs/:ro
- ./nginx/startup-scripts/:/docker-entrypoint.d/:ro
- /etc/localtime:/etc/localtime:ro
networks:
- net
dozzle:
image: amir20/dozzle:latest
profiles:
- full
restart: always
healthcheck:
test: ["CMD", "/dozzle", "healthcheck"]
interval: 3s
timeout: 30s
retries: 5
start_period: 30s
environment:
- DOZZLE_BASE=${DOZZLE_BASE:-/logs}
- DOZZLE_NO_ANALYTICS=true
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- net
pgadmin:
image: dpage/pgadmin4:latest
profiles:
- full
restart: always
environment:
PGADMIN_LISTEN_ADDRESS: 0.0.0.0
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:[email protected]}
PGADMIN_DEFAULT_PASSWORD_FILE: /run/secrets/pgadmin_password
PGADMIN_DISABLE_POSTFIX: disable
healthcheck:
test: ["CMD", "wget", "-O", "-", "http://127.0.0.1:80/misc/ping"]
interval: 10s
timeout: 10s
start_period: 160s
retries: 3
secrets:
- pgadmin_password
volumes:
- vol_pgadmin:/var/lib/pgadmin
networks:
- net
secrets:
pgadmin_password:
file: ./pgadmin_password.secret
volumes:
vol_pgadmin: {}
networks:
net:
driver: bridge
driver_opts:
com.docker.network.bridge.name: br_rt