From 7b213dd33abb7743164100e1a980aac4862ef3be Mon Sep 17 00:00:00 2001 From: Eden Kirin Date: Tue, 23 Jan 2024 21:40:57 +0100 Subject: [PATCH] DC in local network --- docker-compose-local.yml | 65 ++ frontend/public/index.html | 1 - frontend/public/manifest.json | 25 - media/demo-overview.excalidraw | 1690 ++++++++++++++++++++++++++------ products/app/api/router.go | 4 + proxy/envoy-local.yaml | 59 ++ proxy/envoy.yaml | 6 - 7 files changed, 1537 insertions(+), 313 deletions(-) create mode 100644 docker-compose-local.yml delete mode 100644 frontend/public/manifest.json create mode 100644 proxy/envoy-local.yaml diff --git a/docker-compose-local.yml b/docker-compose-local.yml new file mode 100644 index 0000000..5aa1d64 --- /dev/null +++ b/docker-compose-local.yml @@ -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 diff --git a/frontend/public/index.html b/frontend/public/index.html index b724644..9cd5944 100644 --- a/frontend/public/index.html +++ b/frontend/public/index.html @@ -7,7 +7,6 @@ -