I created a Dockerfile
FROM python:3
ENV PYTHONUNBUFFERED=1
WORKDIR /code
RUN pip install -r requirements.txt
COPY . /code/
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
and a docker-compose:
version: "3"
services:
db:
image: postgres
ports:
- "5432:5432"
volumes:
- DB:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=postgres
app:
build: .
ports:
- "8000:8000"
depends_on:
- db
volumes:
DB:
And it finally works, cool! But then I wanted to continue working on that project and It seems like I have to rebuild my app every time when I do some changes to see the result but this operation is too costly.
Can I somehow trigger just the "COPY . /code/"
operation?