diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..afe21c7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +ARG PYTHON_VERSION=3.8 +FROM python:${PYTHON_VERSION} AS builder +WORKDIR /app +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt +COPY . . +RUN python manage.py migrate + +FROM python:3.8-slim +ENV PYTHONUNBUFFERED=1 +WORKDIR /app +COPY --from=builder /app . +EXPOSE 8080 +CMD ["python", "manage.py", "runserver", "0.0.0.0:8080"] + diff --git a/INSTRUCTION.md b/INSTRUCTION.md new file mode 100644 index 0000000..7a4d7db --- /dev/null +++ b/INSTRUCTION.md @@ -0,0 +1,12 @@ + + +# ToDo App Docker Image +## Docker Hub +https://hub.docker.com/repository/docker/margarita8454/todoapp/general +## Запуск + +docker pull margarita8454/todoapp:1.0.0 +docker run -d -p 8080:8080 margarita8454/todoapp:1.0.0 +docker build -t todoapp:1.0.0 . + + ## How to access the app in the browser => http://localhost:8080/ \ No newline at end of file