Skip to content

benbrummer/dockerfiles

 
 

Repository files navigation

Docker Image Size Docker Pulls Build Status

FrankenPHP based Image for Invoice Ninja

ℹ️ Image will be deployed once a day '55 11 * * *' for the latest release of Invoice Ninja to https://hub.docker.com/r/benbrummer/invoiceninja for arm64 and amd64

👑 Features

aligned with invoiceninja-debian

extended with

Get started

Image tags

  • *-aio: Easy deployment, as it contains the Laravel app, worker and scheduler. The different processes are handled with supervisord

Multi-image

  • Dedicated images for the Laravel roles -app, -scheduler, -worker

Migrate from another image or deployment

  1. Create a compose.yaml based on one of the provided examples in dockerfiles/compose and adapt it to your needs. A simple help menu (WIP) for the image(s) can be displayed by running docker run --rm benbrummer/invoiceninja:5-octane-app --help
  2. Instead of defining environment variables inside the compose.yaml file, these need to be set in a .env file. Create a copy of sample.env file named .env.
  3. Open this file and insert your APP_URL, APP_KEY and update the rest of the variables as required.

Generate a APP_KEY

The APP_KEY can be generated by running:

# If you haven't started the containers yet:
docker run --rm -it benbrummer/invoiceninja:5-octane php artisan key:generate --show

# Or if your containers are already running:
docker compose exec app php artisan key:generate --show

Copy the entire string and insert in the .env file at APP_KEY=base64....

Initial account setup

Prior to starting the container for the first time, open the .env file and update the IN_USER_EMAIL and IN_PASSWORD variables with your primary account.

This will take care of the initial account setup. You can later remove these .env variables.

⚠️ Warning
If IN_USER_EMAIL and IN_PASSWORD are not set the default user email and password is "admin@example.com" and "changeme!" respectively.

After the container has completed the first startup, you can delete these two environment variables.

Start the container with:

docker compose up -d

Afterwards you can open your browser http://localhost:8012/

Updating the Image

To upgrade to a newer release image, update your compose.yaml first by running:

docker compose pull
docker compose up -d

It is recommended to perform a backup before updating.

Support

If you discover a bug related to this image, please create an issue in this repository.

Support for Invoice Ninja itself can be requested trough the official ressources

Customizing PHP Settings

./php.ini is baked into the image as /usr/local/etc/php/conf.d/invoiceninja.ini. Adapting php values to your needs is done by mounting ini-files into /usr/local/etc/php/conf.d/. The files are considered in alphabetical order. The last value will be taken.

  volumes:
      # Modified php.ini overwrites the invoiceninja.ini baked into the image
      - ./php/php.ini:/usr/local/etc/php/conf.d/invoiceninja.ini

Building the Image

ℹ️ To build just for a specific platform use --set *.platform=linux/amd64 with the bake command

Latest

docker buildx bake -f docker-bake.hcl

Building a specific version based on version.txt

source version.sh
docker buildx bake -f docker-bake.hcl

About

Docker files for Invoice Ninja

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 48.1%
  • Dockerfile 35.4%
  • HCL 16.5%