-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
96 lines (88 loc) · 1.96 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
version: '3.3'
services:
dhis2mq:
image: rabbitmq:3-management-alpine
restart: always
expose:
- "5672"
- "15672"
networks:
- dhis2-back
dhis2db:
image: mdillon/postgis:10-alpine
restart: always
env_file: .postgres.env
volumes:
- type: volume
source: dhis2_db
target: /var/lib/postgresql/data
networks:
- dhis2-back
dhis2app:
build:
context: ./dhis2app
restart: always
env_file: .dhis2.env
expose:
- "8080"
depends_on:
- dhis2mq
- dhis2db
volumes:
- type: volume
source: dhis2_home
target: /dhis2/home
- type: bind
source: ./logs/dhis2
target: /dhis2/home/logs
- type: bind
source: ./logs/tomcat
target: /usr/local/tomcat/logs
networks:
- dhis2-back
- dhis2-front
command: [sh, -c, "/wait-for -t 50000 dhis2mq:5672 -- /wait-for -t 50000 dhis2db:5432 -- /setconf.sh && catalina.sh run"]
backups:
image: elavaud/backncrypt:latest
restart: always
env_file: .bnc.env
depends_on:
- dhis2db
volumes:
- type: bind
source: ./backups
target: /backups
networks:
- dhis2-back
command: "./wait-for -t 5000 dhis2db:5432 -- ./set.sh"
nginx:
image: nginx:1.13-alpine
restart: always
ports:
- "80:80"
depends_on:
- dhis2app
volumes:
- type: bind
source: /var/run/docker.sock
target: /tmp/docker.sock
read_only: true
- type: bind
source: ./nginx/default.conf
target: /etc/nginx/nginx.conf
read_only: true
- type: bind
source: ./nginx/wait-for
target: /wait-for
read_only: true
networks:
- dhis2-front
command: [sh, -c, "/wait-for -t 5000 dhis2app:8080 -- nginx -g 'daemon off;'"]
volumes:
dhis2_db:
dhis2_home:
networks:
dhis2-front:
driver: bridge
dhis2-back:
driver: bridge