mirror of
https://github.com/ets-cfuhrman-pfe/EvalueTonSavoir.git
synced 2025-08-11 21:23:54 -04:00
Merge pull request #46 from louis-antoine-etsmtl/dev-staging
added dev router t
This commit is contained in:
commit
2fe28753cd
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
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: ./nginx
|
||||
file: ./nginx/Dockerfile
|
||||
context: ./nginx/prod
|
||||
file: ./nginx/prod/Dockerfile
|
||||
push: true
|
||||
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
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: ./nginx
|
||||
file: ./nginx/Dockerfile
|
||||
context: ./nginx/dev
|
||||
file: ./nginx/dev/Dockerfile
|
||||
push: true
|
||||
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