This will build a Docker Image for Invoice Ninja - An invoicing tool
- Automatically installs and sets up installation upon first start
- About
- Maintainer
- Table of Contents
- Prerequisites and Assumptions
- Installation
- Configuration
- Maintenance
- Support
- License
- References
- Assumes you are using some sort of SSL terminating reverse proxy such as:
- Requires access to a MySQL/MariaDB Server
Clone this repository and build the image with docker build -t (imagename) .
Builds of the image are available on Docker Hub
docker pull docker.io/tiredofit/invoiceninja:(imagetag)
Builds of the image are also available on the Github Container Registry
docker pull ghcr.io/tiredofit/docker-invoiceninja:(imagetag)
The following image tags are available along with their tagged release based on what's written in the Changelog:
Container OS | Tag |
---|---|
Alpine | :latest |
-
The quickest way to get started is using docker-compose. See the examples folder for a working compose.yml that can be modified for development or production use.
-
Set various environment variables to understand the capabilities of this image.
-
Map persistent storage for access to configuration and data files for backup.
-
Make networking ports available for public access if necessary
The first boot can take from 2 minutes - 5 minutes depending on your CPU to setup the proper schemas.
- Login to the web server and enter in your admin email address, admin password and start configuring the system!
The following directories are used for configuration and can be mapped for persistent storage.
Directory | Description |
---|---|
/www/logs |
Invoice Ninja, Nginx and PHP Log files |
/assets/custom |
(Optional) Copy source code over existing source code in /www/html upon container start. Use exact file/folder structure |
/assets/custom-scripts |
(Optional) If you want to execute custom scripting, place scripts here with extension .sh |
/www/html |
(Optional) If you want to expose the invoiceninja sourcecode and enable Self Updating, expose this volume |
OR | |
/data |
Hold onto your persistent sessions and cache between container restarts |
This image relies on an Alpine Linux base image that relies on an init system for added capabilities. Outgoing SMTP capabilities are handlded via msmtp
. Individual container performance monitoring is performed by zabbix-agent. Additional tools include: bash
,curl
,less
,logrotate
,nano
.
Be sure to view the following repositories to understand all the customizable options:
Image | Description |
---|---|
OS Base | Customized Image based on Alpine Linux |
Nginx | Nginx webserver |
PHP-FPM | PHP Interpreter |
Parameter | Description | Default | _FILE |
---|---|---|---|
ADMIN_EMAIL |
Administrator Email Address - Needed for logging in first boot | x | |
ADMIN_PASS |
Administrator Password - Needed for Logging in | x | |
APP_ENV |
Application environment local development production |
production |
x |
APP_KEY |
Application Key if needing to override after a new configuration generation | ||
APP_NAME |
Change default application name - Default | Invoice Ninja |
|
DISPLAY_ERRORS |
Display Errors on Website | FALSE |
|
ENABLE_AUTO_UPDATE |
If coming from an earlier version of image, automatically update it to latest invoiceninja release | TRUE |
|
ENABLE_GOOGLE_MAPS |
Enable Google Maps | TRUE |
|
LANGUAGE |
What locale/language | en |
|
LOG_PDF_HTML |
Log HTML when generating PDF exports | FALSE |
|
OPENEXCHANGE_APP_ID |
Open Exchange APP ID for currency exchange | ||
REQUIRE_HTTPS |
If using SSL reverse proxy force application to return https URLs TRUE or FALSE |
||
SETUP_TYPE |
Automatically edit configuration after first bootup AUTO or MANUAL |
AUTO |
|
SITE_URL |
The url your site listens on example https://invoiceninja.example.com |
||
SESSION_REMEMBER |
Remember users session | TRUE |
|
SESSION_LOGOUT_SECONDS |
Auto logout users after amount of seconds | 28800 |
|
SESSION_EXPIRE_ON_CLOSE |
Expire session on browser close | FALSE |
Parameter | Description | Default | _FILE |
---|---|---|---|
DB_HOST |
Host or container name of MariaDB Server e.g. invoiceninja-db |
x | |
DB_PORT |
MariaDB Port | 3306 |
x |
DB_NAME |
MariaDB Database name e.g. invoiceninja |
x | |
DB_USER |
MariaDB Username for above Database e.g. invoiceninja |
x | |
DB_PASS |
MariaDB Password for above Database e.g. password |
x | |
REDIS_HOST |
Redis Hostname | redis |
x |
REDIS_PORT |
Redis Port | 6379 |
x |
REDIS_PASS |
(optional) Redis Password | null |
x |
Parameter | Description | Default | _FILE |
---|---|---|---|
MAIL_TYPE |
Mail Type | smtp |
|
MAIL_ERROR_ADDRESS |
Email this address upon encountering any errors | ||
MAIL_FROM_NAME |
Mail from Name | Invoice Ninja |
|
MAIL_FROM_ADDRESS |
Mail from Address | [email protected] |
|
SMTP_HOST |
SMTP Server to be used to send messages from Postal Management System to users | postfix-relay |
x |
SMTP_PORT |
SMTP Port to be used to send messages from Postal Management System to Users | 25 |
x |
SMTP_USER |
Username to authenticate to SMTP Server | null |
x |
SMTP_PASS |
Password to authenticate to SMTP Server | null |
x |
SMTP_ENCRYPTION |
Type of encryption for SMTP null tls |
null |
|
SMTP_TLS_VERIFY_PEER |
Verify TLS certificate before sending | false |
|
POSTMARK_SECRET |
Postmark secret (if using postmark) | x |
Parameter | Description | Default |
---|---|---|
CACHE_DRIVER |
Cache Driver file redis database |
file |
FILESYSTEM_DRIVER |
Filesystem Driver local public |
local |
SESSION_DRIVER |
Session Driver file redis database |
database |
QUEUE_CONNECTION |
Queue Connection sync file redis |
file |
Parameter | Description | Default | _FILE |
---|---|---|---|
S3_BUCKET |
S3 Bucket eg bucket_name |
x | |
S3_ENDPOINT |
S3 Endpoint eg https://endpoint.com |
x | |
S3_KEY |
S3 Key ID eg s3_compatible_key |
x | |
S3_REGION |
S3 Region eg us-east-1 |
x | |
S3_SECRET |
S3 Key Secret eg a_long_and_glorious_key |
x | |
S3_URL |
S3 URL eg https://endpoint.com |
x |
The following ports are exposed.
Port | Description |
---|---|
80 |
HTTP |
For debugging and maintenance purposes you may want access the containers shell.
bash docker exec -it (whatever your container name is) bash
These images were built to serve a specific need in a production environment and gradually have had more functionality added based on requests from the community.
- The Discussions board is a great place for working with the community on tips and tricks of using this image.
- Sponsor me for personalized support
- Please, submit a Bug Report if something isn't working as expected. I'll do my best to issue a fix in short order.
- Feel free to submit a feature request, however there is no guarantee that it will be added, or at what timeline.
- Sponsor me regarding development of features.
- Best effort to track upstream changes, More priority if I am actively using the image in a production environment.
- Sponsor me for up to date releases.
MIT. See LICENSE for more details.