Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugging (web UI bar) is turned on by default, impossible to turn off #20

Closed
maxguru opened this issue Oct 8, 2016 · 15 comments
Closed

Comments

@maxguru
Copy link

maxguru commented Oct 8, 2016

It seems that no matter what, debugging is turned on and impossible to turn off through the check box in web UI.

@hillelcoren
Copy link
Member

I'm not sure, I'm not able to replicate this.

Have you tried manually editing the .env file.

@maxguru
Copy link
Author

maxguru commented Oct 10, 2016

I will try to do it, but the feature is definitely broken with deployed with docker-compose.

@maxguru
Copy link
Author

maxguru commented Oct 11, 2016

I checked and it looks like APP_DEBUG=false in .env file, but it still shows the PHP debug bar at the bottom of the browser window.

@lalop
Copy link
Member

lalop commented Oct 12, 2016

@maxguru can you share your docker-compose.yml file please ?

@maxguru
Copy link
Author

maxguru commented Oct 12, 2016

version: "2"

services:
  db:
    image: mysql
    environment:
      MYSQL_DATABASE: ninja
      MYSQL_ROOT_PASSWORD: somethingsomething

  app:
    image: invoiceninja/invoiceninja
    links:
      - db:mysql
    environment:
      APP_DEBUG: 1
      DB_USERNAME: root
      DB_PASSWORD: somethingsomething
    volumes:
      - ./data/storage:/var/www/app/storage
      - ./data/logo:/var/www/app/public/logo

  web:
    image: nginx
    volumes:
      - ./nginx.conf:/etc/nginx/nginx.conf:ro
    links:
      - app
    volumes_from:
      - app
    ports:
      - "80:80"

  cron:
    image: invoiceninja/invoiceninja
    links:
      - db:mysql
    user: www-data
    environment:
      APP_DEBUG: 1
    entrypoint: |
      bash -c 'bash -s <<EOF
      trap "break;exit" SIGHUP SIGINT SIGTERM
      sleep 300s
      while /bin/true; do
        DB_USERNAME=root DB_PASSWORD=somethingsomething /usr/local/bin/php /var/www/app/artisan ninja:send-invoices
        DB_USERNAME=root DB_PASSWORD=somethingsomething /usr/local/bin/php /var/www/app/artisan ninja:send-reminders
        sleep 1d
      done
      EOF'
    volumes_from:
      - app

I have customized nginx.conf to make things work right with a reverse proxy.

By the way, I had to chmod a+rwx data/* to make it work. Also, see issue #18.

@lalop
Copy link
Member

lalop commented Oct 12, 2016

Can you try to define APP_DEBUG at 0 ?

version: "2"

services:
  db:
    image: mysql
    environment:
      MYSQL_DATABASE: ninja
      MYSQL_ROOT_PASSWORD: somethingsomething

  app:
    image: invoiceninja/invoiceninja
    links:
      - db:mysql
    environment:
      APP_DEBUG: 0
      DB_USERNAME: root
      DB_PASSWORD: somethingsomething
    volumes:
      - ./data/storage:/var/www/app/storage
      - ./data/logo:/var/www/app/public/logo

  web:
    image: nginx
    volumes:
      - ./nginx.conf:/etc/nginx/nginx.conf:ro
    links:
      - app
    volumes_from:
      - app
    ports:
      - "80:80"

  cron:
    image: invoiceninja/invoiceninja
    links:
      - db:mysql
    user: www-data
    environment:
      APP_DEBUG: 0
    entrypoint: |
      bash -c 'bash -s <<EOF
      trap "break;exit" SIGHUP SIGINT SIGTERM
      sleep 300s
      while /bin/true; do
        DB_USERNAME=root DB_PASSWORD=somethingsomething /usr/local/bin/php /var/www/app/artisan ninja:send-invoices
        DB_USERNAME=root DB_PASSWORD=somethingsomething /usr/local/bin/php /var/www/app/artisan ninja:send-reminders
        sleep 1d
      done
      EOF'
    volumes_from:
      - app

@maxguru
Copy link
Author

maxguru commented Oct 13, 2016

How do I change it in the running container? If I do docker-compose down; docker-compose up it will wipe my data.

@lalop
Copy link
Member

lalop commented Oct 17, 2016

can you try to do a restart ?

@maxguru
Copy link
Author

maxguru commented Oct 20, 2016

I did docker-compose stop and docker-compose start but it didn't help.

@lalop
Copy link
Member

lalop commented Oct 24, 2016

@hillelcoren can dotenv override $_ENV ?

@hillelcoren
Copy link
Member

Adding a value to the .env file should set it in the $_ENV, I'm not sure if it will override a value if it's already there.

@lalop
Copy link
Member

lalop commented Nov 19, 2016

Hello, @maxguru did you tried the new image ?

@pierreozoux
Copy link
Contributor

@maxguru docker-compose stop and docker-compose start are not enough, you'd need to docker-compsoe rm in the middle.

@lalop
Copy link
Member

lalop commented Dec 19, 2016

@maxguru can we close this ?

@maxguru
Copy link
Author

maxguru commented Dec 21, 2016

Yes, looks like it is working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants