Compare commits

..
4 Commits
Author SHA1 Message Date
renovate-bot 5de3291ecb Pin dependencies 2026-11-19 02:04:53 +00:00
julielenaerts f1878e72e0 Update to v2.13.6
build-images / build-and-push (push) Successful in 3m39s
2026-10-26 11:03:58 +01:00
julielenaerts 0e6ec94ae4 Run container as unprivileged www-data user and simplify entrypoint
- Remove root-only FPM user configuration from entrypoint.sh (moved to Dockerfile build time)
- Remove Redis session configuration from entrypoint.sh (handled by Symfony services)
- Remove cache directory permission adjustments (unnecessary with proper ownership)
- Set file ownership to www-data:www-data at build time using COPY --chown
- Create required directories and set ownership in single RUN layer
- Switch to www-data USER before CMD
- Remove PHP_FPM_USER, PHP_FPM_GROUP, SESSION_LIFETIME environment variables
- Add docker/ directory to .dockerignore
2026-10-26 11:02:05 +01:00
julielenaerts b1eb46f902 Update to v2.13.5
build-images / build-and-push (push) Successful in 4m32s
2026-10-21 20:37:32 +02:00
14 changed files with 89 additions and 60 deletions

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
## 2.13.5 - 2026-10-21
### Security
* Update with patch for php vulnerability
+3
View File
@@ -0,0 +1,3 @@
## 2.13.6 - 2026-10-26
### DX
* Run container as www-data user instead of root
@@ -0,0 +1,27 @@
kind: Release
body: |
- actions/checkout: v4 -> v4
- actions/checkout: v4 -> v4
- axllent/mailpit: ->
- chill/base-image: 8.4-edge -> 8.4-edge
- chill/base-image: 8.4-edge -> 8.4-edge
- docker.elastic.co/logstash/logstash-oss: 8.1.0-amd64 -> 8.1.0-amd64
- docker/build-push-action: v5 -> v5
- docker/build-push-action: v5 -> v5
- docker/login-action: v3 -> v3
- docker/setup-buildx-action: v3 -> v3
- gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image: latest -> latest
- intl-messageformat: ^10.5.11 -> 10.7.18
- miniscruff/changie-action: v2 -> v2
- miniscruff/changie-action: v2 -> v2
- miniscruff/changie-action: v2 -> v2
- nginx: ->
- redis: ->
- registry.gitlab.com/champs-libres/public/relatorio-tornado/app: latest -> latest
- sergeysova/jq-action: v2 -> v2
- sergeysova/jq-action: v2 -> v2
- stefanzweifel/git-auto-commit-action: v5 -> v5
time: 2026-11-19T02:04:52+00:00
custom:
Issue: ""
+6 -6
View File
@@ -9,17 +9,17 @@ jobs:
runs-on: cth-ubuntu-latest
steps:
- name: Checkout
uses: https://github.com/actions/checkout@v4
uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Log in to Docker Registry
uses: https://github.com/docker/login-action@v3
uses: https://github.com/docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
with:
registry: h3m6q87t.gra7.container-registry.ovh.net
username: ${{ vars.OVH_REGISTRY_USERNAME }}
password: ${{ secrets.OVH_REGISTRY_PASSWORD }}
- name: Install Dependencies and Build Assets
uses: docker://chill/base-image:8.4-edge
uses: docker://chill/base-image:8.4-edge@sha256:687302e53814b2016f17eba0ea69e0bbebff7c950b5ac707467f5500cf2643d5
env:
APP_ENV: prod
with:
@@ -28,10 +28,10 @@ jobs:
args: -c "apk add --no-cache nodejs yarn && composer install --no-scripts --no-interaction && bin/console cache:clear && yarn install && yarn run encore production"
- name: Set up Docker Buildx
uses: https://github.com/docker/setup-buildx-action@v3
uses: https://github.com/docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
- name: Build and Push PHP Image
uses: https://github.com/docker/build-push-action@v5
uses: https://github.com/docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5
with:
context: .
file: Dockerfile
@@ -39,7 +39,7 @@ jobs:
tags: h3m6q87t.gra7.container-registry.ovh.net/chillbasics/php:${{ github.ref_name }}
- name: Build and Push Nginx Image
uses: https://github.com/docker/build-push-action@v5
uses: https://github.com/docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5
with:
context: .
file: docker/nginx/Dockerfile
@@ -11,15 +11,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: check out repository
uses: https://github.com/actions/checkout@v4
uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: get the previous chill version
# parse the composer.lock file using jq to get the chill version before the upgrade
id: chill-before
uses: https://github.com/sergeysova/jq-action@v2
uses: https://github.com/sergeysova/jq-action@a3f0d4ff59cc1dddf023fc0b325dd75b10deec58 # v2
with:
cmd: 'cat composer.lock | jq --raw-output ''.packages[] | select ( .name | contains ("chill-project/chill-bundles")) | .version'''
- name: run composer update to update composer.lock
uses: docker://gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:latest
uses: docker://gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:latest@sha256:d728a939475e465c488056ec8b9c12f31601ea27251aad830499577857b7be94
with:
# this is where we set the command to execute
args: composer update --no-install
@@ -29,30 +29,30 @@ jobs:
- name: get the new chill version
# parse the composer.lock file using jq to get the chill version after the upgrade
id: chill-after
uses: https://github.com/sergeysova/jq-action@v2
uses: https://github.com/sergeysova/jq-action@a3f0d4ff59cc1dddf023fc0b325dd75b10deec58 # v2
with:
cmd: 'cat composer.lock | jq --raw-output ''.packages[] | select ( .name | contains ("chill-project/chill-bundles")) | .version'''
- name: add a changie file for the upgrade
uses: https://github.com/miniscruff/changie-action@v2
uses: https://github.com/miniscruff/changie-action@6dcc2533cac0495148ed4046c438487e4dceaa23 # v2
if: ${{ steps.composer-lock-changed.outputs.is_composer_lock_changed == 1 }}
with:
version: latest
args: 'new --body "Update dependencies. Chill-bundles upgraded from ${{ steps.chill-before.outputs.value }} to ${{ steps.chill-after.outputs.value }}" --kind Release --custom "Issue=0"'
- name: changie batch
if: ${{ steps.composer-lock-changed.outputs.is_composer_lock_changed == 1 }}
uses: https://github.com/miniscruff/changie-action@v2
uses: https://github.com/miniscruff/changie-action@6dcc2533cac0495148ed4046c438487e4dceaa23 # v2
with:
version: latest
args: 'batch auto'
- name: changie merge
if: ${{ steps.composer-lock-changed.outputs.is_composer_lock_changed == 1 }}
uses: https://github.com/miniscruff/changie-action@v2
uses: https://github.com/miniscruff/changie-action@6dcc2533cac0495148ed4046c438487e4dceaa23 # v2
with:
version: latest
args: 'merge'
- name: commit changed files
if: ${{ steps.composer-lock-changed.outputs.is_composer_lock_changed == 1 }}
uses: https://github.com/stefanzweifel/git-auto-commit-action@v5
uses: https://github.com/stefanzweifel/git-auto-commit-action@b863ae1933cb653a53c021fe36dbb774e1fb9403 # v5
with:
commit_message: "update composer.lock and file (automatic update)"
commit_user_name: Action Bot
+1 -1
View File
@@ -1,4 +1,4 @@
docker/
###> symfony/framework-bundle ###
/.env.local
/.env.local.php
+8
View File
@@ -6,6 +6,14 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
and is generated by [Changie](https://github.com/miniscruff/changie).
## 2.13.6 - 2026-10-26
### DX
* Run container as www-data user instead of root
## 2.13.5 - 2026-10-21
### Security
* Update with patch for php vulnerability
## 2.13.4 - 2026-09-17
### DX
* Fix Dockerfile permissions to be able to write to the whole /var/www/app/ directory
+27 -20
View File
@@ -1,31 +1,38 @@
FROM chill/base-image:8.4-edge
FROM chill/base-image:8.4-edge@sha256:687302e53814b2016f17eba0ea69e0bbebff7c950b5ac707467f5500cf2643d5
# copy directories
# copy directories with ownership for the unprivileged runtime user
COPY --chown=www-data:www-data ./bin /var/www/app/bin/.
COPY --chown=www-data:www-data ./composer.* /var/www/app/
COPY --chown=www-data:www-data ./config /var/www/app/config/.
COPY --chown=www-data:www-data ./migrations /var/www/app/migrations/.
COPY --chown=www-data:www-data ./public /var/www/app/public/.
COPY --chown=www-data:www-data ./src /var/www/app/src/.
COPY --chown=www-data:www-data ./templates /var/www/app/templates/.
COPY --chown=www-data:www-data ./translations /var/www/app/translations/.
COPY --chown=www-data:www-data ./vendor /var/www/app/vendor/.
COPY ./bin /var/www/app/bin/.
COPY ./composer.* /var/www/app/
COPY ./config /var/www/app/config/.
COPY ./migrations /var/www/app/migrations/.
COPY ./public /var/www/app/public/.
COPY ./src /var/www/app/src/.
COPY ./templates /var/www/app/templates/.
COPY ./translations /var/www/app/translations/.
COPY ./vendor /var/www/app/vendor/.
COPY ./.env /var/www/app/.env
COPY --chown=www-data:www-data ./.env /var/www/app/.env
# import the manifest.json file
COPY ./public/build/manifest.json /var/www/app/public/build/manifest.json
COPY --chown=www-data:www-data ./public/build/manifest.json /var/www/app/public/build/manifest.json
ADD ./entrypoint.sh /.
COPY ./entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# - mark entrypoint executable
# - declare the FPM pool user/group at build time (was previously written by entrypoint.sh as root)
# - prepare writable Symfony var/ and COMPOSER_HOME directories for the unprivileged runtime user
RUN chmod +x /entrypoint.sh \
&& printf '[www]\nuser=www-data\ngroup=www-data\n' > /usr/local/etc/php-fpm.d/zz-user.conf \
&& mkdir -p /var/www/app/var/cache /var/www/app/var/log /var/www/app/.composer \
&& chown -R www-data:www-data /var/www/app/var /var/www/app/.composer \
&& chown www-data:www-data /var/www/app
# php-fpm listens on 9000 by default (unprivileged port)
EXPOSE 9000
USER www-data
ENTRYPOINT ["/entrypoint.sh"]
ENV PHP_FPM_USER=www-data \
PHP_FPM_GROUP=www-data \
COMPOSER_HOME=/var/www/app/.composer \
SESSION_LIFETIME=10800
ENV COMPOSER_HOME=/var/www/app/.composer
CMD [ "php-fpm" ]
+1 -1
View File
@@ -3,7 +3,7 @@ version: '3'
services:
###> symfony/mailer ###
mailer:
image: axllent/mailpit
image: axllent/mailpit@sha256:23a2ef85bc50853ab3093645d1d64679afd8887e89da5e48a88940c172591a4e
ports:
- "1025"
- "8025"
+2 -2
View File
@@ -17,9 +17,9 @@ services:
###> chill-project/chill-bundles ###
redis:
image: redis
image: redis@sha256:1f88291b4c57bdf249f02eb085a8669889b2d2954e91d4de5118a5da6b78dd53
relatorio:
image: registry.gitlab.com/champs-libres/public/relatorio-tornado/app:latest
image: registry.gitlab.com/champs-libres/public/relatorio-tornado/app:latest@sha256:2c4aa2f422c389d940adfd760b0856d237023d66cded0aa026b532b29192212e
###< chill-project/chill-bundles ###
volumes:
+1 -1
View File
@@ -1,4 +1,4 @@
FROM docker.elastic.co/logstash/logstash-oss:8.1.0-amd64
FROM docker.elastic.co/logstash/logstash-oss:8.1.0-amd64@sha256:f48c2f7db8b63572fa36db259c98c3894d89fb28d37f9546c26acfc0de525338
RUN \
bin/logstash-plugin install logstash-output-gelf \
+1 -1
View File
@@ -1,4 +1,4 @@
FROM nginx
FROM nginx@sha256:689fbc6acfefc8a172d86d5779265fd52dd82e8c6b0c68c7d4aa35734340eb2a
COPY ./public /var/www/app/public
-19
View File
@@ -16,23 +16,6 @@ else
echo "we assume the database is ready";
fi
if [ $(id -u) = "0" ]; then
{ \
echo "[www]"; \
echo ""; \
echo "user=${PHP_FPM_USER}"; \
echo "group=${PHP_FPM_GROUP}"; \
} > /usr/local/etc/php-fpm.d/zz-user.conf
fi
{ \
echo ""; \
echo "session.save_handler = redis" ; \
echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_PORT}?db=10\"" ; \
echo "session.gc_maxlifetime = ${SESSION_LIFETIME}" ; \
} >> /usr/local/etc/php/conf.d/custom.ini
if [ "${APP_ENV}" = "prod" ]; then
composer dump-env "${APP_ENV}"
chmod +r /var/www/app/.env.local.php
@@ -48,8 +31,6 @@ fi
if [ "${CLEAR_CACHE}" != "false" ]; then
#prepare cache
php /var/www/app/bin/console cache:clear --no-warmup
chgrp ${PHP_FPM_GROUP} /var/www/app/var/cache -R && chmod g+rw /var/www/app/var/cache -R
chgrp ${PHP_FPM_GROUP} /var/www/app/var/log -R && chmod g+rw /var/www/app/var/log -R
fi
exec "${@}"
+1 -1
View File
@@ -6,7 +6,7 @@
"devDependencies": {
"@symfony/ux-translator": "file:vendor/symfony/ux-translator/assets",
"bootstrap": "5.2.3",
"intl-messageformat": "^10.5.11"
"intl-messageformat": "10.7.18"
},
"scripts": {
"specs-build": "yaml-merge vendor/chill-project/chill-bundles/src/Bundle/ChillMainBundle/chill.api.specs.yaml vendor/chill-project/chill-bundles/src/Bundle/ChillPersonBundle/chill.api.specs.yaml vendor/chill-project/chill-bundles/src/Bundle/ChillCalendarBundle/chill.api.specs.yaml vendor/chill-project/chill-bundles/src/Bundle/ChillThirdPartyBundle/chill.api.specs.yaml vendor/chill-project/chill-bundles/src/Bundle/ChillDocStoreBundle/chill.api.specs.yaml> templates/api/specs.yaml",