mirror of
https://github.com/yanhao98/docker-cron.git
synced 2026-02-04 10:30:33 +08:00
feat(docker-compose): 添加 mysql9 服务并更新卷配置
This commit is contained in:
@@ -1,7 +1,23 @@
|
|||||||
volumes:
|
volumes:
|
||||||
tmp:
|
tmp-postgres17:
|
||||||
|
external: false
|
||||||
|
tmp-mysql9:
|
||||||
external: false
|
external: false
|
||||||
services:
|
services:
|
||||||
|
mysql9:
|
||||||
|
restart: unless-stopped
|
||||||
|
container_name: mysql9
|
||||||
|
environment:
|
||||||
|
MYSQL_ROOT_PASSWORD: mysqlrootpass
|
||||||
|
volumes:
|
||||||
|
- ./backups:/backups
|
||||||
|
- tmp-mysql9:/var/lib/mysql
|
||||||
|
healthcheck:
|
||||||
|
test: ['CMD', 'mysqladmin', 'ping', '-h', 'localhost']
|
||||||
|
interval: 5s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 5
|
||||||
|
image: mysql:9
|
||||||
postgres17:
|
postgres17:
|
||||||
container_name: postgres17
|
container_name: postgres17
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
@@ -11,7 +27,7 @@ services:
|
|||||||
- POSTGRES_DB=_
|
- POSTGRES_DB=_
|
||||||
volumes:
|
volumes:
|
||||||
- ./backups:/backups:rw
|
- ./backups:/backups:rw
|
||||||
- tmp:/var/lib/postgresql/data
|
- tmp-postgres17:/var/lib/postgresql/data
|
||||||
image: postgres:17
|
image: postgres:17
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
|
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
|
||||||
|
|||||||
Reference in New Issue
Block a user