-
Notifications
You must be signed in to change notification settings - Fork 0
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
59c05c2
commit 826cb2c
Showing
2 changed files
with
25 additions
and
35 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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
FROM nginx:stable | ||
|
||
COPY dist/angular-frontend /usr/share/nginx/html | ||
COPY nginx.conf /etc/nginx/conf.d/default.conf | ||
RUN mkdir /etc/nginx/templates | ||
COPY nginx.conf /etc/nginx/templates/default.conf.template | ||
|
||
EXPOSE 80 |
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 |
---|---|---|
@@ -1,39 +1,28 @@ | ||
http { | ||
map $http_upgrade $connection_upgrade { | ||
default upgrade; | ||
'' close; | ||
} | ||
|
||
# upstream websocket { | ||
# server 192.168.100.10:8080; | ||
# } | ||
|
||
server { | ||
listen 80; | ||
sendfile on; | ||
default_type application/octet-stream; | ||
server { | ||
listen 80; | ||
sendfile on; | ||
default_type application/octet-stream; | ||
|
||
gzip on; | ||
gzip_http_version 1.1; | ||
gzip_disable "MSIE [1-6]\."; | ||
gzip_min_length 256; | ||
gzip_vary on; | ||
gzip_proxied expired no-cache no-store private auth; | ||
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; | ||
gzip_comp_level 9; | ||
gzip on; | ||
gzip_http_version 1.1; | ||
gzip_disable "MSIE [1-6]\."; | ||
gzip_min_length 256; | ||
gzip_vary on; | ||
gzip_proxied expired no-cache no-store private auth; | ||
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; | ||
gzip_comp_level 9; | ||
|
||
root /usr/share/nginx/html; | ||
root /usr/share/nginx/html; | ||
|
||
location / { | ||
try_files $uri $uri/ /index.html =404; | ||
} | ||
location / { | ||
try_files $uri $uri/ /index.html =404; | ||
} | ||
|
||
location ~ \/(connect|app|topic)\/ { | ||
proxy_pass ${SPRING_BACKEND}; | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection $connection_upgrade; | ||
proxy_set_header Host $host; | ||
} | ||
location ~ \/(connect|app|topic)\/ { | ||
proxy_pass ${SPRING_BACKEND}; | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection $connection_upgrade; | ||
proxy_set_header Host $host; | ||
} | ||
} | ||
} |