-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
204 lines (190 loc) · 4.74 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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
version: '3.9'
services:
nginx:
image: ipmonitor/nginx:${APP_VERSION:-latest}
build:
context: .
target: nginx-server
ports:
- ${NGINX_HTTP:-80}:80
- ${NGINX_HTTPS:-443}:443
environment:
FPM_HOST: php-fpm:9000
APP_DOMAIN: ${APP_DOMAIN}
depends_on:
- php-fpm
volumes:
- ./.etc/letsencrypt:/etc/letsencrypt:ro
- ./.docker/certbot/data:/var/www/certbot
restart: on-failure
networks:
- ipmonitor
certbot:
container_name: certbot
image: certbot/certbot:latest
depends_on:
- nginx
command: >-
certonly --reinstall --webroot --webroot-path=/var/www/certbot
--email ${USER_EMAIL} --agree-tos --no-eff-email
-d ${APP_DOMAIN}
# --server https://acme-staging-v02.api.letsencrypt.org/directory --test-cert
volumes:
- ./.etc/letsencrypt:/etc/letsencrypt
- ./.docker/certbot/data:/var/www/certbot
workspace:
image: ipmonitor/workspace:${APP_VERSION:-latest}
build:
context: .
target: php-workspace
user: ${CURRENT_UID}:www-data
command: [ /bin/bash ]
tty: true
stdin_open: true
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
restart: on-failure
volumes:
- ./.env:/var/www/app/.env
networks:
- ipmonitor
php-fpm:
image: ipmonitor/fpm:${APP_VERSION:-latest}
build:
context: .
target: php-fpm
user: www-data:www-data
depends_on:
- mysql
- redis
restart: on-failure
volumes:
- ./.env:/var/www/app/.env
- ./license.dat:/var/www/app/license.dat
networks:
- ipmonitor
mysql:
image: mysql:8.0
ports:
- ${FORWARD_DB_PORT:-3306}:3306
environment:
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
volumes:
- ipmonitor-mysql:/var/lib/mysql
restart: on-failure
networks:
- ipmonitor
healthcheck:
test: [ "CMD", "mysqladmin", "ping" ]
redis:
image: redis:7.0.11
ports:
- ${FORWARD_REDIS_PORT:-6379}:6379
volumes:
- ipmonitor-redis:/data
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
restart: on-failure
networks:
- ipmonitor
dns-consumer:
image: ipmonitor/workspace:${APP_VERSION:-latest}
user: ${CURRENT_UID}:${CURRENT_GID}
command: php artisan dns:consume
depends_on:
- mysql
- redis
healthcheck:
test: [ "CMD", "php", "artisan", "system-health:check" ]
volumes:
- ./.env:/var/www/app/.env
restart: unless-stopped
networks:
- ipmonitor
rdns-consumer:
image: ipmonitor/workspace:${APP_VERSION:-latest}
user: ${CURRENT_UID}:${CURRENT_GID}
command: php artisan rdns:consume
depends_on:
- mysql
- redis
restart: unless-stopped
volumes:
- ./.env:/var/www/app/.env
healthcheck:
test: [ "CMD", "php", "artisan", "system-health:check" ]
networks:
- ipmonitor
senderscore-consumer:
image: ipmonitor/workspace:${APP_VERSION:-latest}
user: ${CURRENT_UID}:${CURRENT_GID}
command: php artisan senderscore:consume
depends_on:
- mysql
- redis
restart: unless-stopped
volumes:
- ./.env:/var/www/app/.env
healthcheck:
test: [ "CMD", "php", "artisan", "system-health:check" ]
networks:
- ipmonitor
snds-consumer:
image: ipmonitor/workspace:${APP_VERSION:-latest}
user: ${CURRENT_UID}:${CURRENT_GID}
command: php artisan snds:consume
depends_on:
- mysql
- redis
restart: unless-stopped
volumes:
- ./.env:/var/www/app/.env
healthcheck:
test: [ "CMD", "php", "artisan", "system-health:check" ]
networks:
- ipmonitor
db-consumer:
image: ipmonitor/workspace:${APP_VERSION:-latest}
user: ${CURRENT_UID}:${CURRENT_GID}
command: php artisan db:consume
depends_on:
- mysql
- redis
volumes:
- ./.env:/var/www/app/.env
restart: unless-stopped
healthcheck:
test: [ "CMD", "php", "artisan", "system-health:check" ]
networks:
- ipmonitor
notifications-consumer:
image: ipmonitor/workspace:${APP_VERSION:-latest}
build:
context: .
target: php-workspace
user: ${CURRENT_UID}:${CURRENT_GID}
command: php artisan ipm-notifications:consume
depends_on:
- mysql
- redis
volumes:
- ./.env:/var/www/app/.env
restart: unless-stopped
healthcheck:
test: [ "CMD", "php", "artisan", "system-health:check" ]
networks:
- ipmonitor
networks:
ipmonitor:
driver: bridge
volumes:
ipmonitor-mysql:
driver: local
ipmonitor-redis:
driver: local