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
refactor(Dockerfile): streamline RUN commands for improved readability and maintainability by adding line continuations
Andras Bacsai3803bac2aae6
diff --git a/docker/production/Dockerfile b/docker/production/Dockerfileindex e7ba549f50..b7d571a8a7 100644--- a/docker/production/Dockerfile+++ b/docker/production/Dockerfile@@ -22,7 +22,7 @@ USER rootARG USER_IDARG GROUP_ID-RUN docker-php-serversideup-set-id www-data $USER_ID:$GROUP_ID &&+RUN docker-php-serversideup-set-id www-data $USER_ID:$GROUP_ID && \docker-php-serversideup-set-file-permissions --owner $USER_ID:$GROUP_ID --service nginxWORKDIR /var/www/html@@ -64,13 +64,13 @@ WORKDIR /var/www/htmlUSER root-RUN docker-php-serversideup-set-id www-data $USER_ID:$GROUP_ID &&+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# Install PostgreSQL repository and keys-RUN apk add --no-cache gnupg &&- mkdir -p /usr/share/keyrings &&- curl -fSsL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor >/usr/share/keyrings/postgresql.gpg+RUN apk add --no-cache gnupg && \+ mkdir -p /usr/share/keyrings && \+ curl -fSsL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor > /usr/share/keyrings/postgresql.gpg# Install system dependenciesRUN apk add --no-cache \@@ -83,17 +83,17 @@ RUN apk add --no-cache \vim# Configure shell aliases-RUN echo "alias ll='ls -al'" >>/etc/profile &&- echo "alias a='php artisan'" >>/etc/profile &&- echo "alias logs='tail -f storage/logs/laravel.log'" >>/etc/profile+RUN echo "alias ll='ls -al'" >> /etc/profile && \+ echo "alias a='php artisan'" >> /etc/profile && \+ echo "alias logs='tail -f storage/logs/laravel.log'" >> /etc/profile# Install Cloudflared based on architecture-RUN mkdir -p /usr/local/bin &&- if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then- curl -sSL "https://github.com/cloudflare/cloudflared/releases/download/${CLOUDFLARED_VERSION}/cloudflared-linux-amd64" -o /usr/local/bin/cloudflared- elif [ "${TARGETPLATFORM}" = "linux/arm64" ]; then- curl -sSL "https://github.com/cloudflare/cloudflared/releases/download/${CLOUDFLARED_VERSION}/cloudflared-linux-arm64" -o /usr/local/bin/cloudflared- fi &&+RUN mkdir -p /usr/local/bin && \+ if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then \+ curl -sSL "https://github.com/cloudflare/cloudflared/releases/download/${CLOUDFLARED_VERSION}/cloudflared-linux-amd64" -o /usr/local/bin/cloudflared; \+ elif [ "${TARGETPLATFORM}" = "linux/arm64" ]; then \+ curl -sSL "https://github.com/cloudflare/cloudflared/releases/download/${CLOUDFLARED_VERSION}/cloudflared-linux-arm64" -o /usr/local/bin/cloudflared; \+ fi && \chmod +x /usr/local/bin/cloudflared# Configure PHP@@ -129,8 +129,8 @@ COPY docker/production/etc/nginx/conf.d/custom.conf /etc/nginx/conf.d/custom.conCOPY docker/production/etc/nginx/site-opts.d/http.conf /etc/nginx/site-opts.d/http.confCOPY --chmod=755 docker/production/etc/s6-overlay/ /etc/s6-overlay/-RUN mkdir -p /etc/nginx/conf.d &&- chown -R www-data:www-data /etc/nginx &&+RUN mkdir -p /etc/nginx/conf.d && \+ chown -R www-data:www-data /etc/nginx && \chmod -R 755 /etc/nginx# Install MinIO client