Git Product home page Git Product logo

Comments (15)

hillelcoren avatar hillelcoren commented on June 24, 2024

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

Have you tried manually editing the .env file.

from dockerfiles.

maxguru avatar maxguru commented on June 24, 2024

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

from dockerfiles.

maxguru avatar maxguru commented on June 24, 2024

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.

from dockerfiles.

lalop avatar lalop commented on June 24, 2024

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

from dockerfiles.

maxguru avatar maxguru commented on June 24, 2024
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.

from dockerfiles.

lalop avatar lalop commented on June 24, 2024

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

from dockerfiles.

maxguru avatar maxguru commented on June 24, 2024

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

from dockerfiles.

lalop avatar lalop commented on June 24, 2024

can you try to do a restart ?

from dockerfiles.

maxguru avatar maxguru commented on June 24, 2024

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

from dockerfiles.

lalop avatar lalop commented on June 24, 2024

@hillelcoren can dotenv override $_ENV ?

from dockerfiles.

hillelcoren avatar hillelcoren commented on June 24, 2024

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.

from dockerfiles.

lalop avatar lalop commented on June 24, 2024

Hello, @maxguru did you tried the new image ?

from dockerfiles.

pierreozoux avatar pierreozoux commented on June 24, 2024

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

from dockerfiles.

lalop avatar lalop commented on June 24, 2024

@maxguru can we close this ?

from dockerfiles.

maxguru avatar maxguru commented on June 24, 2024

Yes, looks like it is working.

from dockerfiles.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.