diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a545318 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM python:3.8-slim-buster + +WORKDIR /usr/src/app + +COPY requirements.txt ./ +RUN pip install --no-cache-dir -r requirements.txt + +COPY . . + +ARG script=scalesrv.py +CMD [ "python", $script ] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..21146d0 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,14 @@ +version: '3' +services: + server: + build: + context: . + args: + script: scalesrv.py + ports: + - "18001:18001" + clustering: + build: + context: . + args: + script: cluster.py diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..d173f65 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +paho-mqtt \ No newline at end of file