Created
November 10, 2021 17:36
-
-
Save abdennour/f38c429d53993ad79fb0dbc3d1ba7f70 to your computer and use it in GitHub Desktop.
Revisions
-
abdennour created this gist
Nov 10, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ FROM nginx:1.19-alpine-perl ENV NGINX_ENVSUBST_OUTPUT_DIR=/etc/nginx COPY my-nginx.conf.template /etc/nginx/templates/ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ version: '3' services: app: build: . environment: INGRESS_HOSTNAME: git.example.com BACKEND_HOSTNAME: 192.168.11.34 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,32 @@ user nginx; worker_processes auto; error_log /var/log/nginx/error.log warn; 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; server { listen 80; location / { proxy_set_header Host "$INGRESS_HOSTNAME"; proxy_pass http://$BACKEND_HOSTNAME; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } }