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