added docker

This commit is contained in:
2024-03-07 20:28:37 +03:00
parent 098eca14fb
commit 52b72fd23a
4 changed files with 46 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
__pycache__
*.pyc
*.pyo
*.pyd
venv/
.env
+22
View File
@@ -0,0 +1,22 @@
FROM python:3.12
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
RUN pip install pipenv
WORKDIR /app
COPY Pipfile Pipfile.lock /app/
RUN pipenv install
COPY . /app/
EXPOSE 8000
COPY ./docker-entrypoint.sh /docker-entrypoirnt.sh
RUN chmod +x /docker-entrypoint.sh
CMD ["/docker-entrypoint.sh"]
+13
View File
@@ -0,0 +1,13 @@
version: '3'
services:
web:
build: .
volumes:
- .:/code
ports:
- "8000:8000"
env_file:
- .env
environment:
- DEBUG=1
Executable
+4
View File
@@ -0,0 +1,4 @@
#!/bin/bash
python manage.py make_migrations
python manage.py migrate
python manage.py runserver 0.0.0.0:8000