Skip to content

How to start php-fpm? #1

@jirinapravnik

Description

@jirinapravnik

I want to use your minidocks, but I am not able to start php-fpm. My docker-compose.yml:

    php:
        image: minidocks/php:7.3-intl
        tty: true
        links:
            - mariadb
        volumes: 
            - ../:/var/www
        working_dir: /var/www
        environment:
            PATH_PREFIX: /var/www/bin
            PHP_MEMORY_LIMIT: 2048M
            PHP_DATE__TIMEZONE: Europe/Prague
    http:
        image: minidocks/nginx:1.12
        tty: true
        links:
            - php
        volumes:
            - ../:/var/www

Nginx gives me Bad gateway error. I have to go into php container and run manually command php-fpm and everything is working.

I also tried in docker-compose.yml, put under php section this

command: php-fpm

but then i get these errors:

php_1      | [27-Jan-2020 20:30:51] NOTICE: [pool www] 'user' directive is ignored when FPM is not running as root
php_1      | [27-Jan-2020 20:30:51] NOTICE: [pool www] 'group' directive is ignored when FPM is not running as root
php_1      | [27-Jan-2020 20:30:51] ERROR: Unable to create the PID file (/var/run/php-fpm.pid).: Permission denied (13)
php_1      | [27-Jan-2020 20:30:51] ERROR: FPM initialization failed

When I run only docker-compose up php, then I get only Psy Shell

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions