-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.extra.yaml
67 lines (64 loc) · 1.6 KB
/
docker-compose.extra.yaml
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
services:
db:
image: mariadb:latest
ports:
- target: 3306
host_ip: 127.0.0.1
published: 3306
protocol: tcp
mode: host
environment:
TZ: Asia/Shanghai
MARIADB_ROOT_PASSWORD: $MARIADB_ROOT_PASSWORD
volumes:
- ./etc/mariadb.cnf:/etc/mysql/conf.d/99-default.cnf
- ./mariadb:/var/lib/mysql
- socket:/run/sspanel
healthcheck:
test: mariadb-admin ping -p"$$MARIADB_ROOT_PASSWORD"
interval: 10s
timeout: 2s
start_period: 10s
start_interval: 2s
retries: 4
restart: always
depends_on:
init:
condition: service_completed_successfully
cache:
image: redis:alpine
ports:
- target: 6379
host_ip: 127.0.0.1
published: 6379
protocol: tcp
mode: host
environment:
TZ: Asia/Shanghai
REDIS_DEFAULT_PASSWORD: $REDIS_DEFAULT_PASSWORD
volumes:
- ./etc/redis.conf:/usr/local/etc/redis/default.conf
- ./redis:/data
- socket:/run/sspanel
healthcheck:
test: redis-cli -a "$$REDIS_DEFAULT_PASSWORD" --no-auth-warning ping
interval: 5s
timeout: 2s
start_period: 5s
start_interval: 2s
retries: 4
restart: always
command: >
redis-server /usr/local/etc/redis/default.conf
--user 'default' 'on' '>$REDIS_DEFAULT_PASSWORD' '~*' '&*' '+@all'
depends_on:
init:
condition: service_completed_successfully
init:
image: busybox:latest
volumes:
- socket:/run/sspanel
restart: on-failure
command: chmod 0777 /run/sspanel
volumes:
socket: