Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ COPY ./root-fs/etc/php/8.x/fpm/pool.d/www.conf /etc/php$VERSION/php-fpm.d/
COPY ./root-fs/etc/nginx/nginx.conf /etc/nginx/nginx.conf

ARG EDITION
ARG DEV=0

RUN if [ -n "$EDITION" ]; then \
echo "EDITION=$EDITION" > /app/.env; \
fi
Expand All @@ -101,6 +103,15 @@ RUN ln -sf /usr/sbin/php-fpm$VERSION /usr/bin/php-fpm \
&& touch /app/.env \
&& chown $USER:$GROUPNAME /app/.env \
&& chmod 660 /app/.env

RUN if [ "$DEV" -eq "1" ]; then \
apk add --no-cache \
php$VERSION-xdebug \
iputils \
curl \
&& ln -s /app/conf/99-bluespice-dev.ini /etc/php$VERSION/conf.d/99-bluespice-dev.ini \
fi

FROM bluespice-prepare AS bluespice-final
WORKDIR /app
USER bluespice
Expand Down
17 changes: 17 additions & 0 deletions root-fs/app/conf/99-bluespice-dev.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# PHP ini for development
display_errors=on
display_startup_errors = On
error_reporting=E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED & ~E_WARNING & ~E_USER_NOTICE & ~E_USER_DEPRECATED & ~E_USER_WARNING
error_log = /dev/stderr

# Enable xdebug
xdebug.mode=develop,coverage,debug
# profile mode might bring a lot of /tmp/cachegrind.out.xxx
# when running for longer hours, it might eat up disk space
# enable profile mode only when needed
xdebug.idekey=VSCODE
xdebug.start_with_request=yes
xdebug.client_host=host.docker.internal
xdebug.client_port=9003
xdebug.log=/dev/stdout
xdebug.log_level=0