An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
fix(docker): install patched nginx from official repository
Andras Bacsai0917bb7b8efc
diff --git a/docker/development/Dockerfile b/docker/development/Dockerfileindex dc9a06c1e7..114a25828f 100644--- a/docker/development/Dockerfile+++ b/docker/development/Dockerfile@@ -8,6 +8,8 @@ ARG CLOUDFLARED_VERSION=2025.7.0# https://www.postgresql.org/support/versioning/# Note: We are using version 18 of the postgres client (while still using postgres 15 for the postgres server) as version 15 has been removed from Alpine 3.23+ https://pkgs.alpinelinux.org/packages?name=postgresql*-client&branch=v3.23&repo=&arch=x86_64&origin=&flagged=&maintainer=ARG POSTGRES_VERSION=18+# https://nginx.org/en/linux_packages.html+ARG NGINX_VERSION=1.31.0-r1# =================================================================# Get MinIO client@@ -24,11 +26,23 @@ ARG GROUP_IDARG TARGETPLATFORMARG POSTGRES_VERSIONARG CLOUDFLARED_VERSION+ARG NGINX_VERSIONWORKDIR /var/www/htmlUSER root+# Install patched Nginx from the official nginx.org Alpine repository+RUN set -eux; \+ apk add --no-cache ca-certificates curl; \+ NGINX_ALPINE_VERSION="$(egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release)"; \+ NGINX_REPOSITORY="https://nginx.org/packages/mainline/alpine/v${NGINX_ALPINE_VERSION}/main"; \+ sed -i 's|http://nginx.org/packages|https://nginx.org/packages|g' /etc/apk/repositories; \+ grep -qxF "@nginx ${NGINX_REPOSITORY}" /etc/apk/repositories || echo "@nginx ${NGINX_REPOSITORY}" >> /etc/apk/repositories; \+ curl -fsSL https://nginx.org/keys/nginx_signing.rsa.pub -o /etc/apk/keys/nginx_signing.rsa.pub; \+ apk add --no-cache --upgrade "nginx@nginx=${NGINX_VERSION}"; \+ nginx -v+RUN docker-php-serversideup-set-id www-data $USER_ID:$GROUP_ID && \docker-php-serversideup-set-file-permissions --owner $USER_ID:$GROUP_ID --service nginx@@ -38,7 +52,6 @@ RUN apk upgrade --no-cache && \mkdir -p /usr/share/keyrings && \curl -fSsL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor > /usr/share/keyrings/postgresql.gpg-RUN sed -i 's|http://nginx.org/packages|https://nginx.org/packages|g' /etc/apk/repositories# Install system dependenciesRUN apk add --no-cache \diff --git a/docker/production/Dockerfile b/docker/production/Dockerfileindex a01dd595cb..56a51373bb 100644--- a/docker/production/Dockerfile+++ b/docker/production/Dockerfile@@ -8,6 +8,8 @@ ARG CLOUDFLARED_VERSION=2025.7.0# https://www.postgresql.org/support/versioning/# Note: We are using version 18 of the postgres client (while still using postgres 15 for the postgres server) as version 15 has been removed from Alpine 3.23+ https://pkgs.alpinelinux.org/packages?name=postgresql*-client&branch=v3.23&repo=&arch=x86_64&origin=&flagged=&maintainer=ARG POSTGRES_VERSION=18+# https://nginx.org/en/linux_packages.html+ARG NGINX_VERSION=1.31.0-r1# Add user/groupARG USER_ID=9999@@ -20,6 +22,18 @@ FROM serversideup/php:${SERVERSIDEUP_PHP_VERSION} AS baseUSER root+# Install patched Nginx from the official nginx.org Alpine repository+ARG NGINX_VERSION+RUN set -eux; \+ apk add --no-cache ca-certificates curl; \+ NGINX_ALPINE_VERSION="$(egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release)"; \+ NGINX_REPOSITORY="https://nginx.org/packages/mainline/alpine/v${NGINX_ALPINE_VERSION}/main"; \+ sed -i 's|http://nginx.org/packages|https://nginx.org/packages|g' /etc/apk/repositories; \+ grep -qxF "@nginx ${NGINX_REPOSITORY}" /etc/apk/repositories || echo "@nginx ${NGINX_REPOSITORY}" >> /etc/apk/repositories; \+ curl -fsSL https://nginx.org/keys/nginx_signing.rsa.pub -o /etc/apk/keys/nginx_signing.rsa.pub; \+ apk add --no-cache --upgrade "nginx@nginx=${NGINX_VERSION}"; \+ nginx -v+ARG USER_IDARG GROUP_ID@@ -60,12 +74,24 @@ ARG GROUP_IDARG TARGETPLATFORMARG POSTGRES_VERSIONARG CLOUDFLARED_VERSION+ARG NGINX_VERSIONARG CI=trueWORKDIR /var/www/htmlUSER root+# Install patched Nginx from the official nginx.org Alpine repository+RUN set -eux; \+ apk add --no-cache ca-certificates curl; \+ NGINX_ALPINE_VERSION="$(egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release)"; \+ NGINX_REPOSITORY="https://nginx.org/packages/mainline/alpine/v${NGINX_ALPINE_VERSION}/main"; \+ sed -i 's|http://nginx.org/packages|https://nginx.org/packages|g' /etc/apk/repositories; \+ grep -qxF "@nginx ${NGINX_REPOSITORY}" /etc/apk/repositories || echo "@nginx ${NGINX_REPOSITORY}" >> /etc/apk/repositories; \+ curl -fsSL https://nginx.org/keys/nginx_signing.rsa.pub -o /etc/apk/keys/nginx_signing.rsa.pub; \+ apk add --no-cache --upgrade "nginx@nginx=${NGINX_VERSION}"; \+ nginx -v+RUN docker-php-serversideup-set-id www-data $USER_ID:$GROUP_ID && \docker-php-serversideup-set-file-permissions --owner $USER_ID:$GROUP_ID --service nginx