mirror of
https://codeberg.org/catask-org/catask.git
synced 2025-04-20 13:53:42 -05:00

wait until mariadb is fully started when starting catask container remove custom networks in docker compose
39 lines
No EOL
1,000 B
YAML
39 lines
No EOL
1,000 B
YAML
name: catask
|
|
|
|
services:
|
|
mariadb:
|
|
environment:
|
|
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: 1
|
|
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
|
|
restart: always
|
|
volumes:
|
|
- ./schema.sql:/docker-entrypoint-initdb.d/1.sql
|
|
- db-data:/var/lib/mysql
|
|
|
|
catask:
|
|
build:
|
|
dockerfile: Dockerfile
|
|
depends_on:
|
|
mariadb:
|
|
condition: service_healthy
|
|
ports:
|
|
- "8000:8000"
|
|
volumes:
|
|
- type: bind
|
|
source: ./config.json
|
|
target: /catask/config.json
|
|
- type: bind
|
|
source: ./.env
|
|
target: /catask/.env
|
|
|
|
volumes:
|
|
db-data: |