Switch DB and qr-storage from named volumes to bind mounts

docker compose down -v silently deletes named volumes with no
confirmation - not acceptable now that this holds real user/customer
data. Bind mounts under ./data/ are never touched by down -v, and give
a fixed host path that's simple to include in a backup routine later.
This commit is contained in:
2026-07-13 16:48:36 +02:00
parent 0bde9ef7c9
commit e66f3a0360
3 changed files with 6 additions and 13 deletions
+2 -6
View File
@@ -21,7 +21,7 @@ services:
qrforge-db:
condition: service_healthy
volumes:
- qrforge_qrcode_storage:/var/www/qrcode-storage
- ./data/qrcode-storage:/var/www/qrcode-storage
networks:
- qrforge-network
@@ -29,7 +29,7 @@ services:
image: "mysql:8.0"
restart: "unless-stopped"
volumes:
- qrforge_db_data:/var/lib/mysql
- ./data/mysql:/var/lib/mysql
- ./db/init.sql:/docker-entrypoint-initdb.d/init.sql:ro
environment:
MYSQL_ROOT_PASSWORD: "${MYSQL_ROOT_PASSWORD:?zet MYSQL_ROOT_PASSWORD in .env}"
@@ -44,10 +44,6 @@ services:
networks:
- qrforge-network
volumes:
qrforge_db_data:
qrforge_qrcode_storage:
networks:
qrforge-network:
driver: bridge