docker-compose: add volume mapping for database persistence

This commit is contained in:
Space-Banane
2026-05-22 20:23:23 +02:00
parent 390135e456
commit 787f3b31ae
2 changed files with 4 additions and 1 deletions

3
.gitignore vendored
View File

@@ -9,4 +9,5 @@ worktrees/
htmlcov/ htmlcov/
creds.txt creds.txt
.tmp_mig.db .tmp_mig.db
.tmp_pytest .tmp_pytest
db/

View File

@@ -9,6 +9,8 @@ services:
MARIADB_ROOT_PASSWORD: rootpass MARIADB_ROOT_PASSWORD: rootpass
ports: ports:
- "3306:3306" - "3306:3306"
volumes:
- ./db:/var/lib/mysql
healthcheck: healthcheck:
test: ["CMD", "mariadb-admin", "ping", "-h", "localhost", "-uroot", "-prootpass"] test: ["CMD", "mariadb-admin", "ping", "-h", "localhost", "-uroot", "-prootpass"]
interval: 5s interval: 5s