Add Docker files

This commit is contained in:
Asaril 2020-03-12 11:18:27 +01:00
parent a046bf6640
commit 1e793f135e
3 changed files with 26 additions and 0 deletions

11
Dockerfile Normal file
View file

@ -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 ]

14
docker-compose.yml Normal file
View file

@ -0,0 +1,14 @@
version: '3'
services:
server:
build:
context: .
args:
script: scalesrv.py
ports:
- "18001:18001"
clustering:
build:
context: .
args:
script: cluster.py

1
requirements.txt Normal file
View file

@ -0,0 +1 @@
paho-mqtt