React runs on port 8080

This commit is contained in:
2025-01-23 12:22:47 +00:00
parent 66957efe6f
commit b377240753
3 changed files with 8 additions and 2 deletions

View File

@@ -28,9 +28,11 @@ services:
build: build:
context: ./frontend context: ./frontend
ports: ports:
- "5173:5173" - "5173"
networks: networks:
- app_network - app_network
depends_on:
- web_server
networks: networks:
app_network: app_network:

View File

@@ -17,4 +17,4 @@ COPY . .
EXPOSE 5173 EXPOSE 5173
# Define the command to run your app # Define the command to run your app
CMD ["npm", "run", "dev"] CMD ["npm", "run", "dev", "--", "--host"]

View File

@@ -42,5 +42,9 @@ http {
rewrite ^/api/(.*)$ /$1 break; rewrite ^/api/(.*)$ /$1 break;
proxy_pass http://web_server:5000; # flask-app is the name of the Flask container in docker-compose proxy_pass http://web_server:5000; # flask-app is the name of the Flask container in docker-compose
} }
location / {
proxy_pass http://frontend:5173; # frontend is the name of the React container in docker-compose
}
} }
} }