From bb00ae87b1dc9d3609ca4bf045b77a0714a31e28 Mon Sep 17 00:00:00 2001 From: Nikolaj Gustafsson Date: Tue, 22 Feb 2022 11:59:22 +0100 Subject: [PATCH] Merge prior to release v.1.1.0 (#10) * Docker container with simulator * Changes with docker files. Can now use docker-compose up on the simulator itself so the other containers will not be included. * The simulator container will now also be available inside the os2Iot container. Still available from the simulator as well. Since they both have to use port 8000, they can't be used in the same time. * Changed port number * rename folder from Simulator to simulator Co-authored-by: August Andersen Co-authored-by: augusthjerrild <70511721+augusthjerrild@users.noreply.github.com> --- docker-compose.yml | 9 +++++++++ simulator/Dockerfile | 19 +++++++++++++++++++ simulator/docker-compose.yml | 8 ++++++++ 3 files changed, 36 insertions(+) create mode 100644 simulator/Dockerfile create mode 100644 simulator/docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml index f09a5ec..9020235 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -56,6 +56,15 @@ services: BASE_URL: http://localhost:3000/api/v1/ TABLE_PAGE_SIZE: 20 + #OS2IoT + os2iot-lorawanSimulator: + image: "os2iot-lorawan_simulator" + build: + context: "./simulator" + dockerfile: "Dockerfile" + ports: + - "8768:8000" + os2iot-backend: image: "os2iot-backend" build: diff --git a/simulator/Dockerfile b/simulator/Dockerfile new file mode 100644 index 0000000..46e3527 --- /dev/null +++ b/simulator/Dockerfile @@ -0,0 +1,19 @@ +FROM ubuntu + +RUN apt-get update && apt-get install make + +RUN apt-get update && apt-get install git -y + +ARG DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && apt-get install golang -y + +RUN apt-get install ca-certificates -y + +RUN git clone https://github.com/UniCT-ARSLab/LWN-Simulator.git + +WORKDIR /LWN-Simulator + +RUN make install-dep + +CMD make run \ No newline at end of file diff --git a/simulator/docker-compose.yml b/simulator/docker-compose.yml new file mode 100644 index 0000000..b497d43 --- /dev/null +++ b/simulator/docker-compose.yml @@ -0,0 +1,8 @@ +services: + os2iot-lorawanSimulator: + image: "os2iot-lorawan_simulator" + build: + context: "./" + dockerfile: "Dockerfile" + ports: + - "8768:8000"