marmelab / gaudi

Gaudi allows to share multi-component applications, based on Docker, Go, and YAML.
http://gaudi.io/
MIT License
563 stars 28 forks source link

When using nginx, the php app doesn't seems to be linked correctly #36

Closed pengux closed 10 years ago

pengux commented 10 years ago

Accessing a PHP script gives 403 Forbidden. Here is a sample configuration:

applications:
    front1:
        type: nginx
        links: [app]
        ports:
            80: 80
        volumes:
            .: /var/www
        custom:
            fastCgi: app

    app:
        type: php-fpm
        links: [db]
        ports:
            9000: 9000
        volumes:
            .: /var/www

    db:
        type: mysql
        ports:
            3306: 3306
manuquentin commented 10 years ago

Thanks for the bug report, I'll take a look.

manuquentin commented 10 years ago

I can't reproduce your issue with a simple test.php:

<?php
echo 'Hello';
gaudi
Cleaning front1 ...
Cleaning app ...
Cleaning db ...
Building gaudi/front1 ...
Building gaudi/app ...
Building gaudi/db ...
Starting db ...
Application db started (172.17.0.65:3306)
Starting app ...
Application app started (172.17.0.66:9000)
Starting front1 ...
Application front1 started (172.17.0.67:80)

curl http://172.17.0.67/test.php -s -o result.txt && cat result.txt
Hello

What kind a php application are you running ?

By attaching the app container with docker attach app do you have any errors in /var/log/php5-fpm.log ? (Beware, ctrl+c doesn't detach but kill the container, use ctrl+p then ctrl+q to detach).

What's the result of docker logs front1 ?

manuquentin commented 10 years ago

Bump @pengux, do you still have this issue ?

pengux commented 10 years ago

@manuquentin I guess not, haven't tried the latest version but our current setup seems to be running. I can close this and create a new issue if it arises again.