-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yml
171 lines (161 loc) · 3.9 KB
/
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
services:
database:
build: &database
context: docker/mysql
container_name: anilibrary-database
environment:
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
MYSQL_AUTHENTICATION_PLUGIN: caching_sha2_password
healthcheck:
test: [ "CMD", "mysqladmin", "-u$DB_USER", "-p$DB_PASSWORD", "ping", "-h", "localhost" ]
interval: 10s
timeout: 5s
retries: 5
volumes:
- db-data:/var/lib/mysql:rw
ports:
- ${DB_PORT}:3306
networks:
- local
testing-database:
build: *database
container_name: anilibrary-testing-database
environment:
MYSQL_DATABASE: anilibrary-testing
MYSQL_ALLOW_EMPTY_PASSWORD: yes
tmpfs:
- /var/lib/mysql
ports:
- "3307:3306"
networks:
- local
redis:
image: redis:${REDIS_VERSION}
container_name: anilibrary-redis
command: redis-server --requirepass ${REDIS_PASSWORD}
healthcheck:
test: [ "CMD-SHELL", "redis-cli -a $REDIS_PASSWORD ping | grep PONG" ]
interval: 10s
timeout: 5s
retries: 5
volumes:
- redis-data:/data
ports:
- ${REDIS_PORT}:6379
networks:
- local
nginx:
depends_on:
app:
condition: service_healthy
build:
context: docker/nginx
container_name: anilibrary-nginx
environment:
NGINX_LOGS_TO_LOGSTASH: ${NGINX_LOGS_TO_LOGSTASH}
volumes:
- ./src/public:/anilibrary/public
ports:
- ${SERVER_PORT}:80
networks:
- local
- anilibrary
app:
depends_on:
database:
condition: service_healthy
redis:
condition: service_healthy
build: &app
context: docker/php
container_name: anilibrary
environment:
XDEBUG_MODE: ${XDEBUG_MODE}
extra_hosts:
- "host.docker.internal:host-gateway" # for xdebug
healthcheck:
test: php artisan octane:status || exit 1
interval: 10s
timeout: 5s
retries: 5
volumes:
- ./src:/anilibrary
- ./docker/php/supervisor/conf.d/octane.conf:/etc/supervisor/conf.d/octane.conf
ports:
- ${NODE_PORT}:5173
networks:
- local
- anilibrary
horizon:
depends_on:
app:
condition: service_healthy
build: *app
container_name: anilibrary-horizon
healthcheck:
test: php artisan horizon:status || exit 1
interval: 10s
timeout: 5s
retries: 5
volumes:
- ./src:/anilibrary
- ./docker/php/supervisor/conf.d/horizon.conf:/etc/supervisor/conf.d/horizon.conf
networks:
- local
scheduler:
depends_on:
app:
condition: service_healthy
build: *app
container_name: anilibrary-scheduler
healthcheck:
test: php artisan schedule:list || exit 1
interval: 10s
timeout: 5s
retries: 5
volumes:
- ./src:/anilibrary
- ./docker/php/supervisor/conf.d/scheduler.conf:/etc/supervisor/conf.d/scheduler.conf
networks:
- local
telegram:
depends_on:
app:
condition: service_healthy
build: *app
container_name: anilibrary-telegram
healthcheck:
test: php artisan nutgram:list || exit 1
interval: 10s
timeout: 5s
retries: 5
volumes:
- ./src:/anilibrary
- ./docker/php/supervisor/conf.d/telegram.conf:/etc/supervisor/conf.d/telegram.conf
networks:
- local
- anilibrary
reverb:
depends_on:
app:
condition: service_healthy
build: *app
container_name: anilibrary-reverb
volumes:
- ./src:/anilibrary
- ./docker/php/supervisor/conf.d/reverb.conf:/etc/supervisor/conf.d/reverb.conf
networks:
- local
networks:
anilibrary:
name: anilibrary
local:
name: anilibrary-local
volumes:
db-data:
name: anilibrary-db-data
redis-data:
name: anilibrary-redis-data