Skip to content

Commit

Permalink
ci: améliorer le Dockerfile et la configuration de supervisord pour f…
Browse files Browse the repository at this point in the history
…rankenphp
  • Loading branch information
arnaud-ritti committed Dec 2, 2024
1 parent 503181e commit c25cc59
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
13 changes: 8 additions & 5 deletions php/Dockerfile.frankenphp
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@ LABEL org.opencontainers.image.description="PHP ${PHP_VERSION} Docker image with

ARG USER="www-data"

ARG USER=www-data

RUN \
useradd -D ${USER}; \
setcap CAP_NET_BIND_SERVICE=+eip /usr/local/bin/frankenphp; \
chown -R ${USER}:${USER} /var/www/html \
chown -R ${USER}:${USER} /data/caddy \
chown -R ${USER}:${USER} /config/caddy
# Use "adduser -D ${USER}" for alpine based distros
useradd -D ${USER}; \
# Add additional capability to bind to port 80 and 443
setcap CAP_NET_BIND_SERVICE=+eip /usr/local/bin/frankenphp; \
# Give write access to /data/caddy and /config/caddy
chown -R ${USER}:${USER} /data/caddy && chown -R ${USER}:${USER} /config/caddy && chown -R ${USER}:${USER} /var/www/html

ENV COMPOSER_ALLOW_SUPERUSER='1'
ENV COMPOSER_MEMORY_LIMIT='-1'
Expand Down
1 change: 1 addition & 0 deletions php/config/supervisord/frankenphp.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[program:frankenphp]
command=frankenphp run --config /etc/caddy/Caddyfile --adapter caddyfile
user=www-data
autostart=true
autorestart=true
priority=10
Expand Down

0 comments on commit c25cc59

Please sign in to comment.