это не сетевой тег в базе данных, его нужно решить следующим образом
db:
image: postgres:11.4-alpine
container_name: postgres
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
- POSTGRES_USER=insights
- POSTGRES_DB=app
networks:
- bridge
, поэтому полный docker файл будет
version: "3"
networks:
bridge:
driver: bridge
services:
app:
container_name: django
restart: always
build:
context: .
ports:
- "8000:8000"
volumes:
- ./app:/app
environment:
- DB_NAME=app
- DB_USER=insights
- DB_HOST=db
- DB_PORT=5432
depends_on:
- db
networks:
- bridge
command: >
sh -c "mkdir -p logs media &&
python manage.py wait_for_db &&
python manage.py runserver 0.0.0.0:8000"
db:
image: postgres:11.4-alpine
container_name: postgres
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
- POSTGRES_USER=insights
- POSTGRES_DB=app
networks:
- bridge
redis:
command:
- redis-server
- --appendonly
- "no"
- --databases
- "2"
- --maxmemory
- "100mb"
- --maxclients
- "500"
- --maxmemory-policy
- "allkeys-lru"
- --save
- ""
- --tcp-backlog
- "256"
- --requirepass
- "${MAYAN_REDIS_PASSWORD:-mayanredispassword}"
image: redis:5.0-alpine
networks:
- bridge
restart: always
volumes:
- redis_data:/data
mayanedms:
image: mayanedms/mayanedms:3
container_name: mayanedms
restart: always
ports:
- "80:8000"
depends_on:
- db
- redis
volumes:
- mayanedms_data:/var/lib/mayan
environment: &mayan_env
MAYAN_CELERY_BROKER_URL: redis://:${MAYAN_REDIS_PASSWORD:-mayanredispassword}@redis:6379/0
MAYAN_CELERY_RESULT_BACKEND: redis://:${MAYAN_REDIS_PASSWORD:-mayanredispassword}@redis:6379/1
MAYAN_DATABASES: "{'default':{'ENGINE':'django.db.backends.postgresql','NAME':'app','USER':'insights','HOST':'db'}}"
MAYAN_DOCKER_WAIT: "db:5432 redis:6379"
networks:
- bridge
background_tasks:
restart: always
container_name: process_tasks
build:
context: .
depends_on:
- app
- db
environment:
- DB_NAME=app
- DB_USER=insights
- DB_HOST=db
- DB_PORT=5432
volumes:
- ./app:/app
networks:
- bridge
command: >
sh -c "python manage.py process_tasks --sleep=3 --log-std --traceback"
volumes:
postgres_data:
redis_data:
mayanedms_data: