mirror of
https://github.com/ets-cfuhrman-pfe/EvalueTonSavoir.git
synced 2025-08-11 21:23:54 -04:00
added dev router t
This commit is contained in:
parent
0f8e1dae39
commit
26986eaf82
6 changed files with 38 additions and 4 deletions
4
.github/workflows/deploy.yml
vendored
4
.github/workflows/deploy.yml
vendored
|
|
@ -20,7 +20,7 @@ jobs:
|
||||||
- name: Build and Push Docker image for Router
|
- name: Build and Push Docker image for Router
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
context: ./nginx
|
context: ./nginx/prod
|
||||||
file: ./nginx/Dockerfile
|
file: ./nginx/prod/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_ROUTER_REPO }}:latest
|
tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_ROUTER_REPO }}:latest
|
||||||
|
|
|
||||||
4
.github/workflows/dev_deploy.yml
vendored
4
.github/workflows/dev_deploy.yml
vendored
|
|
@ -20,7 +20,7 @@ jobs:
|
||||||
- name: Build and Push Docker image for Router
|
- name: Build and Push Docker image for Router
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
context: ./nginx
|
context: ./nginx/dev
|
||||||
file: ./nginx/Dockerfile
|
file: ./nginx/dev/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/dev_${{ secrets.DOCKERHUB_ROUTER_REPO }}:latest
|
tags: ${{ secrets.DOCKERHUB_USERNAME }}/dev_${{ secrets.DOCKERHUB_ROUTER_REPO }}:latest
|
||||||
|
|
|
||||||
31
nginx/dev/default.conf
Normal file
31
nginx/dev/default.conf
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
upstream frontend {
|
||||||
|
server frontend:5174;
|
||||||
|
}
|
||||||
|
|
||||||
|
upstream backend {
|
||||||
|
server backend:3001;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 8080;
|
||||||
|
|
||||||
|
location /api {
|
||||||
|
rewrite /backend/(.*) /$1 break;
|
||||||
|
proxy_pass http://backend;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /socket.io {
|
||||||
|
rewrite /backend/(.*) /$1 break;
|
||||||
|
proxy_pass http://backend;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "Upgrade";
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_hide_header 'Access-Control-Allow-Origin';
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass http://frontend;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
3
nginx/prod/Dockerfile
Normal file
3
nginx/prod/Dockerfile
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
FROM nginx
|
||||||
|
|
||||||
|
COPY ./default.conf /etc/nginx/conf.d/default.conf
|
||||||
Loading…
Reference in a new issue