-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
66 lines (64 loc) · 1.48 KB
/
docker-compose.yml
File metadata and controls
66 lines (64 loc) · 1.48 KB
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
version: "3"
services:
# 数据库
redis:
image: redis:alpine
restart: always
mysql:
image: mysql
restart: always
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
MYSQL_USER: hollow
MYSQL_PASSWORD: zTCCY5Kaz3Hy
MYSQL_DATABASE: hollow
healthcheck:
test: '/usr/bin/mysql --user=hollow --password=zTCCY5Kaz3Hy --execute "SHOW DATABASES;"'
timeout: 10s
retries: 10
# 后端
backend-security:
build:
dockerfile: Dockerfile
context: ./docker/security
depends_on:
mysql:
condition: service_healthy
volumes:
- type: bind
source: ./config/config.yml
target: /app/config.yml
read_only: true
- ./geoip:/app/geoip
backend-services:
build:
dockerfile: Dockerfile
context: ./docker/services
depends_on:
mysql:
condition: service_healthy
volumes:
- type: bind
source: ./config/config.yml
target: /app/config.yml
read_only: true
- ./geoip:/app/geoip
backend-fallback:
build:
dockerfile: Dockerfile
context: ./docker/fallback
volumes:
- type: bind
source: ./config/config.yml
target: /app/config.yml
read_only: true
nginx:
depends_on:
- backend-fallback
restart: always
build:
dockerfile: Dockerfile
context: ./docker/nginx
ports:
- 9080:80