2
Docker only setup
codedge edited this page 2020-08-16 20:48:56 +02:00
This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

⚠️ The following guides aims at a completely fresh install of Invoice Ninja with any web server you want and any database supported. The is no migration scenario covered.

This might be a suitable guide for you if

  • your web server is on your host system already and you don't need another one bundled with IN
  • your database is on your host or any other server and you don't need another database instance
  • you just need IN and no additional web server and/or database

⚠️ Please make sure you have enough knowledge to connect your web server to the running Invoice Ninja instance.

Prerequisites

Read the prerequisites section carefully as you need all of these information for a proper setup.

Run the instance

To run the Invoice Ninja instance you need to issue this command:

docker run -d \
  -v /var/invoiceninja/public:/var/app/public \
  -v /var/invoiceninja/storage:/var/app/storage \
  -e APP_URL='http://ninja.dev' \
  -e APP_KEY='<INSERT THE GENERATED APPLICATION KEY HERE>' \
  -e DB_HOST='localhost' \
  -e DB_DATABASE='ninja' \
  -e DB_USERNAME='ninja' \
  -e DB_PASSWORD='ninja' \
  -p '9000:9000' \
  --name invoiceninja \
  invoiceninja/invoiceninja:alpine-4

The command above starts an instance

  • of Invoice Ninja 4
  • with host-mounted folders
  • listening on port 9000 - that's important for your web server

All configuration is passed via environment variables. Check the variables available here, depending on which version of Invoice Ninja you are going to run.