mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2025-12-31 19:47:25 +01:00
Created Prerequisites (markdown)
39
Prerequisites.md
Normal file
39
Prerequisites.md
Normal file
@@ -0,0 +1,39 @@
|
||||
### Generate an application key
|
||||
|
||||
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](https://tighten.co/blog/app-key-and-you/).
|
||||
|
||||
To generate an application just run
|
||||
|
||||
```shell
|
||||
docker run --rm -it invoiceninja/invoiceninja php artisan key:generate --show
|
||||
```
|
||||
|
||||
This will generate an application key for you which you need later.
|
||||
|
||||
### Create folders for data persistence
|
||||
|
||||
To make your data persistent, you have to mount `public` and `storage` from your host to your containers.
|
||||
|
||||
1. Create two folder on your host, e. g. `/var/invoiceninja/public` and `/var/invoiceninja/storage`
|
||||
2. Mount these folders into your container - see [usage](#usage)
|
||||
|
||||
You can create these folders wherever you want on your host system.
|
||||
|
||||
:warning: When using host mounted folder for persistence, make sure they are owned by the proper user and group. As we run Invoice Ninja without `root` , we use a separate user, the folders on the host system need to be owned by uid `1000` and a gid `101`.
|
||||
|
||||
Run this on your host system
|
||||
|
||||
```shell
|
||||
chown -R 1000:101 /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](https://github.com/invoiceninja/dockerfiles/blob/master/docker-compose.yml#L17).
|
||||
|
||||
|
||||
### PhantomJS key
|
||||
|
||||
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 feel free to add `-e PHANTOMJS_CLOUD_KEY='<INSERT YOUR PHANTOMJS KEY HERE>'` to thee docker command below.
|
||||
|
||||
For further configuration and toubleshotting regarding PhantomJS and Invoice Ninja [see documentation here](https://docs.invoiceninja.com/configure.html?#phantomjs).
|
||||
Reference in New Issue
Block a user