Isolate networks

This commit is contained in:
Eden Kirin
2024-01-16 21:37:32 +01:00
parent 99ea80c93c
commit cd57e11404

View File

@ -5,6 +5,8 @@ services:
build:
context: ./database
dockerfile: Dockerfile
networks:
- backend-net
ports:
- 55432:5432
environment:
@ -19,6 +21,8 @@ services:
build:
context: ./machines
dockerfile: Dockerfile
networks:
- backend-net
environment:
- APPPORT=3000
- DBHOST=db
@ -37,6 +41,8 @@ services:
deploy:
mode: replicated
replicas: 2
networks:
- backend-net
environment:
- APPPORT=3000
- DBHOST=db
@ -49,6 +55,9 @@ services:
condition: service_healthy
proxy:
image: envoyproxy/envoy:v1.28-latest
networks:
- frontend-net
- backend-net
ports:
- "10000:10000"
volumes:
@ -60,9 +69,19 @@ services:
build:
context: ./frontend
dockerfile: Dockerfile
networks:
- frontend-net
environment:
- REACT_APP_BACKEND_API_URL="http://localhost:10000"
ports:
- "8080:80"
depends_on:
- proxy
networks:
frontend-net:
name: frontend-net
internal: false
backend-net:
name: backend-net
internal: true