-
Notifications
You must be signed in to change notification settings - Fork 267
Prerequisites
Before starting Invoice Ninja via Docker make sure you generate a valid application key. If you are not sure what an application key is, please visit this blog post.
To generate an application just run
docker run --rm -it invoiceninja/invoiceninja php artisan key:generate --show
This will generate an application key for you which you need later. The generated key has the following format: base64:NdRTYZSVE4+062um1CNRscNg9TXFuL22Sb63SwLcqtY=
- yes, the base64:
belongs to the key!
To make your data persistent, you have to mount public
and storage
from your host to your containers.
- Create two folder on your host, e. g.
/var/invoiceninja/public
and/var/invoiceninja/storage
- Mount these folders into your container - see
docker-compose.yml
You can create these folders wherever you want on your host system.
root
, we use a separate user, the folders on the host system need to be owned by uid 1000
and a gid 82
(www-data
group).
Run this on your host system
chown -R 1500:82 /var/invoiceninja/public /var/invoiceninja/storage
to apply the proper permission to the folders. This also applies to the docker-compose
setup when using bind-mounted host directories.
The PhantomJS key is set to a-demo-key-with-low-quota-per-ip-address
. This demo key is limited to 100 requests per day.
To set a different key add -e PHANTOMJS_CLOUD_KEY='<YOUR PHANTOMJS KEY>'
to the 'docker run' command.
Alternatively, you may add PHANTOMJS_CLOUD_KEY= '<YOUR PHANTOMJS KEY>'
under the "environment" for invoiceninja to your docker-compose.yml file.
For further configuration and troubleshooting regarding PhantomJS and Invoice Ninja see documentation here.
Further help channels:
Slack | StackOverflow (use tag invoice-ninja
) | Github