# Grimmory wil MariaDB (geen SQLite) en start pas als die gezond is, zoals in # het voorbeeld van upstream (github.com/grimmory-tools/grimmory). services: << service_name >>: image: grimmory/grimmory:latest container_name: << service_name >> environment: - USER_ID=<< puid >> - GROUP_ID=<< pgid >> - TZ=<< timezone >> - DATABASE_URL=jdbc:mariadb://<< service_name >>-db:3306/grimmory - DATABASE_USERNAME=grimmory - DATABASE_PASSWORD=<< db_password >> volumes: - << appdata_dir >>/<< service_name >>:/app/data - << books_dir >>:/books - << appdata_dir >>/<< service_name >>-bookdrop:/bookdrop ports: - "<< port >>:6060" depends_on: << service_name >>-db: condition: service_healthy restart: unless-stopped << service_name >>-db: image: mariadb:11.4 container_name: << service_name >>-db environment: - MARIADB_DATABASE=grimmory - MARIADB_USER=grimmory - MARIADB_PASSWORD=<< db_password >> - MARIADB_ROOT_PASSWORD=<< db_password >> volumes: - << appdata_dir >>/<< service_name >>-db:/var/lib/mysql healthcheck: test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"] interval: 10s timeout: 5s retries: 10 restart: unless-stopped