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