0

hello i would like to use debug inside container but i cannot add working "volumes" into docker comopse.xml

file structure in the piscture:

enter image description here

FROM python:3.9-alpine WORKDIR /planner ENV FLASK_APP=app ENV FLASK_RUN_HOST=0.0.0.0 RUN apk add --no-cache gcc musl-dev linux-headers COPY requirements.txt requirements.txt RUN pip install -r requirements.txt EXPOSE 5000 COPY . . CMD ["flask", "run"] 

compose:

 version: "3.7" services: web: build: . restart: always ports: - "5000:5000" volumes: - .:/planner rq-dashboard: image: jaredv/rq-docker:0.0.2 command: rq-dashboard -H rq-server ports: - 9181:9181 rq-worker: image: jaredv/rq-docker:0.0.2 command: rq worker -u redis://rq-server:6379 high normal low deploy: replicas: 3 rq-server: image: redis:alpine ports: - 6379:6379 

problem is with:

volumes: - .:/planner 

enter image description here

could you help me with it?

4
  • Basically try: - ./:/planner but be careful as that will also mount the compose file in your container, may be better to have a specific sub directory for the web service's volume. Commented Feb 22, 2021 at 19:27
  • I used ./web and it builds up ;) but the client doesn't restart when I change something in my application. But I would like to achieve constant development with dubug= True. In run.py file, I have this flag, but the container is telling me that: code web_1 | * Serving Flask app "app" web_1 | * Environment: production web_1 | WARNING: This is a development server. Do not use it in a production deployment. web_1 | Use a production WSGI server instead. web_1 | * Debug mode: off Commented Feb 23, 2021 at 13:09
  • Try setting ENV FLASK_ENV=development in the Dockerfile to enable the live reloader. Commented Feb 23, 2021 at 16:16
  • I had to grant permission in the docker application for shearing. After that every worked :) Thank you! :) Commented Feb 25, 2021 at 10:04

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.