From df35862de7d43cbcf686fffc216275268ef2313c Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Fri, 5 Jun 2026 18:50:08 -0500 Subject: [PATCH] up --- Dockerfile | 5 ++++- docker/entrypoint.sh | 13 +++++++++++++ docker/nginx.conf | 6 ++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 docker/entrypoint.sh diff --git a/Dockerfile b/Dockerfile index 92c9235..a6c707d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -65,8 +65,10 @@ RUN mkdir -p bootstrap/cache storage/framework/views storage/framework/cache sto COPY docker/nginx.conf /etc/nginx/http.d/default.conf COPY docker/supervisord.conf /etc/supervisor.conf +COPY docker/entrypoint.sh /entrypoint.sh -RUN printf '[www]\nlisten = 127.0.0.1:9000\n' > /usr/local/etc/php-fpm.d/zz-opencode.conf \ +RUN chmod +x /entrypoint.sh \ + && printf '[www]\nlisten = 127.0.0.1:9000\nclear_env = no\n' > /usr/local/etc/php-fpm.d/zz-opencode.conf \ && php-fpm -t \ && nginx -t \ && echo "* * * * * php /app/artisan schedule:run >> /dev/null 2>&1" > /etc/crontabs/www-data @@ -75,4 +77,5 @@ EXPOSE 80 STOPSIGNAL SIGQUIT +ENTRYPOINT ["/entrypoint.sh"] CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor.conf"] diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh new file mode 100644 index 0000000..a0223ed --- /dev/null +++ b/docker/entrypoint.sh @@ -0,0 +1,13 @@ +#!/bin/sh +set -e + +if [ ! -f /app/.env ]; then + env | while IFS='=' read -r key val; do + case "$key" in + HOME|PATH|HOSTNAME|TERM|PHP_*|SUPERVISOR_*|COOLIFY_*) ;; + *) printf '%s=%s\n' "$key" "$val" >> /app/.env ;; + esac + done +fi + +exec "$@" \ No newline at end of file diff --git a/docker/nginx.conf b/docker/nginx.conf index c6f177a..b17d5ac 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -1,4 +1,5 @@ error_log /dev/stderr warn; +access_log /dev/stdout; server { listen 80; @@ -18,6 +19,11 @@ server { error_page 404 /index.php; + location = /ping { + return 200 "pong\n"; + add_header Content-Type text/plain; + } + location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;