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:
+2
-6
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user