-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: simvalery <[email protected]>
- Loading branch information
Showing
2 changed files
with
53 additions
and
0 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,18 @@ | ||
FROM node:16 as frontendBuilder | ||
WORKDIR /usr/local/interfaces | ||
COPY ./interfaces/package*.json /usr/local/interfaces/ | ||
COPY ./interfaces/tsconfig.json /usr/local/interfaces/ | ||
RUN npm install | ||
ADD ./interfaces/src/ /usr/local/interfaces/src/. | ||
RUN npm run build | ||
WORKDIR /usr/local/frontend | ||
COPY ./frontend/. /usr/local/frontend | ||
RUN npm install | ||
RUN npm run build | ||
|
||
FROM nginx:latest | ||
ENV PLATFORM="docker" | ||
COPY ./web-proxy/configs/default.conf /etc/nginx/conf.d/image.conf | ||
COPY --from=frontendBuilder /usr/local/frontend/dist/guardian /usr/share/nginx/html | ||
|
||
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
server { | ||
listen 80; | ||
listen [::]:80; | ||
server_name localhost; | ||
|
||
location /ws/ { | ||
proxy_pass http://$ENV{"GATEWAY_HOST"}:$ENV{"GATEWAY_PORT"}; | ||
proxy_set_header Host $host; | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection "upgrade"; | ||
proxy_read_timeout 600s; | ||
} | ||
|
||
location /api/v1/ { | ||
proxy_pass http://$ENV{"GATEWAY_HOST"}:$ENV{"GATEWAY_PORT"}/; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
proxy_set_header Surrogate-Control no-store; | ||
proxy_set_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate"; | ||
proxy_set_header Pragma no-cache; | ||
proxy_set_header Expires 0; | ||
proxy_redirect off; | ||
proxy_read_timeout 600s; | ||
proxy_connect_timeout 600s; | ||
proxy_send_timeout 600s; | ||
} | ||
|
||
location / { | ||
root /usr/share/nginx/html; | ||
try_files $uri $uri/ /index.html; | ||
} | ||
} |