Create docker file for running server
Closed this issue · 2 comments
Users would be able to get up and running quicker if docker was set up
I can look into this.
We could easily add a Docker build target to the Makefile
which would enable building the app from source into a container image, in a similar way as the xgo
tool works.
For safety I imagine running mysql in Docker but configuring its data path to be outside the container in a path on host storage, primarily so that the ledger data would persist across mysql container restart. On a Mac this could look like this article (How to Run MySQL in a Docker Container on macOS with Persistent Local Data
and I'm sure that there would be linux and windows configuration equivalents)
docker-compose allows defining multiple docker containers (e.g. a mysql container and a godbledger container and eventually another for the web frontend if needed) in a single docker-compose.yml
file so that the app could be started inside Docker like this:
git clone repo
cd into repo
./utils/configure-local-storage-for-docker-mysql.sh
docker-compose up
(or something like that)
wound up iterating a while futzing around with file and group ownership permissions for files created by a container running in docker on a volume mount on the host machine.
finally switched gears to my original idea and used docker-compose to start up and configure a mysql container.
PR #110 is ready for review