dani3l0 / honey

Nice and sweet place for all your self-hosted services.
https://honeyy.vercel.app/
168 stars 7 forks source link

Basic Dockerfile for current version #2

Closed l33tlamer closed 1 year ago

l33tlamer commented 1 year ago

This is a very basic Dockerfile to use to produce a image running a simple nginx webserver with the v2.1.1-stable release downloaded and extracted into its webserver root, nothing more.

It should work with Github Actions to automatically build and push it to the Github repo and the Docker Hub repo, or wherever else.

Ideally there would be a URL to always grab the latest release for the build, instead of a fixed link to a specific version number. I believe Github offers some way to do this as fixed URLs but i honestly couldnt figure it out myself.

For example https://api.github.com/repos/dani3l0/honey/zipball works to get the latest zip as download regardless of version number, but the problem then is that inside the zip the files are in a subfolder with honey-commit-hash or something. And that causes trouble when trying to automatically extract it to the actual webserver share in the Docker image. Of course that is doable tho, just not very elegant. A proper direct download URL would be ideal imo.

Oh and i am no Github expert or let alone a actual developer of anything, this is i think my first PR ever, please let me know if i have done anything wrong or against etiquette.

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
honey ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 25, 2023 11:41pm
dani3l0 commented 1 year ago

Wow, looks great to me. And very cool that you added heathcheck! Thank you for contribution, that's a great PR.

Note: As I remember, Vite has built-in production server, so there is no need for external webserver, but for now that's OK

l33tlamer commented 1 year ago

Wow, looks great to me. And very cool that you added heathcheck! Thank you for contribution, that's a great PR.

Note: As I remember, Vite has built-in production server, so there is no need for external webserver, but for now that's OK

Youre welcome. I have no clue what exactly Vite is, sorry. Simply based on the provided zip release it does need some form of a webserver to actually serve it through the Docker image, wether that is nginx, Apache or whatever doesnt really matter. I simply picked nginx because its very light and small.

l33tlamer commented 1 year ago

One thing that should be noted when using the image is how to have persistent date through container restarts. I believe the settings are all contained in the config.json file? So a user should mount that file to their host in order to have it persist. If the app stores data in more than that file, those should be mounted too and mentioned in documentation.

dani3l0 commented 1 year ago

Yes, it's worth noting how to configure mounts, but I hope it'll be possible to set everything via environmnent variables.

Although all the configuration is stored in config.json file (and nowhere else), we may also want to put some icons for our services or custom backgrounds, so I guess directory where we want to store those assets should also be mounted.

Alternatively, we can just mount entire config directory and put everything there. It's OK because we have access to all contents under /config path in our webserver. But... storing assets in config dir sounds kinda weird.