-
Notifications
You must be signed in to change notification settings - Fork 281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: use upstream PHP base image #348
base: main
Are you sure you want to change the base?
Conversation
Thanks for opening this and getting it started. I have had a similar idea for quite some time now to attempt to simplify / use more "off the shelf" components, so this is a welcome proposal. I am interested to see if there are any comments from the greater CachetHQ community on this one, I'm not sure if there are any strong preferences either way :) |
No further comments so far. How should I proceed with this? |
@J0WI Sorry for the long delay in responding. It seems like this would be a welcome change and refresh, if you are still interested. As you may have noticed, the myself and the other current maintainers of this docker image are not super active here. |
For me it appears useful to ditch nginx and supervisor from this image completely, and rather integrate nginx with a dedicated nginx.conf through docker compose. This also allows to keep up to date with newer Nginx versions more easily. Examples can be taken from Then the examples could also note how to configure the queue, a suiting database (Redis, Memcached, ...) and how to run workers in a separate container. |
Agreed. But this would result in a whole rewrite of the Dockerfile and break everything. I wanted to start with this part first. If you prefer to do the rewrite in a single step I can push all changes to this PR. |
I believe the current test failure is due to a missing |
@djdefi thanks for the hint, all tests are now passing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Giving this a 👍 for the initial pass.
I do think that simplifying to a pattern with a single entrypoint process more similar to the wordpress container as @almereyda mentioned should be an eventual goal.
@@ -13,7 +13,7 @@ services: | |||
build: | |||
context: . | |||
args: | |||
- cachet_ver=2.4 | |||
- cachet_ver=2.3.18 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity does 2.4 pass?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It won't build, because there is no downloadable release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't work for releases anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are other breaking changes like app:install
vs cachet:install
WORKDIR /var/www/html/ | ||
USER 1001 | ||
ARG cachet_ver=2.3.18 | ||
ARG archive_url=https://github.com/CachetHQ/Cachet/archive/v${cachet_ver}.tar.gz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ARG archive_url=https://github.com/CachetHQ/Cachet/archive/v${cachet_ver}.tar.gz | |
ARG archive_url=https://github.com/CachetHQ/Cachet/archive/${cachet_ver}.tar.gz |
related to convo in #348 (comment)
I propose to use the PHP image of the docker library: https://hub.docker.com/_/php
As a first step, this PR keeps the current concept with nginx and supervisor running the same container. I'd also like to introduce some best practices for writing Dockerfiles.
My goal is to get rid of supervisor completely and providing a pure FPM variant and a variant using php-apache as an alternative. This concept is inspired by other well known PHP images like Wordpress, Drupal, Joomla, Nextcloud, Matomo etc. They all run and scale pretty well in production.
You can find more information about the docker library and how to become an "official image" yourself here:
Please let me know how you think about it and if I should continue with this. Feel free to reach out if you have any questions.