Skip to content

Commit

Permalink
add default nginx config and update
Browse files Browse the repository at this point in the history
  • Loading branch information
jungrafael committed Dec 19, 2023
1 parent 4d01c70 commit 58030df
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
install: true
-
name: Build and push with Buildx
run: docker build --platform linux/amd64,linux/arm64 . --tag jungsoft/alpine-nginx-forward-proxy --tag jungsoft/alpine-nginx-forward-proxy:1.23.1 --push
run: docker build --platform linux/amd64,linux/arm64 . --tag jungsoft/alpine-nginx-forward-proxy --tag jungsoft/alpine-nginx-forward-proxy:1.25.3 --push
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM alpine:3.16

ENV NGINX_VERSION 1.23.1
ENV NGINX_VERSION 1.25.3

RUN apk update && apk add curl gettext bash
RUN apk add --virtual nginx \
Expand All @@ -23,4 +23,8 @@ RUN curl -LSs http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz -O

# RUN apk del nginx

COPY nginx.conf.default /usr/local/nginx/conf/nginx.conf

WORKDIR /

CMD ["nginx", "-g", "daemon off;"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ This docker image was created to have nginx running in alpine, with ngx_http_pro

This image was built using

`docker build --platform linux/amd64,linux/arm64 . --tag jungsoft/alpine-nginx-forward-proxy --tag jungsoft/alpine-nginx-forward-proxy:1.23.1 --push`
`docker build --platform linux/amd64,linux/arm64 . --tag jungsoft/alpine-nginx-forward-proxy --tag jungsoft/alpine-nginx-forward-proxy:1.25.3 --push`
38 changes: 38 additions & 0 deletions nginx.conf.default
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
worker_processes 1;

http {
include mime.types;

map $http_user_agent $log_ua {
~healthcheck 0;

default 1;
}

server {
listen 8080;

allow 10.0.0.0/8;
deny all;

access_log /var/log/proxy_access.log combined if=$log_ua;
access_log /dev/stdout;
error_log /dev/stderr;

resolver 1.1.1.1 ipv6=off;

proxy_connect;
proxy_connect_allow 443 563;
proxy_connect_connect_timeout 60s;
proxy_connect_read_timeout 60s;
proxy_connect_send_timeout 60s;

location / {
client_max_body_size 0;
proxy_http_version 1.1;
proxy_set_header Host $host;

proxy_pass http://$host;
}
}
}

0 comments on commit 58030df

Please sign in to comment.