Why when stop my docker i must conmfigure corteza again and i lost data in db?
docker-compose stop and docker compose start
docker-compose down will destroy your local installation and the db will be lost.
if you add:
ports: [ “127.0.0.1:3307:3306” ]
to the db section of your docker-compose.yaml, you can connect mySQL workbench to your database (on port 3307) and back it up.
Correct, the container is destroyed and the containing data is lost.
Apart from the @adammarshall 's suggestion, you can define a volume to store the DB data on the server’s local filesystem.
volumes: [ "./data/db:/var/lib/mysql" ] under
services > db in the
docker-compose.yaml should do the trick.
The same applies to attachments; add
volumes: [ "./data/server:/data" ] under
services > server in the
The above assumes that you’ve setup the file structure as described in the documentation (DevOps guide :: Corteza Docs)
I’ll make one of us document this part better.