mirror of
https://codeberg.org/catask-org/catask.git
synced 2025-04-19 21:33:41 -05:00
add healthcheck to mariadb container
wait until mariadb is fully started when starting catask container remove custom networks in docker compose
This commit is contained in:
parent
0a3e4760bc
commit
803c97fc61
1 changed files with 8 additions and 11 deletions
|
@ -7,9 +7,13 @@ services:
|
|||
MARIADB_DATABASE: catask
|
||||
MARIADB_USER: catask
|
||||
MARIADB_PASSWORD: catask
|
||||
healthcheck:
|
||||
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
|
||||
start_period: 10s
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
image: mariadb
|
||||
networks:
|
||||
- catask
|
||||
restart: always
|
||||
volumes:
|
||||
- ./schema.sql:/docker-entrypoint-initdb.d/1.sql
|
||||
|
@ -19,9 +23,8 @@ services:
|
|||
build:
|
||||
dockerfile: Dockerfile
|
||||
depends_on:
|
||||
- mariadb
|
||||
networks:
|
||||
- catask
|
||||
mariadb:
|
||||
condition: service_healthy
|
||||
ports:
|
||||
- "8000:8000"
|
||||
volumes:
|
||||
|
@ -32,11 +35,5 @@ services:
|
|||
source: ./.env
|
||||
target: /catask/.env
|
||||
|
||||
networks:
|
||||
catask:
|
||||
driver: bridge
|
||||
driver_opts:
|
||||
com.docker.network.bridge.host_binding_ipv4: "127.0.0.1"
|
||||
|
||||
volumes:
|
||||
db-data:
|
Loading…
Add table
Reference in a new issue