mirror of
https://github.com/easychen/pushdeer.git
synced 2025-01-07 21:45:54 +08:00
更新docker-compose,修正容器启动顺序依赖
This commit is contained in:
parent
9afddbfddb
commit
b39c92c42d
@ -1,7 +1,11 @@
|
||||
version: '2'
|
||||
version: '2.1'
|
||||
services:
|
||||
mariadb:
|
||||
image: 'mariadb:10.5.8-focal'
|
||||
healthcheck:
|
||||
test: ["CMD", "mysqladmin", "ping", "--silent","--password=$$MYSQL_ROOT_PASSWORD"]
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
volumes:
|
||||
- 'mariadb_data:/var/lib/mysql'
|
||||
environment:
|
||||
@ -11,6 +15,8 @@ services:
|
||||
- '3306:3306'
|
||||
redis:
|
||||
image: 'bitnami/redis:6.0.16'
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli","ping"]
|
||||
environment:
|
||||
- ALLOW_EMPTY_PASSWORD=yes
|
||||
app:
|
||||
@ -21,8 +27,10 @@ services:
|
||||
volumes:
|
||||
- './:/app'
|
||||
depends_on:
|
||||
- mariadb
|
||||
- redis
|
||||
mariadb:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- DB_HOST=mariadb
|
||||
- DB_PORT=3306
|
||||
|
@ -1,7 +1,11 @@
|
||||
version: '2'
|
||||
version: '2.1'
|
||||
services:
|
||||
mariadb:
|
||||
image: 'mariadb:10.5.8-focal'
|
||||
healthcheck:
|
||||
test: ["CMD", "mysqladmin", "ping", "--silent","--password=$$MYSQL_ROOT_PASSWORD"]
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
volumes:
|
||||
- 'mariadb_data:/var/lib/mysql'
|
||||
environment:
|
||||
@ -11,6 +15,8 @@ services:
|
||||
- '3306:3306'
|
||||
redis:
|
||||
image: 'bitnami/redis:6.0.16'
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli","ping"]
|
||||
environment:
|
||||
- ALLOW_EMPTY_PASSWORD=yes
|
||||
app:
|
||||
@ -21,8 +27,10 @@ services:
|
||||
volumes:
|
||||
- './:/app'
|
||||
depends_on:
|
||||
- mariadb
|
||||
- redis
|
||||
mariadb:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- DB_HOST=mariadb
|
||||
- DB_PORT=3306
|
||||
|
Loading…
Reference in New Issue
Block a user