I am trying to install the Mayan-EDMS image with the Django app and Postgres database using docker-compose but each time, I try to build docker-compose using docker-compose up it gives an error.
ERROR: yaml.parser.ParserError: while parsing a block mapping
in "./docker-compose.yml", line 8, column 3
expected <block end>, but found '<block mapping start>'
in "./docker-compose.yml", line 29, column 4
here is my docker-compose.yml docker-compose contain postgres:11.4-alpine,redis:5.0-alpine and mayanedms/mayanedms:3
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
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
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: unless-stopped
volumes:
- redis_data:/data
mayanedms:
image: mayanedms/mayanedms:3
container_name: mayanedms
restart: unless-stopped
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':'${MAYAN_DATABASE_DB:-mayan}','PASSWORD':'${MAYAN_DATABASE_PASSWORD:-mayandbpass}','USER':'${MAYAN_DATABASE_USER:-mayan}','HOST':'postgresql'}}"
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
command: >
sh -c "python manage.py process_tasks --sleep=3 --log-std --traceback"
volumes:
postgres_data:
redis_data:
mayanedms_data:
thank you for help