Docker with QUEUE_CONNECTION=database - How?

Hi, new user here, I’ve been looking through documentation

But I can’t find a definitive answer to the question - is there anything else to configure (cron, emails etc.) when running IN in docker?
My .env file has the

QUEUE_CONNECTION=database

Health check seems to be alright
image

Hi,

You’d need to add the queue:work cron to process the jobs.

inside docker?

sorry, this is the part I don’t get. There are mentions about the cron jobs, but it seems like those instructions are not for the docker setup.

@david can you please advise?

1 Like

I’m guessing it’s a too trivial of a question :slight_smile:

You may want to create an issue on the Dockerfile GitHub repo to ask.

1 Like

Crickets over at the github so far.
It seems like there has to be some sort of configuration performed for cron, since there is an example config here

Another place to try posting is the #docker channel on Slack.

We’re looking into improving the Docker documentation, we’ll keep this issue in mind.

cc @david

1 Like

If you are using the docker-compose file that we host on our /dockerfiles repo, there is nothing else required to be done.

When you say your app is not “fast” what do you mean exactly? Does the UI block between clicks? If you switch to the React interface, does performance improve?

1 Like

Thanks @david!

I apologize for providing incorrect advice, I’m still getting up to speed with the Docker version of the app.

1 Like

@david thank you for reply.
I’m using this repo Docker as the image source.

If you are using the docker-compose file that we host on our /dockerfiles repo, there is nothing else required to be done.

Got it. Thank you for clarification.

About the UI being not fast - I actually have nothing to compare to other then similar apps built with Laravel from my previous user experience. UI doesn’t block and performance doesn’t improve when switching to React. So I guess my statement is not valid, since there is no objective metric in it. Please disregard.

@hillel - no worries :slight_smile:

For app speed you may want to try the desktop app: OS tools - Invoice Ninja

1 Like

So I did a fresh install, not git clone, it seems like git clone way is not accounting for a possibility of other containers alongside with it’s generic “app” names and such.

Using the -Docker image
Using the -https://github.com/invoiceninja/dockerfiles/blob/master/env as env file.

dcoker compose
  Invoice_Ninja:
    image: invoiceninja/invoiceninja:5
    container_name: "REDUCTED" 
    env_file: .env_InvNNJ
    networks:
      - "REDUCTED" 
    restart: always
    volumes:
      - ${DOCKER_APPDATA_PATH}/ilr_inv_nnj/public:/var/www/app/public:rw,delegated
      - ${DOCKER_APPDATA_PATH}/ilr_inv_nnj/storage:/var/www/app/storage:rw,delegated
    depends_on:
      - mysql_db
env filel
# IN application vars
APP_URL="REDUCTED - public url" 
APP_KEY="REDUCTED" 

APP_DEBUG=true
EXPANDED_LOGGING=true

REQUIRE_HTTPS=false
PHANTOMJS_PDF_GENERATION=false
PDF_GENERATOR=snappdf
TRUSTED_PROXIES='*'

QUEUE_CONNECTION=database

# DB connection
DB_TYPE=mysql
DB_STRICT=false
DB_HOST=MySQL_DB
DB_DATABASE="REDUCTED" 
DB_USERNAME="REDUCTED" 
DB_PASSWORD="REDUCTED" 

# Create initial user
# Default to these values if empty
# IN_USER_EMAIL=admin@example.com
# IN_PASSWORD=changeme!
IN_USER_EMAIL="REDUCTED" 
IN_PASSWORD="REDUCTED" 

# Mail options
MAIL_MAILER=smtp
MAIL_HOST=smtp-relay.gmail.com
MAIL_PORT=587
MAIL_USERNAME="REDUCTED" 
MAIL_PASSWORD="REDUCTED" 
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS="REDUCTED" 
MAIL_FROM_NAME="REDUCTED" 

# MySQL - ommiting, DB already configured above. No mention of these variables in https://invoiceninja.github.io/en/env-variables/
#MYSQL_ROOT_PASSWORD=ninjaAdm1nPassword
#MYSQL_USER=ninja
#MYSQL_PASSWORD=ninja
#MYSQL_DATABASE=ninja

First thing I get after logging in with user from env files - cron needs to be enabled.

Then after a while it disappeared. Hopefully this is normal :slight_smile: