I am running three containers in development, 1) Python with a Django app, 2) a PostgreSQL database, and 3) Redis. The app runs smoothly,
A volume is configured for container #1 (“app” below), and updates to code in Python files do update automatically and fairly quickly with a message like
I can’t find any reference to a similar problem in my web searches. StackExchange posts (and Docker documentation) indicate all that’s needed is a volume mapping, which I have. Maybe I’m overlooking something obvious?
The docker-compose file includes a volume mapping and that service looks like this
app: platform: linux/amd64 container_name: 'myapp' build: context: . args: - DEV=true ports: - "8001:8000" volumes: - ./app:/app command: > sh -c "python manage.py wait_for_db && python manage.py migrate && python manage.py runserver 0.0.0.0:8000 && celery -A whg worker -l INFO && alias ll='ls -lha'" environment: - DB_HOST=db - DB_NAME=devdb - DB_USER=devuser - DB_PASS=changeme - DEBUG=1 depends_on: - db