Docker only setup - invoiceninja/dockerfiles GitHub Wiki
â ī¸ 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.