「🏗️」 wip: work in progress, not done yet.
This commit is contained in:
@ -13,12 +13,12 @@ RUN set -x \
|
||||
VOLUME /etc/nginx
|
||||
RUN mkdir -p /etc/nginx/sites-available
|
||||
|
||||
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
||||
RUN [ "chmod", "+x", "/docker-entrypoint.sh" ]
|
||||
COPY docker-healthcheck.sh /docker-healthcheck.sh
|
||||
RUN chmod +x /docker-healthcheck.sh
|
||||
|
||||
ENTRYPOINT [ "/docker-entrypoint.sh" ]
|
||||
WORKDIR /etc/nginx
|
||||
STOPSIGNAL SIGQUIT
|
||||
|
||||
EXPOSE 80
|
||||
CMD [ "nginx", "-g", "daemon off;" ]
|
||||
HEALTHCHECK --interval=30s --timeout=10s --retries=3 CMD /docker-healthcheck.sh
|
||||
|
@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
exec "$@"
|
3
docker/nginx/docker-healthcheck.sh
Normal file
3
docker/nginx/docker-healthcheck.sh
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
curl -f http://localhost/health || exit 1
|
33
docker/nginx/nginx-health.conf
Normal file
33
docker/nginx/nginx-health.conf
Normal file
@ -0,0 +1,33 @@
|
||||
user nginx;
|
||||
worker_processes 1;
|
||||
|
||||
error_log /var/log/nginx/error.log warn;
|
||||
pid /var/run/nginx/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
sendfile on;
|
||||
access_log /var/log/nginx/access.log;
|
||||
keepalive_timeout 3000;
|
||||
server {
|
||||
listen 80;
|
||||
root /www;
|
||||
index index.php index.html index.htm;
|
||||
server_name localhost;
|
||||
client_max_body_size 32m;
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /var/lib/nginx/html;
|
||||
}
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi.conf;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user