Skip to content

Commit

Permalink
small delay in starting nginx to ensure upstreams have started and ca…
Browse files Browse the repository at this point in the history
…n accept connections
  • Loading branch information
fideloper committed Feb 21, 2024
1 parent b5ef7ab commit f2a8d80
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ COPY nginx/ /etc/nginx/
COPY fpm/ /etc/php/${PHP_VERSION}/fpm/
COPY supervisor/ /etc/supervisor/
COPY entrypoint.sh /entrypoint
COPY start-nginx.sh /usr/local/bin/start-nginx

WORKDIR /var/www/html

Expand Down
3 changes: 3 additions & 0 deletions src/start-nginx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

sleep 0.25 && exec nginx
2 changes: 1 addition & 1 deletion src/supervisor/conf.d/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ autostart=true
autorestart=true
stdout_events_enabled=true
stderr_events_enabled=true
command=nginx
command=/usr/local/bin/start-nginx
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
Expand Down

0 comments on commit f2a8d80

Please sign in to comment.