From f2b25f6f30eef93d7cbde42511f53ba0622c0407 Mon Sep 17 00:00:00 2001 From: andrei Date: Mon, 20 Jan 2025 13:54:38 +0500 Subject: [PATCH] =?UTF-8?q?=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D0=B4=20RE?= =?UTF-8?q?ADME.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CineSync/Dockerfile | 11 +++++++++++ docker-compose.yml | 27 +++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 CineSync/Dockerfile create mode 100644 docker-compose.yml diff --git a/CineSync/Dockerfile b/CineSync/Dockerfile new file mode 100644 index 0000000..47ce9e1 --- /dev/null +++ b/CineSync/Dockerfile @@ -0,0 +1,11 @@ +FROM python:3.11 + +WORKDIR /app + +COPY . . + +RUN pip install --no-cache-dir -r requirements.txt + +RUN python manage.py collectstatic --noinput + +CMD ["gunicorn", "--bind", "0.0.0.0:8000", "CineSync.wsgi:application"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..6dedfc5 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,27 @@ +version: '3.8' + +services: + web: + build: . + container_name: django_app + command: gunicorn --bind 0.0.0.0:8000 CineSync.wsgi:application + volumes: + - .:/app + - ./db.sqlite3:/app/db.sqlite3 + - ./static:/app/static + ports: + - "8000:8000" + environment: + - SECRET_KEY=your_secret_key + - DJANGO_DEBUG=True + - DJANGO_ALLOWED_HOSTS=* + env_file: + - .env + deploy: + resources: + limits: + memory: 512M + cpus: "0.5" + reservations: + memory: 128M + cpus: "0.2"