diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e3968e0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +ARG PYTHON_VERSION=3.10 +FROM python:${PYTHON_VERSION}-slim AS builder +WORKDIR /app +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt +FROM python:${PYTHON_VERSION}-slim +WORKDIR /app +COPY . . +RUN pip install --no-cache-dir -r requirements.txt +ENV PYTHONUNBUFFERED=1 +RUN python manage.py migrate +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..7f13758 --- /dev/null +++ b/INSTRUCTION.md @@ -0,0 +1,10 @@ +Application todoapp is located in +https://hub.docker.com/repository/docker/foxytail8/todoapp + +For build container run command +docker build -t todoapp:1.0.0 . + +You need download container and run with command +docker run -p 8080:8080 todoapp:1.0.0 + +Then you open in browser page http://localhost:8080 or http://localhost:8080/api/