Open joeskeen opened 3 months ago
This looks great! Are you able to make a pull request that updates the existing docker/docker-compose.yml? My only suggestion would be to use a named volume of the database data. My compose file is using mariadb but I don't have any strong feelings about maria vs mysql at this time.
Will do :+1:
I just discovered Libki and I'm excited to use it! When evaluating new software, I like to do so in a Docker environment to make it easier to repeat deployment once I decide to move forward with it.
The documentation says you can use the official Docker image to get started with Libki, but there isn't much additional information about what else needs to be done. I think I may have figured it out, but I thought I'd report what I've done here to see if I'm on the right track. If I am, perhaps we can update the docs with some additional instructions.
To Reproduce
In a clean environment, run
docker run libki/libki-server:latest
(environment variables omitted here for brevity)Some observations:
My solution
I think it would be cool if we could point new users to a sample
docker-compose.yml
file that allows them to try out Libki very easily. This is the file I came up with, which exposes the port, sets up cron, initializes the admin user, and runs Libki Server. It also makes sure that the db is up and running before starting the server. All sensitive data (credentials) are read from a.env
file which exists as a sibling to thedocker-compose.yml
.I would welcome any feedback or suggestions.
EDIT: I've tweaked it so Cron runs properly. The main thing with the Cron jobs is that it needs to have access to the environment variables passed in via Docker.