Jump to content

Production in Docker?


TwoWheelDev
 Share

Recommended Posts

Whenever I'm setting up websites, I've always gone down the route of just manually configuring nginx, and copying the files to the webroot (including for ProcessWire).

My only real experience with docker has been for running stuff locally during development (originally docker-compose but as of today DDEV), so my question is does anyone run their site using docker, in particular PW.

As all my sites I host are small, low-traffic sites I just have them running on a small VPS from DigitalOcean - with manually configured XEMP, and I've always struggled to see what benefits a docker/container-based approach would give. One thing that's always worried me with a docker based approach is for things like the DB, ensuring that if the container is destroyed the DB data isn't lost! It seems most of the tutorials in the wild are more geared towards using hosted databases... but when you're on a budget every cost adds up!

  • Like 1
Link to comment
Share on other sites

2 hours ago, TwoWheelDev said:

My only real experience with docker has been for running stuff locally during development (originally docker-compose but as of today DDEV), so my question is does anyone run their site using docker, in particular PW.

I asked this in the DDEV discord kinda betting there would be more interest or at least pointing to a resource, but didn't have much success. 

2 hours ago, TwoWheelDev said:

One thing that's always worried me with a docker based approach is for things like the DB, ensuring that if the container is destroyed the DB data isn't lost! It seems most of the tutorials in the wild are more geared towards using hosted databases... but when you're on a budget every cost adds up!

I haven't seen docker recommended for production db's and comments around web as to why this is not a good idea, can't remember details right now, just remember I have dived into this rabbit hole before. But I'd love to be proved wrong!

The only tool I've taken a look at as a possible aid for using docker for production is Basecamp's Kamal and they seem to assume you will be using a managed db from a provider and mount volumes to the docker containers if you need filesystem in the application (which is mandatory in the case of ProcessWire?), but there's accessories thingy?

Anyway, I'm really in the same spot as you are @TwoWheelDev 😞 Love the dev experience docker offers, would love to take that to deployment without it being too expensive hosting wise.

  • Like 1
Link to comment
Share on other sites

 Share

×
×
  • Create New...