-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
103 lines (98 loc) · 2.21 KB
/
docker-compose.yml
File metadata and controls
103 lines (98 loc) · 2.21 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
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
services:
php-fpm:
image: pplulee/sidetp:latest
volumes:
- ./web:/var/www/html
- .env:/var/www/html/.env
- ./data/entrypoint.sh:/entrypoint.sh
depends_on:
mariadb:
condition: service_healthy
healthcheck:
test: ["CMD", "test", "-f", "/var/run/php/php-fpm.pid"]
interval: 10s
timeout: 5s
retries: 3
start_period: 60s
restart: always
logging:
options:
max-size: "3m"
max-file: "2"
# caddy:
# image: caddy:latest
# ports:
# - "80:80"
# - "443:443"
# volumes:
# - ./data/Caddyfile:/etc/caddy/Caddyfile
# - ./data/caddy/data:/data
# - ./data/caddy:/config
# - ./web:/var/www/html
# depends_on:
# php-fpm:
# condition: service_healthy
# restart: always
# logging:
# options:
# max-size: "3m"
# max-file: "2"
nginx:
image: nginx:latest
ports:
- "127.0.0.1:${WEB_PORT}:80"
# - "[::1]:${WEB_PORT}:80"
volumes:
- ./data/nginx.conf:/etc/nginx/conf.d/default.conf:ro
- ./web:/var/www/html
depends_on:
php-fpm:
condition: service_healthy
restart: always
logging:
options:
max-size: "3m"
max-file: "2"
redis:
image: redis:latest
volumes:
- ./data/redis:/data
restart: always
logging:
options:
max-size: "3m"
max-file: "2"
mariadb:
image: mariadb:latest
env_file:
- .env
volumes:
- ./data/mariadb/data:/var/lib/mysql
- ./data/mariadb/conf:/etc/mysql/conf.d
restart: always
command: --skip-log-bin
healthcheck:
test: [ "CMD", "mariadb-admin", "-h", "localhost", "-u${MARIADB_USER}", "-p${MARIADB_PASSWORD}", "ping" ]
interval: 10s
timeout: 5s
retries: 3
start_period: 20s
logging:
options:
max-size: "3m"
max-file: "2"
# 前后端分离部署时,请注释backend服务
backend:
image: pplulee/appleautopro:v4
env_file:
- .env
depends_on:
php-fpm:
condition: service_healthy
restart: always
deploy:
replicas: ${BACKEND_THREADS}
logging:
options:
max-size: "3m"
max-file: "2"