diff options
Diffstat (limited to 'reverse-proxy')
-rw-r--r-- | reverse-proxy/Dockerfile | 10 | ||||
-rw-r--r-- | reverse-proxy/conf.d/nginx.conf | 77 |
2 files changed, 87 insertions, 0 deletions
diff --git a/reverse-proxy/Dockerfile b/reverse-proxy/Dockerfile new file mode 100644 index 0000000..9b76a39 --- /dev/null +++ b/reverse-proxy/Dockerfile @@ -0,0 +1,10 @@ +# syntax=docker/dockerfile:1 + + +# +# NGINX phase +# +FROM nginx:alpine + +COPY ./conf.d/nginx.conf /etc/nginx/templates/default.conf.tmpl + diff --git a/reverse-proxy/conf.d/nginx.conf b/reverse-proxy/conf.d/nginx.conf new file mode 100644 index 0000000..43152cb --- /dev/null +++ b/reverse-proxy/conf.d/nginx.conf @@ -0,0 +1,77 @@ +server { + + listen 80; + server_name ${FRONTEND_DOMAIN}; + + ########################## + # Comment when using SSL # + ########################## + + location / { + proxy_pass http://pse-frontend:80; + } + + ############################ + # Uncomment when using SSL # + ############################ + + # location /.well-known/acme-challenge/ { + # root /letsencrypt/; + # } + + # return 301 https://${FRONTEND_DOMAIN}$request_uri; +} + +server { + + listen 80; + server_name ${BACKEND_DOMAIN}; + + ########################## + # Comment when using SSL # + ########################## + + location / { + proxy_pass http://pse-backend:8080; + } + + ############################ + # Uncomment when using SSL # + ############################ + + # location /.well-known/acme-challenge/ { + # root /letsencrypt/; + # } + + # return 301 https://${BACKEND_DOMAIN}$request_uri; +} + +############################ +# Uncomment when using SSL # +############################ + +# server { +# listen 443 ssl http2; +# listen [::]:443 ssl http2; +# server_name ${FRONTEND_DOMAIN}; +# # use the certificates +# ssl_certificate /etc/letsencrypt/live/${FRONTEND_DOMAIN}/fullchain.pem; +# ssl_certificate_key /etc/letsencrypt/live/${FRONTEND_DOMAIN}/privkey.pem; + +# location / { +# proxy_pass http://pse-frontend:80; +# } +# } + +# server { +# listen 443 ssl http2; +# listen [::]:443 ssl http2; +# server_name ${BACKEND_DOMAIN}; +# # use the certificates +# ssl_certificate /etc/letsencrypt/live/${FRONTEND_DOMAIN}/fullchain.pem; +# ssl_certificate_key /etc/letsencrypt/live/${FRONTEND_DOMAIN}/privkey.pem; + +# location / { +# proxy_pass http://pse-backend:8080; +# } +# }
\ No newline at end of file |