Volume not working
Scratch my last post, the DB is now working. The issue now is the volume mounted to /var/lib/mysql is not persisting my DB. I tested it by restarting the compose and redeploying and going back in to look and the DB is back to default.
When I 'create a service' at the beginning I use compose, so I only have one option which is 'file mount'. Is this sufficient enough to persist my data? Don't understand what's going on.


15 Replies
Don’t do ../files/db_data
just do db_data
why does it say to do that in the documentation then? 👀
You took this from dokploy docs?
Generally if you can I would use a database instead of a compose service tho
i setup the db instead of compose, imported mysql db and i setup volumes. now in the logs it just says created and this error message you can see below. it was just running and then it just keeps stopping for no apparent reason. it's the only thing running on that port so it isn't clear why it keeps stopping



it just stops
Did you try debugging by just creating a db without adding data and volumes?
nevermind it's working now. so I guess I just change the host and db name to match the new one in this db?

add the new host and db name to my compose environment right? then my php backend can connect to the new db?
also, would I be right to say that I don't need to add traefik config to php backend and tileserver? they only communicate internally to the frontend not through http

dont these ports mean my mysql is exposed over http? I only need it locally why has this happened?

Yeah ofc you need to change that
Did you enter a port on the db? If no there is no need to worry
No. it does not have the binding you see in my picture. Displayed with the ->

Those you sent are just an indicator. They don't do anything other than give you a visual indicator that the container has something listening to those ports
stupid me I realised the issue is most likely that i've imported my dev db without realising the hosts and ips I've granted access are no longer valid in prod. do you know how to give dokploy containers a static ip? that way I can give the container accessing mysql access
or is that overkill and should I just allow all internal ips?
I am adding my conf file to this directory but when I use a volume to persist it it breaks the container. any idea why?

