From 0880fcc7b1d446377952ad3206cadd7b46e07b36 Mon Sep 17 00:00:00 2001 From: Krishna Shah Date: Fri, 3 Jan 2025 17:18:37 +0530 Subject: [PATCH] docker added --- .docker | 15 +++++++++++++++ Dockerfile | 24 ++++++++++++++++++++++++ docker-compose.yml | 24 ++++++++++++++++++++++++ requirements.txt | Bin 14 -> 16820 bytes 4 files changed, 63 insertions(+) create mode 100644 .docker create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/.docker b/.docker new file mode 100644 index 0000000..554a0f5 --- /dev/null +++ b/.docker @@ -0,0 +1,15 @@ +ignore + +__pycache__ +*.pyc +*.pyo +*.pyd +*.db +*.sqlite3 +*.log +*.pot +*.mo +*.swp +*.swo +*.DS_Store +.env \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0200c78 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +# Use the official Python image from the Docker Hub +FROM python:3.10-slim + +# Set environment variables +ENV PYTHONDONTWRITEBYTECODE 1 +ENV PYTHONUNBUFFERED 1 + +# Set the working directory +WORKDIR /app + +# Copy the requirements file into the container +COPY requirements.txt /app/ + +# Install the dependencies +RUN pip install -r requirements.txt + +# Copy the rest of the application code into the container +COPY . /app/ + +# Expose the port the app runs on +EXPOSE 8000 + +# Run the Django development server +CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..adad9c9 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,24 @@ +version: '3.8' + +services: + web: + build: . + command: python manage.py runserver 0.0.0.0:8000 + volumes: + - .:/app + ports: + - "8000:8000" + depends_on: + - db + + db: + image: postgres:13 + volumes: + - postgres_data:/var/lib/postgresql/data + environment: + POSTGRES_DB: your_db_name + POSTGRES_USER: your_db_user + POSTGRES_PASSWORD: your_db_password + +volumes: + postgres_data: \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 67a04d6dc8be289fb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