docker-compose: Use a named volume instead of a local dir

This commit is contained in:
Glenn Y. Rolland 2020-03-21 12:50:45 +01:00
parent 50832e109f
commit 1cdca00e73

View file

@ -1,9 +1,11 @@
version: "3" ---
version: "3.4"
services: services:
db: db:
image: mariadb:10.3 image: mariadb:10.3
volumes: volumes:
- ./data/db:/var/lib/mysql - db_data:/var/lib/mysql
environment: environment:
MYSQL_ROOT_PASSWORD: insecure MYSQL_ROOT_PASSWORD: insecure
MYSQL_DATABASE: etherpad MYSQL_DATABASE: etherpad
@ -20,6 +22,5 @@ services:
depends_on: depends_on:
- "db" - "db"
# volumes: volumes:
# - data/etherpad:/var/www/html/documents db_data: {}