-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1949184
commit 85a3cd5
Showing
9 changed files
with
511 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
**/node_modules | ||
**/dist |
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM node:10 | ||
COPY ./ /app | ||
WORKDIR /app | ||
RUN npm install && npm run build | ||
|
||
FROM nginx | ||
RUN mkdir /app | ||
COPY --from=0 /app/dist /app | ||
COPY nginx.conf /etc/nginx/nginx.conf |
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
user nginx; | ||
worker_processes 1; | ||
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; | ||
keepalive_timeout 65; | ||
server { | ||
listen 8080; | ||
server_name localhost; | ||
location / { | ||
root /app; | ||
index index.html; | ||
try_files $uri $uri/ /index.html; | ||
} | ||
error_page 500 502 503 504 /50x.html; | ||
location = /50x.html { | ||
root /usr/share/nginx/html; | ||
} | ||
} | ||
|
||
server { | ||
|
||
# Listen to HTTPS on 443 and allow HTTP/2 | ||
listen 443 ssl http2 default; | ||
|
||
# Path to the chain and privkey (Let's Encrypt) | ||
ssl_certificate /certs/fullchain.pem; | ||
ssl_certificate_key /certs/privkey.pem; | ||
|
||
# Improve HTTPS performance with session resumption | ||
ssl_session_timeout 1d; | ||
ssl_session_cache shared:SSL:50m; | ||
ssl_session_tickets off; | ||
|
||
# Enable server-side protection against BEAST attacks | ||
ssl_protocols TLSv1.2; | ||
ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256'; | ||
ssl_prefer_server_ciphers on; | ||
|
||
# Diffie-Hellman parameter for DHE ciphersuites | ||
# $ openssl dhparam -out dhparam.pem 4096 | ||
ssl_dhparam /certs/dhparam.pem; | ||
|
||
# Enable OCSP stapling (http://blog.mozilla.org/security/2013/07/29/ocsp-stapling-in-firefox) | ||
# uses Google DNS servers | ||
ssl_stapling on; | ||
ssl_stapling_verify on; | ||
ssl_trusted_certificate /certs/fullchain.pem; | ||
resolver 8.8.8.8 8.8.4.4 valid=300s; | ||
resolver_timeout 5s; | ||
|
||
# Logging in a container | ||
access_log /dev/stdout; | ||
error_log stderr error; | ||
error_log /dev/stdout info; | ||
|
||
root /application/public/; | ||
index index.html index.htm; | ||
|
||
charset utf-8; | ||
} | ||
} |
This file contains 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 characters
Oops, something went wrong.