Add Docker files
This commit is contained in:
parent
a046bf6640
commit
1e793f135e
3 changed files with 26 additions and 0 deletions
11
Dockerfile
Normal file
11
Dockerfile
Normal 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
14
docker-compose.yml
Normal 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
1
requirements.txt
Normal file
|
@ -0,0 +1 @@
|
|||
paho-mqtt
|
Loading…
Reference in a new issue