🐛 FIX: Reverts

This commit is contained in:
Yuri-Lima
2023-08-28 10:49:34 +00:00
parent 95d413c277
commit 7df58fe38b
2 changed files with 23 additions and 44 deletions

View File

@@ -18,23 +18,8 @@ services:
ports:
- "8083:80"
# - "443:443"
labels:
- "traefik.enable=true"
- "traefik.http.routers.phxalpha.entrypoints=https"
- "traefik.http.routers.phxalpha.rule=Host(`phx.yurilima.uk`)"
- "traefik.http.routers.phxalpha.middlewares=secHeaders@file"
- "traefik.http.routers.phxalpha.tls=true"
- "traefik.http.routers.phxalpha.tls.certresolver=http"
- "traefik.http.routers.phxalpha.service=phxalpha"
- "traefik.http.services.phxalpha.loadbalancer.server.port=80"
- "traefik.docker.network=proxy"
- "traefik.http.routers.phxalpha-insecure.entrypoints=http"
- "traefik.http.routers.phxalpha-insecure.rule=Host(`phx.yurilima.uk`)"
- "traefik.http.routers.phxalpha-insecure.tls=false"
networks:
- frontend
- backend
depends_on:
- phoenix-backend
phoenix-backend:
@@ -67,21 +52,20 @@ services:
SMTP_IGNORE_TLS: ${SMTP_IGNORE_TLS}
ENV_MODE: ${ENV_MODE}
command: [ "npm", "run", "start:server" ]
# ports:
# - "3000:3000"
# - "3400:3400"
# - "9615:9615"
ports:
- "3000:3000"
- "3400:3400"
- "9615:9615"
volumes:
- "asset-data:/usr/src/app/packages/dev-server/assets"
- "/opt/containers/phx/server_custom:/usr/src/app/packages/dev-server/custom"
networks:
- backend
- frontend
deploy:
mode: replicated
replicas: 2
update_config:
order: start-first # It means that the service will be updated one at a time
# deploy:
# mode: replicated
# replicas: 2
# update_config:
# order: start-first # It means that the service will be updated one at a time
phoenix-backend-worker:
container_name: phoenix-backend-worker
restart: always
@@ -100,4 +84,3 @@ services:
- "/opt/containers/phx/server_custom:/usr/src/app/packages/dev-server/custom"
networks:
- backend
- frontend

View File

@@ -33,35 +33,31 @@ http {
# https://serverfault.com/questions/379675/nginx-reverse-proxy-url-rewrite
location /backend-api/ {
#rewrite ^/backend-api(.*) /$1 break;
proxy_pass http://localhost:3000/;
proxy_pass http://49.13.21.211:3000/;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
}
location /admin-api {
proxy_pass http://localhost:3000/admin-api;
proxy_pass http://49.13.21.211:3000/admin-api;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
}
location /remote-assets {
proxy_pass http://localhost:3000/remote-assets;
proxy_pass http://49.13.21.211:3000/remote-assets;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
}
location /sti {
proxy_pass http://localhost:3000/sti;
proxy_pass http://49.13.21.211:3000/sti;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
}
location /ws {
proxy_pass http://localhost:3000/graphql;
proxy_pass http://49.13.21.211:3000/graphql;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
@@ -92,33 +88,33 @@ http {
# https://serverfault.com/questions/379675/nginx-reverse-proxy-url-rewrite
location /backend-api/ {
#rewrite ^/backend-api(.*) /$1 break;
proxy_pass http://localhost:3000/;
proxy_pass http://49.13.21.211:3000/;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto https;
}
location /admin-api {
proxy_pass http://localhost:3000/admin-api;
proxy_pass http://49.13.21.211:3000/admin-api;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
}
location /remote-assets {
proxy_pass http://localhost:3000/remote-assets;
proxy_pass http://49.13.21.211:3000/remote-assets;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto https;
}
location /sti {
proxy_pass http://localhost:3000/sti;
proxy_pass http://49.13.21.211:3000/sti;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
}
location /ws {
proxy_pass http://localhost:3000/graphql;
proxy_pass http://49.13.21.211:3000/graphql;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";