From edf3b4910c9dac6c48e844e5014ebeb46ec6d062 Mon Sep 17 00:00:00 2001 From: Christian Risi <75698846+CnF-Gris@users.noreply.github.com> Date: Mon, 16 Dec 2024 09:26:20 +0100 Subject: [PATCH] V0.6.1 Arroyo Toad --- .devcontainer/DOCKERFILES/deno.dockerfile | 1 + .environment/.gitkeep | 0 .environment/.postgres.env.example | 3 ++ .gitignore | 6 +++- .gitmodules | 7 +++-- Leader-Service | 2 +- docker-compose.yaml | 36 +++++++++++++++++------ 7 files changed, 41 insertions(+), 14 deletions(-) create mode 100644 .environment/.gitkeep create mode 100644 .environment/.postgres.env.example diff --git a/.devcontainer/DOCKERFILES/deno.dockerfile b/.devcontainer/DOCKERFILES/deno.dockerfile index 8f6ab94..8d5918e 100644 --- a/.devcontainer/DOCKERFILES/deno.dockerfile +++ b/.devcontainer/DOCKERFILES/deno.dockerfile @@ -4,4 +4,5 @@ apt install \ git \ sqlite3 \ npm \ +iputils-ping \ -y \ No newline at end of file diff --git a/.environment/.gitkeep b/.environment/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/.environment/.postgres.env.example b/.environment/.postgres.env.example new file mode 100644 index 0000000..272c7e4 --- /dev/null +++ b/.environment/.postgres.env.example @@ -0,0 +1,3 @@ +POSTGRES_PASSWORD=abcdefg1234 +POSTGRES_USER=Admin +POSTGRES_DB=SAPD \ No newline at end of file diff --git a/.gitignore b/.gitignore index a4c55b5..2a1c96f 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,8 @@ .LSOverride # Icon must end with two \r -Icon +Icon + # Thumbnails ._* @@ -134,6 +135,9 @@ web_modules/ .env.production.local .env.local +# Custom dotenv +*.env + # parcel-bundler cache (https://parceljs.org/) .cache .parcel-cache diff --git a/.gitmodules b/.gitmodules index a98801a..f1d0c32 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "IoT-Simulator"] - path = IoT-Simulator - url = https://repositories.communitynotfound.work/PoliBa-Software-Architecture/IoT-Simulator.git [submodule "Leader-Service"] path = Leader-Service url = https://repositories.communitynotfound.work/PoliBa-Software-Architecture/Leader-Service.git @@ -10,3 +7,7 @@ [submodule "PublicKey-Backend"] path = PublicKey-Backend url = https://repositories.communitynotfound.work/PoliBa-Software-Architecture/PublicKey-Backend.git + +[submodule "IoT-Simulator"] + path = IoT-Simulator + url = https://repositories.communitynotfound.work/PoliBa-Software-Architecture/IoT-Simulator.git diff --git a/Leader-Service b/Leader-Service index d44865d..c47eea3 160000 --- a/Leader-Service +++ b/Leader-Service @@ -1 +1 @@ -Subproject commit d44865db427d26b9af8702238e649b93bea7a841 +Subproject commit c47eea3826821ac34eafe9cfa58df6edef0d5c4d diff --git a/docker-compose.yaml b/docker-compose.yaml index 8bc23a4..a1eac49 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -11,18 +11,20 @@ services: command: sleep infinity leader-service: - build: + env_file: + - .environment/.leader.env + build: context: . dockerfile: .devcontainer/DOCKERFILES/deno.dockerfile volumes: - .:/workspace - hostname: leader-service.internal + hostname: iot-data-backend.internal networks: iot-network: command: sleep infinity publickey-backend: - build: + build: context: . dockerfile: .devcontainer/DOCKERFILES/deno.dockerfile volumes: @@ -31,7 +33,28 @@ services: networks: iot-network: command: sleep infinity - + + postgres-data-backend: + image: postgres + env_file: + - .environment/.postgres.env + volumes: + - pg-data:/var/lib/postgresql/data + hostname: iot-data-db.internal + networks: + iot-network: + + pg-admin: + image: dpage/pgadmin4 + env_file: + - .environment/.pgadmin.env + networks: + iot-network: + ports: + - 8080:80 + +volumes: + pg-data: networks: iot-network: @@ -39,8 +62,3 @@ networks: config: - subnet: 10.0.0.0/8 ip_range: 10.0.0.0/16 - - - - -