-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
128 lines (126 loc) · 3.05 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
services:
nginx:
image: nginx:latest
depends_on:
php-fpm:
condition: service_healthy
ports:
- 127.0.0.1:8765:80
volumes:
- ./nginx/web:/var/www/html
- ./nginx/web/config_docker.php:/var/www/html/config.php
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf
networks:
- torstatus
logging:
driver: "journald"
options:
tag: "{{.Name}}"
healthcheck:
test: curl http://localhost/column_set.php || exit 1
start_period: 10s
start_interval: 10s
interval: 5m
timeout: 10s
php-fpm:
build: php-fpm
ports:
- 127.0.0.1:9001:9000
environment:
- REAL_SERVER_IP=${REAL_SERVER_IP}
- HIDDEN_SERVICE_URL=${HIDDEN_SERVICE_URL}
volumes:
- ./nginx/web:/var/www/html
- ./nginx/web/config_docker.php:/var/www/html/config.php
networks:
- torstatus
logging:
driver: "journald"
options:
tag: "{{.Name}}"
healthcheck:
test: "/usr/lib/nagios/plugins/check_tcp -H localhost -p 9000 || exit 1"
start_period: 10s
start_interval: 10s
interval: 5m
timeout: 10s
mariadb:
build: mariadb
stop_grace_period: 30s
environment:
MARIADB_ROOT_PASSWORD: torstatus
volumes:
- torstatus-mariadb:/var/lib/mysql
- ./mariadb/sql:/docker-entrypoint-initdb.d/
networks:
- torstatus
logging:
driver: "journald"
options:
tag: "{{.Name}}"
healthcheck:
test: "/opt/healthcheck.sh || exit 1"
start_period: 10s
start_interval: 10s
interval: 5m
timeout: 10s
updater:
build: updater
depends_on:
tor:
condition: service_healthy
volumes:
- ./nginx/web/config_docker.php:/opt/torstatus/config.php
- geoip:/usr/share/tor
networks:
- torstatus
logging:
driver: "journald"
options:
tag: "{{.Name}}"
healthcheck:
test: "/usr/lib/nagios/plugins/check_file_age -w 1800 -c 3600 /opt/torstatus/last_update || exit 1"
start_period: 10m
interval: 5m
timeout: 10s
tor:
build: tor
depends_on:
nginx:
condition: service_healthy
volumes:
- geoip:/usr/share/tor
- ./tor/torrc.d:/etc/tor/torrc.d/
- ./tor/hidden_services:/var/lib/tor/hidden_services/
networks:
- torstatus
logging:
driver: "journald"
options:
tag: "{{.Name}}"
healthcheck:
test: "/usr/lib/nagios/plugins/check_tcp -H localhost -p 9051 || exit 1"
start_period: 10s
start_interval: 10s
interval: 5m
timeout: 10s
memcached:
image: memcached:1.6-bookworm
networks:
- torstatus
logging:
driver: "journald"
options:
tag: "{{.Name}}"
healthcheck:
test: 'echo version | bash -c "(exec 3<>/dev/tcp/localhost/11211; cat >&3; timeout 0.1 cat <&3; exec 3<&-)"'
start_period: 10s
start_interval: 10s
interval: 5m
timeout: 10s
volumes:
torstatus-mariadb:
geoip:
networks:
torstatus:
external: True