Skip to content
Snippets Groups Projects
Commit 58c44db0 authored by Pesti Tamás's avatar Pesti Tamás
Browse files

Fix nginx not using correct domains

parent f816b197
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,7 @@ sudo docker run \
-w /app \
-p 8080:8080 \
-u $(id -u):$(id -g) \
--name szofttech_webapp_backend \
--name szofttech-webapp-backend \
--network szofttech_webapp_network \
eclipse-temurin:21-jdk \
./mvnw spring-boot:run
......@@ -9,7 +9,7 @@ sudo docker run \
-u $(id -u):$(id -g) \
-p 3000:3000 \
-w /app \
--name szofttech_webapp_frontend \
--name szofttech-webapp-frontend \
--network szofttech_webapp_network \
node:latest \
./start.sh
......@@ -18,14 +18,14 @@ http {
# backend
location /api {
# rewrite /api/(.*) /$1 break;
proxy_pass http://szofttech_webapp_backend:8080;
proxy_pass http://szofttech-webapp-backend:8080;
}
# otherwise fallback to frontend
location / {
client_max_body_size 100M;
# rewrite ^/static/(.*)$ /$1 break;
proxy_pass http://szofttech_webapp_frontend:3000;
proxy_pass http://szofttech-webapp-frontend:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
......
......@@ -4,6 +4,6 @@ sudo docker run \
--rm \
-v "$(pwd)/nginx/nginx.conf":/etc/nginx/nginx.conf \
-p 80:80 \
--name szofttech_webapp_nginx \
--name szofttech-webapp-nginx \
--network szofttech_webapp_network \
nginx:latest
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment