Yii Framework Forum: 404 on DebugBar when use Docker - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

404 on DebugBar when use Docker Docker never works well

#1 User is offline   Cálcio 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 225
  • Joined: 15-July 13
  • Location:Brasil - RJ

Posted 10 July 2018 - 07:11 PM

Hi Everyone. I face problem with debugbar when I use Docker. I created a new fresh project to try passby this error but didn't work. It's impossible run it when I use docker.

The strange thing is the Gii works very well!

Following my configs.

web/index.php
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');


config/web.php
if (YII_ENV_DEV) {
    // configuration adjustments for 'dev' environment
    $config['bootstrap'][] = 'debug';
    $config['modules']['debug'] = [
        'class' => 'yii\debug\Module',
        'allowedIPs' => ['*'],
    ];

    $config['bootstrap'][] = 'gii';
    $config['modules']['gii'] = [
        'class' => 'yii\gii\Module',
        'allowedIPs' => ['*'],
    ];
}


docker-compose.yml
version: '3.1'

services:
    lt-timesheet-server:
        image: yiisoftware/yii2-php:7.1-apache
        container_name: lt-timesheet-server
        volumes:
            - ~/.composer-docker/cache:/root/.composer/cache:delegated
            - ./:/app:delegated
        working_dir: /var/www/html
        ports:
            - '8080:80'
        networks:
            - lt-timesheet-network
        environment:
            PHP_XDEBUG_ENABLED: 1 # Set 1 to enable.
            XDEBUG_CONFIG: "remote_host=172.17.0.1 remote_enable=1"
            
    lt-timesheet-mysql:
        image: mysql:5.7
        container_name: lt-timesheet-mysql
        # restart: always
        environment:
            - MYSQL_ROOT_PASSWORD=secret
            - MYSQL_USER=secret
            - MYSQL_PASSWORD=secret
        ports:
            - "3306:3306"
        networks:
            - lt-timesheet-network
        volumes:
            - ./volumes/database/data:/var/lib/mysql

    lt-timesheet-phpmyadmin:
        image: phpmyadmin/phpmyadmin:4.7
        container_name: lt-timesheet-phpmyadmin
        ports:
            - '8081:80'
            - '443:443'
        networks:
            - lt-timesheet-network
        environment:
            - PMA_ARBITRARY=1
            - PMA_HOST={DB_HOST}
        depends_on:
            - lt-timesheet-mysql
        volumes:
            - ./volumes/database/data:/var/lib/mysql

networks:
    lt-timesheet-network:
        driver: bridge


I don't know what I need to do anymore. Someone can help me?

Attached File(s)


Se minha resposta te ajudou, clique no link "Vote this post up".
If my answer help you, please check the "Vote this post up".

See my porfolio
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users