Yii Framework Forum: 404 no debugbar qnd utilizo o docker - Yii Framework Forum

Jump to content

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

404 no debugbar qnd utilizo o docker Rate Topic: -----

#1 User is offline   Cálcio 

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

Posted 11 July 2018 - 02:56 PM

E aí Galera.

Estou tendo problemas qnd uso o Docker, minha barra de debug ñ carrega e inspecionando o elemento descobri que ele ñ acha o debugbar da erro 404 ns inspeção. O Curioso é que o gii carrega sem problemas.


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

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

#2 User is offline   Thiago Luís 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 77
  • Joined: 12-November 10
  • Location:Brasília-DF, Brasil

Posted 12 July 2018 - 08:08 AM

Cálcio,

Ainda não executei seu docker-compose.yml localmente. Mas vamos tentar cercar esse problema:

Já viu esse tópico?
https://www.yiiframe...d-or-dockerized

Outra coisa, o que está sendo registrado no log da aplicação e nos logs do apache?

Mais tarde vou testar o template basic com esse docker-compose.yml
<?php while(!($succeed=try())); ?>
0

#3 User is offline   Thiago Luís 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 77
  • Joined: 12-November 10
  • Location:Brasília-DF, Brasil

Posted 12 July 2018 - 06:04 PM

Cálcio,

Fiz testes com a seguinte configuração:

version: '3.1'
services:
    lt-timesheet-server:
        image: yiisoftware/yii2-php:7.1-apache
        container_name: lt-timesheet-server
        working_dir: /var/www/html
        volumes:
            - /var/www/:/var/www
        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"
networks:
    lt-timesheet-network:
        driver: bridge


A barra de debug está funcionando.

Conseguiu identificar o problema?
<?php while(!($succeed=try())); ?>
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