React runs on port 8080
This commit is contained in:
@@ -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:
|
||||||
|
|||||||
@@ -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"]
|
||||||
@@ -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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user