Added nginx configurations
Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
parent
726246778a
commit
7c7bf51415
@ -62,6 +62,7 @@ COPY /ketrface /website/ketrface
|
||||
SHELL [ "/bin/bash", "-c" ]
|
||||
|
||||
ARG DEVELOPMENT=
|
||||
RUN cp /website/server/nginx.conf /etc/nginx/sites-enabled/default
|
||||
|
||||
# If not DEVELOPMENT mode, copy production config, else development
|
||||
RUN \
|
||||
@ -83,6 +84,7 @@ RUN \
|
||||
fi
|
||||
|
||||
COPY /scripts /opt/scripts
|
||||
ENV PATH="${PATH}:/opt/scripts"
|
||||
|
||||
# In DEVELOPMENT mode, entrypoint launches 'npm start'
|
||||
COPY /entrypoint.sh /
|
||||
|
@ -20,6 +20,7 @@ services:
|
||||
- ${PORT}:80 # nginx -> server/app.js express app
|
||||
- 127.0.0.1:14200:4200 # shellinabox
|
||||
volumes:
|
||||
- /etc/nginx/ssl:/etc/nginx/ssl:ro # Use host web keys
|
||||
- ${PICTURES}:/pictures
|
||||
- ${PWD}/db:/website/db
|
||||
- ${PWD}/config/local.json:/website/config/local.json
|
||||
|
@ -1,5 +1,5 @@
|
||||
# DEVELOPMENT -- use npm development server on port 3000 (entrypoint.sh)
|
||||
location / {
|
||||
location /identities {
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
@ -44,7 +44,7 @@ server {
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_pass https://localhost:8123/;
|
||||
proxy_pass http://localhost:8123/; # server/app.js - no HTTPS
|
||||
}
|
||||
|
||||
location ~ /(db|conf) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
# PRODUCTION -- pre-built source
|
||||
location / {
|
||||
location /identities {
|
||||
try_files $uri $uri/ =404;
|
||||
alias /website/client/build/;
|
||||
index index.html;
|
||||
|
Loading…
x
Reference in New Issue
Block a user