clients dockerfile

This commit is contained in:
Askill 2022-09-25 14:26:16 +00:00
parent a10a7341fc
commit b385990c84
2 changed files with 13 additions and 1 deletions

10
client/Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM python:3.10
ENV TARGET=localhost:8080
WORKDIR /usr/src/app
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
CMD [ "python", "clients.py" ]

View File

@ -89,6 +89,7 @@ async def sender(target, img):
return
except websockets.ConnectionClosed:
print("reconnecting")
continue
async def client(target):
@ -129,4 +130,5 @@ def asyncMain(x, target):
if __name__ == "__main__":
# with Pool(12) as p:
# print(p.map(asyncMain, [() for _ in range(12)]))
asyncMain(0, target="ws://venus:8080")
asyncMain(0, target="ws://" + os.getenv("TARGET", "venus:8080"))