DC in local network

This commit is contained in:
Eden Kirin
2024-01-23 21:40:57 +01:00
parent b69f26027d
commit 7b213dd33a
7 changed files with 1537 additions and 313 deletions

65
docker-compose-local.yml Normal file
View File

@ -0,0 +1,65 @@
version: "3.8"
services:
db:
build:
context: ./database
dockerfile: Dockerfile
network_mode: "host"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
command: -p 55432
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -p 55432"]
interval: 1s
timeout: 5s
retries: 10
machines-app:
build:
context: ./machines
dockerfile: Dockerfile
network_mode: "host"
environment:
- APPPORT=4000
- DBHOST=localhost
- DBPORT=55432
- DBNAME=komponiranje
- DBUSER=pero
- DBPASSWORD=pero.000
- PRODUCTSAPPURL=http://localhost:10000
depends_on:
db:
condition: service_healthy
products-app:
build:
context: ./products
dockerfile: Dockerfile
network_mode: "host"
environment:
- APPPORT=4001
- DBHOST=localhost
- DBPORT=55432
- DBNAME=komponiranje
- DBUSER=pero
- DBPASSWORD=pero.000
depends_on:
db:
condition: service_healthy
proxy:
image: envoyproxy/envoy:v1.28-latest
network_mode: "host"
volumes:
- ./proxy/envoy-local.yaml:/etc/envoy/envoy.yaml
depends_on:
- machines-app
- products-app
frontend-app:
build:
context: ./frontend
dockerfile: Dockerfile
network_mode: "host"
environment:
- REACT_APP_BACKEND_API_URL="http://localhost:10000"
depends_on:
- proxy