Skip to content
Open

1 #308

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
ARG version=3.8-alpine
FROM python:${version} AS builder

WORKDIR /app

# Встановлюємо gcc та залежності для компіляції
RUN apk add --no-cache gcc musl-dev libffi-dev

COPY requirements.txt .
RUN pip install --upgrade pip && \
pip install --no-cache-dir -r requirements.txt

FROM python:${version}

ENV PYTHONUNBUFFERED=1

WORKDIR /app

COPY --from=builder /usr/local/lib/python3.8/site-packages \
/usr/local/lib/python3.8/site-packages
COPY . .

RUN python manage.py migrate

ENTRYPOINT ["python", "manage.py", "runserver", "0.0.0.0:8080"]
31 changes: 31 additions & 0 deletions instruction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# TodoApp

## Docker Hub
https://hub.docker.com/r/igorrrrrrrrr/todoapp

---

## Build image

```bash
docker build -f Dockerfile -t todoapp .
```

## Run container

```bash
docker run -d -p 8080:8080 --name todoapp igorrrrrrrrr/todoapp:1.0.0
```

## Or pull from Docker Hub and run

```bash
docker pull igorrrrrrrrr/todoapp:1.0.0
docker run -d -p 8080:8080 --name todoapp igorrrrrrrrr/todoapp:1.0.0
```

---

## Access the application

Open browser and go to:
Loading