This commit is contained in:
Pierre HUBERT 2024-09-26 13:59:08 +02:00
parent 1683ce2fde
commit eb33b607c2
2 changed files with 7 additions and 1 deletions

View File

@ -1,4 +1,5 @@
FROM python:3-slim FROM python:3-slim
COPY server.py /server.py COPY server.py /server.py
COPY start.sh /start.sh
EXPOSE 80 EXPOSE 80
CMD ["python3", "/server.py"] CMD ["/bin/sh", "/start.sh"]

5
basic_server/start.sh Normal file
View File

@ -0,0 +1,5 @@
#!/bin/sh
nohup python3 /server.py > /var/log/server.log 2>&1 &
while true; do /bin/bash; done