Skip to content

Commit 07c1a2d

Browse files
committed
Persist database via a named volume. (Possible fix for #15)
The Docker Library project documents a problem with some versions of MariaDB not starting correctly when a host system directory is mounted to /var/lib/mysql. MariaDB/mariadb-docker#38 It appears to work correctly when a named volume is used; at least, it works on Windows. This should be tested on OS/X as well before being merged.
1 parent 55fcacb commit 07c1a2d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docker/docker-compose.yml

+4
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ services:
3333
## TODO: Map mysql data file directory to persit db compose down commands.
3434
volumes:
3535
- ./db/overrides/backups:/var/mysql/backups:delegated
36+
- db:/var/lib/mysql
3637
env_file:
3738
- ./docker.env
3839
ports:
@@ -42,3 +43,6 @@ services:
4243

4344
networks:
4445
drupalvm:
46+
47+
volumes:
48+
db:

0 commit comments

Comments
 (0)