Greetings, i was wondering if there is any tutorial or blog post that describes the process of moving the data (content folder, config.production.json file and db.sql file) from direct ubuntu installtion to a Docker setup consist of 2 containers (ghost and db).
I feel like you might be missing some docker basics. Happy to help, but as with any self-hosting, I am of the opinion that you should understand the technology first, before putting a server into the WWW.
Containers are generally stateless. So, emptying the content folder should happen through the volume.
If you have a named volume, stop the Docker container, and remove the volume:
The next time you start the container with your Docker Compose (I assume) file, it will be created again.
If you have a bind mount, delete the content inside the content folder, not the content folder itself.
I personally prefer volumes since they are the more modern way, contained, and can be interacted with using the docker cli. Others prefer bind mounts, since there is a physical copy on the host, you can easily interact with.
Seriously, as with most things in this sphere, there is no one-size-fits-all answer. Are you familiar with the Docker CLI? Just use volumes. Are you more comfortable with native host file operations? Use a bind mount.
You can always try both and see for yourself. And change down the line.
Great question. The setup needs to be robust. Knock it around crash the database, rebuild from backup etc. I like nodejs websites in general because they’re so quick and easy to build and set up totally from scratch, fast and reliable and although I’m more familiar programming in php myself, that language is suffering from major long term performance and security issues.
Nodejs is all roll-your-own and build-it-yourself unless you do use Docker / Kubernetes etc., and even then, we’re entering a dangerous era of wholesale engineered fragility and things designed intentionally to fail, while communists and anarchists engage in polite debates about critical infrastructure.