docker compose (Ready) :

- nginx
       - proxy_pass on port 5000
       - static available at url "xxxx/static/<file>
   - djangoserver
       - just a program with infinite while for test docker-compose
   Nginx and Djangoserv containers linked with the folder at "/var/wwww/djangoserver"
This commit is contained in:
Kum1ta
2024-07-28 13:25:38 +02:00
parent fcf60335a5
commit d27ab24c5e
7 changed files with 67 additions and 7 deletions

View File

@ -0,0 +1,18 @@
FROM debian:buster
RUN apt update && apt upgrade -y
RUN apt install -y python
RUN apt install -y python3-pip
RUN pip3 install django
RUN mkdir -p /var/www/djangoserver/
RUN mkdir -p /var/www/djangoserver/static/
COPY file/server /var/www/djangoserver/server
RUN chmod 755 /var/www/djangoserver/
RUN chown -R www-data:www-data /var/www/djangoserver/
WORKDIR /var/www/djangoserver
ENTRYPOINT [ "python", "/var/www/djangoserver/server/main.py" ]

View File

@ -0,0 +1,5 @@
import time
while True:
print("Update")
time.sleep(20)