Mozzo1000 / booklogr

A simple, self-hosted service to keep track of your personal library 📚
https://demo.booklogr.app
Apache License 2.0
190 stars 1 forks source link

Prebuilt docker images #21

Open anarion80 opened 1 month ago

anarion80 commented 1 month ago

Is it possible that you add some github actions to automatically build and publish docker images to Docker Hub or Github Packages?

Should be as simple as https://github.com/anarion80/ghost_cloudinary_docker/blob/main/.github/workflows/build-and-publish.yml for example.

Mozzo1000 commented 1 month ago

Hi, Thank you for your question. I have not used Github Actions extensively nor have I much experience in actually building docker images. Nonetheless, what you are asking for is something that would be a good thing for this project to have.

After some quick googling and with the help from your example I have created an Actions for this project that should trigger when a new release is made (or manually), build and publish an image of the booklogrAPI. I have triggered this once manually and the image did get published at https://hub.docker.com/repository/docker/mozzo/booklogr (note the latest tag is currently NOT the 1.1.0 release but instead from the main branch at commit def071dbad35476ca5c640a1e45571a3a904817e, this will be fixed with release 1.2.0)

I have also updated the docker-compose file that is provided in the project root directory (https://github.com/Mozzo1000/booklogr/blob/main/docker-compose.yml) to use the image from Docker Hub instead of building it. This has been tested and working.

The documentation needs to be updated to reflect this change. Thank you again for showing your interest in this project. This was a fun thing to look into and I have learned more about actions and docker images in the process.

Mozzo1000 commented 4 weeks ago

I have now added a docker image for the web frontend as well. This can be found over at https://hub.docker.com/repository/docker/mozzo/booklogr-web The same applies for this image being built with the latest commit as of writing and not the released 1.1.0.

The provided docker-compose file has been updated to use the prebuilt image for the web container. https://github.com/Mozzo1000/booklogr/blob/00c4609bf1ece7fa401a1643a07640bd8b143a5f/docker-compose.yml

More testing and updates to the documentation still need to be done.