mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Added MySQL data volume to docker compose (#20982)
no issue - This allows us to run `docker-compose down` or to restart docker desktop without losing all our local databases - Added a data volume to the MySQL service in the `docker-compose.yml` file to persist the data between container restarts - The `yarn docker:reset` command will still reset all the data in the database since it uses `down -v` to remove the volumes as well
This commit is contained in:
parent
eb796e0785
commit
2a0d49c539
1 changed files with 4 additions and 1 deletions
3
.github/scripts/docker-compose.yml
vendored
3
.github/scripts/docker-compose.yml
vendored
|
@ -17,6 +17,7 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
# Turns out you can drop .sql or .sql.gz files in here, cool!
|
# Turns out you can drop .sql or .sql.gz files in here, cool!
|
||||||
- ./mysql-preload:/docker-entrypoint-initdb.d
|
- ./mysql-preload:/docker-entrypoint-initdb.d
|
||||||
|
- mysql-data:/var/lib/mysql
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: "mysql -uroot -proot ghost -e 'select 1'"
|
test: "mysql -uroot -proot ghost -e 'select 1'"
|
||||||
interval: 1s
|
interval: 1s
|
||||||
|
@ -37,3 +38,5 @@ services:
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
COLLECTOR_ZIPKIN_HOST_PORT: :9411
|
COLLECTOR_ZIPKIN_HOST_PORT: :9411
|
||||||
|
volumes:
|
||||||
|
mysql-data:
|
||||||
|
|
Loading…
Reference in a new issue