skip to Main Content

In official pimcore document below docker-compose.yaml file is available but when i execute
following command. I am getting error.

ERROR: The Compose file './docker-compose.yaml' is invalid because:
Unsupported config option for services: 'nginx'
Unsupported config option for volumes: 'pimcore-database'

I checked all indentation. they are correct can anyone help below

Here is the official installation guide:

https://github.com/pimcore/demo

services:
    redis:
        image: redis:alpine
        command: [ redis-server, --maxmemory 128mb, --maxmemory-policy volatile-lru, --save "" ]

    db:
        image: mariadb:10.7
        working_dir: /application
        command: [mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_ci, --innodb-file-per-table=1]
        volumes:
            - pimcore-database:/var/lib/mysql
        environment:
            - MYSQL_ROOT_PASSWORD=ROOT
            - MYSQL_DATABASE=pimcore
            - MYSQL_USER=pimcore
            - MYSQL_PASSWORD=pimcore

    nginx:
        image: nginx:stable-alpine
        ports:
            - "8080:80"
        volumes:
            - .:/var/www/html:ro
            - ./.docker/nginx.conf:/etc/nginx/conf.d/default.conf:ro
        depends_on:
            - php-fpm
            - php-fpm-debug

    php-fpm:
        user: '1000:1000' # set to your uid:gid
        image: pimcore/pimcore:PHP8.1-fpm
        environment:
            COMPOSER_HOME: /var/www/html
        depends_on:
            - db
        volumes:
            - .:/var/www/html
            - pimcore-tmp-storage:/tmp

    php-fpm-debug:
        user: '1000:1000' # set to your uid:gid
        image: pimcore/pimcore:PHP8.1-fpm-debug
        depends_on:
            - db
        volumes:
            - .:/var/www/html
            - pimcore-tmp-storage:/tmp
        environment:
            PHP_IDE_CONFIG: serverName=localhost
            COMPOSER_HOME: /var/www/html

    supervisord:
        user: '1000:1000' # set to your uid:gid
        image: pimcore/pimcore:PHP8.1-supervisord
        depends_on:
            - db
        volumes:
            - .:/var/www/html
            - ./.docker/supervisord.conf:/etc/supervisor/conf.d/pimcore.conf:ro

volumes:
    pimcore-database:
    pimcore-tmp-storage:

2

Answers


  1. David Maze comment was on point. You must also consider to specify a supported version, because 3.8 is the last version right now, but maybe won’t work in your case. For example, in my case (the docker-compose.yaml for the Pimcore demo project) the version is 3.3.

    Login or Signup to reply.
  2. The solution that I found it was adding the version tag in the YML file:

    version: '3'
    services:
        redis:
            image: redis:alpine
            command: [ redis-server, --maxmemory 128mb, --maxmemory-policy volatile-lru, --save "" ]
    ...
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search