ERROR: yaml.parser.ParserError: while parsing a block mapping in "./docker-compose.yml", line 15web
version: '2' services: # PostgreSQL mydb: image: postgres:10 ports: - "5432:5432" environment: - POSTGRES_DB=postgres - POSTGRES_USER=odoo - POSTGRES_PASSWORD=odoo volumes: - odoo-db-data:/var/lib/postgresql/data # Odoo web web: build: context: ../odoo_demo dockerfile: Dockerfile hostname: web command: ./docker_run_web.sh volumes: - ../odoo_demo:/app # mount current directory inside container - odoo-web-data:/app/odoo-web-db # 把此路徑/app/odoo-ee-web-db配置到odoo conf data_dir參數中 ports: - "8069:8069" # set up links so that web knows about db, rabbit and redis depends_on: - mydb volumes: odoo-web-data: odoo-db-data:
docker-compose up -d
ERROR: yaml.parser.ParserError: while parsing a block mapping in "./docker-compose.yml", line 15, column 5 expected <block end>, but found '<block mapping start>' in "./docker-compose.yml", line 25, column 4
緣由文件內塊對齊有問題,使用notepad++打開查看以下:redis
volumes:sql
- ../odoo_demo:/app # mount current directory inside container - odoo-web-data:/app/odoo-web-db # 把此路徑/app/odoo-ee-web-db配置到odoo conf data_dir參數中
在下面這句話前面添加兩個空格,使他能和上面保持對其docker
- odoo-web-data:/app/odoo-web-db # 把此路徑/app/odoo-ee-web-db配置到odoo conf data_dir參數中