Closed jonocodes closed 1 month ago
I also added a few TODO notes on other things that could use updates.
Thank you @jonocodes
Good Docker support will be super good for the health of the project!
Ok. Not sure the best way to proceed - in terms of review, acceptance, etc. But for now I will continue on this POC and turn it into a working version along with my other suggestions.
As the saying goes: "rough consensus and running code"
I just noticed a huge docker entrypoint file trying to keep a hm3.ini file up to date - master and Cypht 2.0 is no longer using ini files for config - keeping the config in .env (or other env variables in dockerfiles) is just fine.
Where is cypht 2.0? Is that the same as master at this point?
Where is cypht 2.0? Is that the same as master at this point?
Yes, it will be branched and released any day now: https://github.com/cypht-org/cypht/issues/879
Inspiration from other projects:
Where is cypht 2.0? Is that the same as master at this point?
2.0 has just been released. You can push your changes to master for upcoming releases (2.1+), backport/push to 2.0.x branch for 2.0+ releases and to 1.4.x for older cypht version.
And for consistency with the mainline, the env used inside docker should be copied directly from the project's env file, not pre-defined for it, and overridden later by environment variables or other means.
The dockerfile is already inside the project and should no longer be downloaded using the wget archive.
Agreed. Thats why I removed wget.
Also, you should keep a tight control over the files in the docker container, e.g. only copy the files that are relevant to the runtime.
I have mixed feelings on that, as I am trying to simplify and streamline the docker process. I may address this with a .dockerignore file, but will think more on it.
Also, the .hm3 configuration file entry has been deprecated and the dockerfile needs to be updated.
Yeah, I dont quite understand the .hm3 file yet, but will try to do away with it when I get to that part.
And for consistency with the mainline, the env used inside docker should be copied directly from the project's env file, not pre-defined for it, and overridden later by environment variables or other means.
Is that now what I did? I did not look too deeply at the env implementation, but that was my intention.
I'm upgrading this POC to a WIP. See here: https://github.com/cypht-org/cypht/pull/1001
This is a proof of concept how how to move and use docker into the main repo, as discussed here: https://github.com/cypht-org/cypht-docker/issues/31#issuecomment-2081175722
It does not fully work since I have not lined up the env vars, but you can get it started and see the home page by running:
docker compose up --build
then visit http://localhost/
I have mostly copied over files from here: https://github.com/cypht-org/cypht-docker/tree/master/image and I left in the commented out lines so you can see some of the changes I introduced.
docker-compose.yaml here gives several benefits: