This commit is contained in:
Simon Larsen 2024-01-28 16:23:52 +00:00
parent d101114480
commit 29e2ac1b53
No known key found for this signature in database
GPG Key ID: AB45983AA9C81CDE
3 changed files with 42 additions and 4 deletions

View File

@ -11,4 +11,11 @@ ENV APP_VERSION=${APP_VERSION}
# Install bash.
RUN apk add bash && apk add curl
COPY ./Nginx/default.conf.template /etc/nginx/templates/default.conf.template
# Install NJS module
RUN apk add nginx-module-njs
COPY ./Nginx/customssl.js /etc/nginx/customssl.js
COPY ./Nginx/default.conf.template /etc/nginx/templates/default.conf.template
COPY ./Nginx/nginx.conf /etc/nginx/nginx.conf

View File

@ -1,10 +1,7 @@
error_log /var/log/nginx/error.log debug;
upstream accounts {
server ${SERVER_ACCOUNTS_HOSTNAME}:${ACCOUNTS_PORT} weight=10 max_fails=3 fail_timeout=30s;
}
upstream app {
server ${SERVER_APP_HOSTNAME}:${APP_PORT} weight=10 max_fails=3 fail_timeout=30s;
}

34
Nginx/nginx.conf Normal file
View File

@ -0,0 +1,34 @@
load_module modules/ngx_http_js_module.so;
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
include /etc/nginx/conf.d/*.conf;
}