mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2026-01-01 20:17:26 +01:00
Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7a935a0eef | ||
|
|
ff897d568f | ||
|
|
b0bb0ffd25 | ||
|
|
3902b40bc1 | ||
|
|
29e2d93e59 | ||
|
|
b7aea66e62 | ||
|
|
e2db08f207 | ||
|
|
59291d8687 | ||
|
|
6f747207ec | ||
|
|
c2aabd14ac | ||
|
|
07f1e601ab | ||
|
|
13423d38c0 | ||
|
|
e34ac95617 | ||
|
|
6c68882449 | ||
|
|
8e9e7c47da | ||
|
|
7da83b40f4 | ||
|
|
1b48ab6983 | ||
|
|
14357b93a1 | ||
|
|
8a68fda3f3 | ||
|
|
4ee20766ef |
57
.github/workflows/build-image-v5.yml
vendored
Normal file
57
.github/workflows/build-image-v5.yml
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
name: Build Container Image
|
||||
|
||||
# When its time to do a release do a full cross platform build for all supported
|
||||
# architectures and push all of them to Docker Hub.
|
||||
# Only trigger on semver shaped tags.
|
||||
# Ref: https://github.com/metcalfc/docker-action-examples/blob/main/.github/workflows/release.yml
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- "alpine/5/**"
|
||||
push:
|
||||
paths:
|
||||
- "alpine/5/**"
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
with:
|
||||
platforms: all
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-5-${{ hashFiles('alpine/5/cache_buster') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-5-${{ hashFiles('alpine/5/cache_buster') }}
|
||||
|
||||
- name: Build
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
builder: ${{ steps.buildx.outputs.name }}
|
||||
context: ./alpine/5/
|
||||
build-args: INVOICENINJA_VERSION=5-stable
|
||||
target: prod
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: invoiceninja/invoiceninja:cache
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache-new
|
||||
|
||||
- name: Move cache
|
||||
run: |
|
||||
rm -rf /tmp/.buildx-cache
|
||||
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Publish Releases to Hub
|
||||
name: Publish Container Image
|
||||
|
||||
# When its time to do a release do a full cross platform build for all supported
|
||||
# architectures and push all of them to Docker Hub.
|
||||
@@ -44,13 +44,13 @@ jobs:
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
# - name: Cache Docker layers
|
||||
# uses: actions/cache@v2
|
||||
# with:
|
||||
# path: /tmp/.buildx-cache
|
||||
# key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
# restore-keys: |
|
||||
# ${{ runner.os }}-buildx-
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ steps.prep.outputs.major }}-${{ hashFiles('alpine/${{ steps.prep.outputs.major }}/**') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-${{ steps.prep.outputs.major }}-${{ hashFiles('alpine/${{ steps.prep.outputs.major }}/**') }}
|
||||
|
||||
- name: Login to DockerHub
|
||||
if: github.event_name != 'pull_request'
|
||||
@@ -70,8 +70,8 @@ jobs:
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.prep.outputs.tags }}
|
||||
cache-from: invoiceninja/invoiceninja:${{ steps.prep.outputs.major }}
|
||||
cache-to: type=inline
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
2
.github/workflows/release.yaml
vendored
2
.github/workflows/release.yaml
vendored
@@ -27,6 +27,6 @@ jobs:
|
||||
helm repo add bitnami https://charts.bitnami.com/bitnami
|
||||
|
||||
- name: Run chart-releaser
|
||||
uses: helm/chart-releaser-action@master
|
||||
uses: helm/chart-releaser-action@v1.2.1
|
||||
env:
|
||||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||
|
||||
14
Makefile
14
Makefile
@@ -17,15 +17,15 @@ VERSION=$(shell echo ${TAG} | sed "s/-.*//")
|
||||
|
||||
# Building docker images based on alpine.
|
||||
# Assigned tags:
|
||||
# - :alpine
|
||||
# - :alpine-<RELEASE VERSION>
|
||||
# - :4
|
||||
# - :<RELEASE VERSION>
|
||||
.PHONY: build-alpine
|
||||
build-alpine:
|
||||
ifeq ($(IS_V5),)
|
||||
$(info Make: Building "$(VERSION)" tagged images from alpine.)
|
||||
@docker build -t ${HUB_NAMESPACE}/${IMAGE}:alpine-${VERSION} --build-arg INVOICENINJA_VERSION=${VERSION} ./alpine/4/
|
||||
# Tag as alpine-4
|
||||
@docker tag ${HUB_NAMESPACE}/${IMAGE}:alpine-${VERSION} ${HUB_NAMESPACE}/${IMAGE}:alpine-4
|
||||
@docker build -t ${HUB_NAMESPACE}/${IMAGE}:${VERSION} --build-arg INVOICENINJA_VERSION=${VERSION} ./alpine/4/
|
||||
# Tag as 4
|
||||
@docker tag ${HUB_NAMESPACE}/${IMAGE}:alpine-${VERSION} ${HUB_NAMESPACE}/${IMAGE}:4
|
||||
$(info Make: Done.)
|
||||
endif
|
||||
|
||||
@@ -33,8 +33,8 @@ endif
|
||||
push-alpine:
|
||||
ifeq ($(IS_V5),)
|
||||
$(info Make: Pushing tagged images from alpine.)
|
||||
@docker push ${HUB_NAMESPACE}/${IMAGE}:alpine-${VERSION}
|
||||
@docker push ${HUB_NAMESPACE}/${IMAGE}:alpine-4
|
||||
@docker push ${HUB_NAMESPACE}/${IMAGE}:${VERSION}
|
||||
@docker push ${HUB_NAMESPACE}/${IMAGE}:4
|
||||
$(info Make: Done.)
|
||||
endif
|
||||
|
||||
|
||||
16
README.md
16
README.md
@@ -2,6 +2,8 @@
|
||||
[](https://hub.docker.com/r/invoiceninja/invoiceninja)
|
||||
[](https://hub.docker.com/r/invoiceninja/invoiceninja)
|
||||
[](https://artifacthub.io/packages/search?repo=invoiceninja)
|
||||
[](https://github.com/invoiceninja/dockerfiles/actions/workflows/publish-image.yaml) [](https://github.com/invoiceninja/dockerfiles/actions/workflows/build-image-v5.yaml)
|
||||
|
||||
|
||||
|
||||
# Docker for [Invoice Ninja](https://www.invoiceninja.com/)
|
||||
@@ -31,21 +33,19 @@ git clone https://github.com/invoiceninja/dockerfiles.git
|
||||
cd dockerfiles
|
||||
```
|
||||
|
||||
Instead of defining our environment variables inside our docker-compose.yml file we now define this in the `env` file, open this file up and insert your `APP_URL` and your `APP_KEY`
|
||||
Instead of defining our environment variables inside our docker-compose.yml file we now define this in the `env` file, open this file up and insert your `APP_URL`, `APP_KEY` and update the rest of the variables as required.
|
||||
|
||||
```
|
||||
APP_URL=http://in.localhost:8003/
|
||||
APP_KEY=<insert your generated key in here>
|
||||
APP_DEBUG=true
|
||||
MULTI_DB_ENABLED=false
|
||||
DB_HOST1=db
|
||||
DB_PORT1=3306
|
||||
DB_USERNAME1=ninja
|
||||
DB_PASSWORD1=ninja
|
||||
DB_DATABASE1=ninja
|
||||
PHANTOMJS_PDF_GENERATION=false
|
||||
REQUIRE_HTTPS=false
|
||||
IN_USER_EMAIL=
|
||||
IN_PASSWORD=
|
||||
```
|
||||
|
||||
If `IN_USER_EMAIL` and `IN_PASSWORD` is not set the default user email and password is "admin@example.com" and "changeme!" respectively. You will use this for the initial login, thereafter, you can delete this two environment variables.
|
||||
|
||||
The `APP_KEY` can be generated by running
|
||||
|
||||
```bash
|
||||
|
||||
@@ -83,7 +83,7 @@ fi
|
||||
rm -rf "$BAK_PUBLIC_PATH"
|
||||
|
||||
# Set permission for web server to create/update files (only <v4)
|
||||
chown -R "$INVOICENINJA_USER":www-data /var/www/app/storage /var/www/app/public /var/www/app/bootstrap
|
||||
chown -R "$INVOICENINJA_USER":"$INVOICENINJA_USER" /var/www/app/storage /var/www/app/public /var/www/app/bootstrap
|
||||
|
||||
# Initialize values that might be stored in a file
|
||||
file_env 'APP_KEY'
|
||||
|
||||
@@ -28,7 +28,7 @@ RUN npm install --production \
|
||||
&& mv /var/www/app/public $BAK_PUBLIC_PATH
|
||||
|
||||
# Prepare php image
|
||||
FROM php:${PHP_VERSION}-fpm-alpine as prod
|
||||
FROM php:${PHP_VERSION}-fpm-alpine3.13 as prod
|
||||
ARG INVOICENINJA_VERSION
|
||||
ARG BAK_STORAGE_PATH
|
||||
ARG BAK_PUBLIC_PATH
|
||||
|
||||
1
alpine/5/cache_buster
Normal file
1
alpine/5/cache_buster
Normal file
@@ -0,0 +1 @@
|
||||
Fri Jul 2 7:33:22 +00 2021
|
||||
14
alpine/5/rootfs/docker-entrypoint-init.d/10-init-in.sh
Executable file
14
alpine/5/rootfs/docker-entrypoint-init.d/10-init-in.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
php artisan db:seed --force
|
||||
|
||||
# Build up array of arguments...
|
||||
if [[ ! -z "${IN_USER_EMAIL}" ]]; then
|
||||
email="--email ${IN_USER_EMAIL}"
|
||||
fi
|
||||
|
||||
if [[ ! -z "${IN_PASSWORD}" ]]; then
|
||||
password="--password ${IN_PASSWORD}"
|
||||
fi
|
||||
|
||||
php artisan ninja:create-account $email $password
|
||||
@@ -27,60 +27,71 @@ file_env() {
|
||||
local fileVar="${var}_FILE"
|
||||
local def="${2:-}"
|
||||
|
||||
if [ "$(ie_gv ${var})" != "" ] && [ "$(ie_gv ${fileVar})" != "" ]; then
|
||||
in_error "Both $var and $fileVar are set (but are exclusive)"
|
||||
fi
|
||||
|
||||
local val="$def"
|
||||
if [ "$(ie_gv ${var})" != "" ]; then
|
||||
val=$(ie_gv ${var})
|
||||
elif [ "$(ie_gv ${fileVar})" != "" ]; then
|
||||
val=$(cat $(ie_gv ${fileVar}))
|
||||
if [ "$(ie_gv ${fileVar})" != "" ]; then
|
||||
in_error "Both $var and $fileVar are set (but are exclusive)"
|
||||
fi
|
||||
unset "$fileVar"
|
||||
return
|
||||
fi
|
||||
|
||||
if [ "$(ie_gv ${fileVar})" != "" ] && [ -f "$(ie_gv ${fileVar})" ]; then
|
||||
export "$var"="$(cat $(ie_gv ${fileVar}))"
|
||||
elif [ ! -z "$def" ]; then
|
||||
export "$var"="$def"
|
||||
fi
|
||||
|
||||
export "$var"="$val"
|
||||
unset "$fileVar"
|
||||
}
|
||||
|
||||
# first arg is `-f` or `--some-option`
|
||||
if [ "${1#-}" != "$1" ]; then
|
||||
set -- php-fpm "$@"
|
||||
set -- supervisord "$@"
|
||||
fi
|
||||
|
||||
# create storage volume
|
||||
if [ ! -d /var/www/app/storage ] && [ -d "$BAK_STORAGE_PATH" ]; then
|
||||
mv "$BAK_STORAGE_PATH" /var/www/app/storage
|
||||
elif [ -d "$BAK_STORAGE_PATH" ]; then
|
||||
# copy missing folders in storage
|
||||
IN_STORAGE_BACKUP="$(ls "$BAK_STORAGE_PATH")"
|
||||
for path in $IN_STORAGE_BACKUP; do
|
||||
if [ ! -e "/var/www/app/storage/$path" ]; then
|
||||
cp -Rp "$BAK_STORAGE_PATH/$path" "/var/www/app/storage/"
|
||||
fi
|
||||
done
|
||||
if [ -d "$BAK_STORAGE_PATH" ]; then
|
||||
if [ ! -d /var/www/app/storage ]; then
|
||||
mv "$BAK_STORAGE_PATH" /var/www/app/storage
|
||||
else
|
||||
# copy missing folders in storage
|
||||
IN_STORAGE_BACKUP="$(ls "$BAK_STORAGE_PATH")"
|
||||
for path in $IN_STORAGE_BACKUP; do
|
||||
if [ ! -e "/var/www/app/storage/$path" ]; then
|
||||
cp -Rp "$BAK_STORAGE_PATH/$path" "/var/www/app/storage/"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
rm -rf "$BAK_STORAGE_PATH"
|
||||
fi
|
||||
|
||||
# prevent init scripts from running when upgrading from IN <= 5.1.62
|
||||
if [ -f /var/www/app/public/version ] && [ "$INVOICENINJA_VERSION" != "$(cat /var/www/app/public/version)" ]; then
|
||||
touch /var/www/app/storage/.initialized
|
||||
fi
|
||||
rm -rf "$BAK_STORAGE_PATH"
|
||||
|
||||
# create public volume
|
||||
if [ ! -d /var/www/app/public ] && [ -d "$BAK_PUBLIC_PATH" ]; then
|
||||
mv "$BAK_PUBLIC_PATH" /var/www/app/public
|
||||
elif [ ! -e /var/www/app/public/version ] || [ "$INVOICENINJA_VERSION" != "$(cat /var/www/app/public/version)" ]; then
|
||||
# version mismatch, update all
|
||||
cp -au "$BAK_PUBLIC_PATH/"* /var/www/app/public
|
||||
echo "$INVOICENINJA_VERSION" >/var/www/app/public/version
|
||||
elif [ ! -d /var/www/app/public/logo ] && [ -d "$BAK_PUBLIC_PATH/logo" ]; then
|
||||
# missing logo folder only, copy folder
|
||||
cp -a "$BAK_PUBLIC_PATH/logo" /var/www/app/public/logo
|
||||
elif [ -d "$BAK_PUBLIC_PATH/logo" ]; then
|
||||
# copy missing folders in logo
|
||||
IN_LOGO_BACKUP="$(ls "$BAK_PUBLIC_PATH/logo")"
|
||||
for path in $IN_LOGO_BACKUP; do
|
||||
if [ ! -e "/var/www/app/public/logo/$path" ]; then
|
||||
cp -a "$BAK_PUBLIC_PATH/logo/$path" "/var/www/app/public/logo/"
|
||||
fi
|
||||
done
|
||||
if [ -d "$BAK_PUBLIC_PATH" ]; then
|
||||
if [ ! -d /var/www/app/public ]; then
|
||||
mv "$BAK_PUBLIC_PATH" /var/www/app/public
|
||||
elif [ ! -f /var/www/app/public/version ] || [ "$INVOICENINJA_VERSION" != "$(cat /var/www/app/public/version)" ]; then
|
||||
# version mismatch, update all
|
||||
cp -au "$BAK_PUBLIC_PATH/"* /var/www/app/public
|
||||
echo "$INVOICENINJA_VERSION" >/var/www/app/public/version
|
||||
elif [ ! -d /var/www/app/public/logo ] && [ -d "$BAK_PUBLIC_PATH/logo" ]; then
|
||||
# missing logo folder only, copy folder
|
||||
cp -a "$BAK_PUBLIC_PATH/logo" /var/www/app/public/logo
|
||||
elif [ -d "$BAK_PUBLIC_PATH/logo" ]; then
|
||||
# copy missing folders in logo
|
||||
IN_LOGO_BACKUP="$(ls "$BAK_PUBLIC_PATH/logo")"
|
||||
for path in $IN_LOGO_BACKUP; do
|
||||
if [ ! -e "/var/www/app/public/logo/$path" ]; then
|
||||
cp -a "$BAK_PUBLIC_PATH/logo/$path" "/var/www/app/public/logo/"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
rm -rf "$BAK_PUBLIC_PATH"
|
||||
fi
|
||||
rm -rf "$BAK_PUBLIC_PATH"
|
||||
|
||||
# Initialize values that might be stored in a file
|
||||
file_env 'APP_KEY'
|
||||
@@ -98,10 +109,10 @@ file_env 'MAILGUN_SECRET'
|
||||
file_env 'S3_KEY'
|
||||
file_env 'S3_SECRET'
|
||||
|
||||
# Run Laravel stuff
|
||||
# Run IN/Laravel stuff
|
||||
if [[ "$1" == "supervisord" ]] || [[ "$1" == "php-fpm" ]]; then
|
||||
echo "Initialising Laravel..."
|
||||
. laravel-init.sh
|
||||
in_log INFO "Initialising Invoice Ninja..."
|
||||
. invoiceninja-init.sh
|
||||
fi
|
||||
|
||||
exec docker-php-entrypoint "$@"
|
||||
|
||||
44
alpine/5/rootfs/usr/local/bin/invoiceninja-init.sh
Executable file
44
alpine/5/rootfs/usr/local/bin/invoiceninja-init.sh
Executable file
@@ -0,0 +1,44 @@
|
||||
#!/bin/sh
|
||||
|
||||
# usage: docker_process_init_files [file [file [...]]]
|
||||
# ie: docker_process_init_files /always-initdb.d/*
|
||||
# process initializer files, based on file extensions
|
||||
docker_process_init_files() {
|
||||
echo
|
||||
local f
|
||||
for f; do
|
||||
case "$f" in
|
||||
*.sh)
|
||||
# https://github.com/docker-library/postgres/issues/450#issuecomment-393167936
|
||||
# https://github.com/docker-library/postgres/pull/452
|
||||
if [ -x "$f" ]; then
|
||||
in_log INFO "$0: running $f"
|
||||
"$f"
|
||||
else
|
||||
in_log INFO "$0: sourcing $f"
|
||||
. "$f"
|
||||
fi
|
||||
;;
|
||||
*) in_log INFO "$0: ignoring $f" ;;
|
||||
esac
|
||||
echo
|
||||
done
|
||||
}
|
||||
|
||||
php artisan config:cache
|
||||
php artisan optimize
|
||||
|
||||
# Check if DB works, if not crash the app.
|
||||
DB_READY=$(php artisan tinker --execute='echo app()->call("App\Utils\SystemHealth@dbCheck")["success"];')
|
||||
if [ "$DB_READY" != "1" ]; then
|
||||
php artisan migrate:status # Print verbose error
|
||||
in_error "Error connecting to DB"
|
||||
fi
|
||||
|
||||
php artisan migrate --force
|
||||
|
||||
# If first IN run, it needs to be initialized
|
||||
if [ ! -f /var/www/app/storage/.initialized ]; then
|
||||
docker_process_init_files /docker-entrypoint-init.d/*
|
||||
touch /var/www/app/storage/.initialized
|
||||
fi
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
php artisan config:cache
|
||||
php artisan optimize
|
||||
php artisan migrate --force
|
||||
@@ -1,15 +1,15 @@
|
||||
dependencies:
|
||||
- name: common
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 1.4.2
|
||||
version: 1.4.3
|
||||
- name: nginx
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 8.8.1
|
||||
version: 8.8.5
|
||||
- name: mariadb
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 9.3.6
|
||||
version: 9.3.11
|
||||
- name: redis
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 12.9.2
|
||||
digest: sha256:fd3577637e412f553b3300f0c174ea7282073e0971da621d2f5c0e43b8f2fdfc
|
||||
generated: "2021-04-07T20:59:19.568334+08:00"
|
||||
digest: sha256:4255a558312b033e820635f491b0960bd4ec8e716164025212af06adafbd4cb9
|
||||
generated: "2021-05-11T09:31:45.433+08:00"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
apiVersion: v2
|
||||
name: invoiceninja
|
||||
description: A Helm chart to install Invoiceninja
|
||||
description: A Helm chart to install Invoice Ninja
|
||||
# A chart can be either an 'application' or a 'library' chart.
|
||||
#
|
||||
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||
@@ -13,14 +13,14 @@ type: application
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.3.1
|
||||
version: 0.5.1
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||
appVersion: 5.1.35
|
||||
appVersion: 5.1.64
|
||||
keywords:
|
||||
- invoiceninja
|
||||
home: https://github.com/lwj5/invoiceninja-chart
|
||||
home: https://invoiceninja.github.io/dockerfiles
|
||||
sources:
|
||||
- https://github.com/invoiceninja/invoiceninja
|
||||
- https://github.com/invoiceninja/dockerfiles
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# Invoiceninja
|
||||
# Invoice Ninja Helm Chart
|
||||
|
||||
This helm chart installs a Invoiceninja and its dependencies into a running
|
||||
This helm chart installs Invoice Ninja (IN) and its dependencies into a running
|
||||
Kubernetes cluster.
|
||||
|
||||
The chart installs the [Invoiceninja](https://hub.docker.com/r/invoiceninja/invoiceninja) docker image.
|
||||
The chart installs the [Invoice Ninja](https://hub.docker.com/r/invoiceninja/invoiceninja) docker image.
|
||||
|
||||
Please read [Upgrading](#upgrading) section before upgrading MAJOR versions.
|
||||
|
||||
@@ -24,7 +24,7 @@ helm repo add invoiceninja https://invoiceninja.github.io/dockerfiles
|
||||
helm install invoiceninja invoiceninja/invoiceninja
|
||||
```
|
||||
|
||||
The command deploys Invoiceninja on the Kubernetes cluster in the default namespace. The [Parameters](#parameters) section lists the parameters that can be configured during installation.
|
||||
The command deploys Invoice Ninja on the Kubernetes cluster in the default namespace. The [Parameters](#parameters) section lists the parameters that can be configured during installation.
|
||||
|
||||
> **Tip**: List all releases using `helm list`
|
||||
|
||||
@@ -40,13 +40,13 @@ The command removes all the Kubernetes components associated with the chart and
|
||||
|
||||
## Parameters
|
||||
|
||||
The following table lists the configurable parameters of the Invoiceninja chart and their default values.
|
||||
The following table lists the configurable parameters of the Invoice Ninja chart and their default values.
|
||||
|
||||
> NOTE: You MUST set any values that default to random or risk losing access after an upgrade. See how [here](https://github.com/lwj5/dockerfiles/tree/redis-pw/charts/invoiceninja#installing-with-arguments)
|
||||
> NOTE: You MUST set any values that default to random or risk losing access after an upgrade. See how [here](#installing-with-arguments)
|
||||
|
||||
### Global Configuration
|
||||
|
||||
The following table shows the configuration options for the Invoiceninja helm chart:
|
||||
The following table shows the configuration options for the Invoice Ninja helm chart:
|
||||
|
||||
### Global parameters
|
||||
|
||||
@@ -68,40 +68,45 @@ The following table shows the configuration options for the Invoiceninja helm ch
|
||||
| `kubeVersion` | Force target Kubernetes version (using Helm capabilities if not set) | `nil` |
|
||||
| `extraDeploy` | Array of extra objects to deploy with the release | `[]` (evaluated as a template) |
|
||||
|
||||
### Invoiceninja parameters
|
||||
### Invoice Ninja parameters
|
||||
|
||||
| Parameter | Description | Default |
|
||||
| -------------------- | --------------------------------------------------------------- | ------------------------------------------------------- |
|
||||
| `image.registry` | Invoiceninja image registry | `docker.io` |
|
||||
| `image.repository` | Invoiceninja image name | `invoiceninja/invoiceninja` |
|
||||
| `image.tag` | Invoiceninja image tag | Check `values.yaml` file |
|
||||
| `image.pullPolicy` | Invoiceninja image pull policy | `IfNotPresent` |
|
||||
| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
|
||||
| `image.debug` | Specify if debug logs should be enabled | `false` |
|
||||
| `serviceAccountName` | Name of a service account for the Invoiceninja pods | `default` |
|
||||
| `debug` | Turn on debug mode on Invoiceninja | `false` |
|
||||
| `appKey` | Laravel Application Key | _random 32 character alphanumeric string_ |
|
||||
| `logChannel` | Name of log channel to use | `nil` |
|
||||
| `broadcastDriver` | Name of broadcast driver to use | `nil` |
|
||||
| `cacheDriver` | Name of cache driver to use | `nil` |
|
||||
| `sessionDriver` | Name of session driver to use | `nil` |
|
||||
| `queueConnection` | Name of queue connection to use | `nil` |
|
||||
| `snappdf` | Use snappdf instead of Phantom JS PDF generation | `true` |
|
||||
| `extraEnvVars` | Extra environment variables to be set on Invoiceninja container | `{}` |
|
||||
| `extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars | `nil` |
|
||||
| `extraEnvVarsSecret` | Name of existing Secret containing extra env vars | `nil` |
|
||||
| Parameter | Description | Default |
|
||||
| -------------------- | ---------------------------------------------------------------- | ------------------------------------------------------- |
|
||||
| `image.registry` | Invoice Ninja image registry | `docker.io` |
|
||||
| `image.repository` | Invoice Ninja image name | `invoiceninja/invoiceninja` |
|
||||
| `image.tag` | Invoice Ninja image tag | Check `values.yaml` file |
|
||||
| `image.pullPolicy` | Invoice Ninja image pull policy | `IfNotPresent` |
|
||||
| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
|
||||
| `image.debug` | Specify if debug logs should be enabled | `false` |
|
||||
| `serviceAccountName` | Name of a service account for the Invoice Ninja pods | `default` |
|
||||
| `debug` | Turn on debug mode on Invoice Ninja | `false` |
|
||||
| `appKey` | Laravel Application Key | _random 32 character alphanumeric string_ |
|
||||
| `userEmail` | Initial user email address | `admin@example.com` |
|
||||
| `userPassword` | Initial user password | `changeme!` |
|
||||
| `logChannel` | Name of log channel to use | `nil` |
|
||||
| `broadcastDriver` | Name of broadcast driver to use | `nil` |
|
||||
| `cacheDriver` | Name of cache driver to use | `nil` |
|
||||
| `sessionDriver` | Name of session driver to use | `nil` |
|
||||
| `queueConnection` | Name of queue connection to use | `nil` |
|
||||
| `snappdf` | Use snappdf instead of Phantom JS PDF generation | `true` |
|
||||
| `mailer` | Name of the mailer to use (log, smtp, etc.) | `log` |
|
||||
| `requireHttps` | Force HTTPS for internal connections to Invoice Ninja (see #349) | `false` |
|
||||
| `extraEnvVars` | Extra environment variables to be set on Invoice Ninja container | `{}` |
|
||||
| `extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars | `nil` |
|
||||
| `extraEnvVarsSecret` | Name of existing Secret containing extra env vars | `nil` |
|
||||
| `trustedProxy` | List of trusted proxies for Invoice Ninja to communicate with the nginx proxy | `'*'` |
|
||||
|
||||
### Invoiceninja deployment parameters
|
||||
### Invoice Ninja deployment parameters
|
||||
|
||||
| Parameter | Description | Default |
|
||||
| --------------------------- | ----------------------------------------------------------------------------------------- | ------------------------------ |
|
||||
| `replicaCount` | Number of Invoiceninja Pods to run | `1` |
|
||||
| `replicaCount` | Number of Invoice Ninja Pods to run | `1` |
|
||||
| `containerPorts.fastcgi` | FastCGI port to expose at container level | `9000` |
|
||||
| `podSecurityContext` | Invoiceninja pods' Security Context | Check `values.yaml` file |
|
||||
| `containerSecurityContext` | Invoiceninja containers' Security Context | Check `values.yaml` file |
|
||||
| `resources` | The resources for the Invoiceninja container | `{}` |
|
||||
| `livenessProbe` | Liveness probe configuration for Invoiceninja | Check `values.yaml` file |
|
||||
| `readinessProbe` | Readiness probe configuration for Invoiceninja | Check `values.yaml` file |
|
||||
| `podSecurityContext` | Invoice Ninja pods' Security Context | Check `values.yaml` file |
|
||||
| `containerSecurityContext` | Invoice Ninja containers' Security Context | Check `values.yaml` file |
|
||||
| `resources` | The resources for the Invoice Ninja container | `{}` |
|
||||
| `livenessProbe` | Liveness probe configuration for Invoice Ninja | Check `values.yaml` file |
|
||||
| `readinessProbe` | Readiness probe configuration for Invoice Ninja | Check `values.yaml` file |
|
||||
| `updateStrategy` | Set up update strategy | `RollingUpdate` |
|
||||
| `podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `soft` |
|
||||
| `nodeAffinityPreset.type` | Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
|
||||
@@ -110,11 +115,23 @@ The following table shows the configuration options for the Invoiceninja helm ch
|
||||
| `affinity` | Affinity for pod assignment | `{}` (evaluated as a template) |
|
||||
| `nodeSelector` | Node labels for pod assignment | `{}` (evaluated as a template) |
|
||||
| `tolerations` | Tolerations for pod assignment | `[]` (evaluated as a template) |
|
||||
| `podLabels` | Extra labels for Invoiceninja pods | `{}` |
|
||||
| `podAnnotations` | Annotations for Invoiceninja pods | `{}` |
|
||||
| `podLabels` | Extra labels for Invoice Ninja pods | `{}` |
|
||||
| `podAnnotations` | Annotations for Invoice Ninja pods | `{}` |
|
||||
| `extraVolumeMounts` | Additional volume mounts | `[]` |
|
||||
| `extraVolumes` | Additional volumes | `[]` |
|
||||
|
||||
### Volume Permissions parameters
|
||||
|
||||
| Parameter | Description | Default |
|
||||
| ------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
|
||||
| `volumePermissions.enabled` | Enable init container that changes the owner and group of the persistent volume(s) mountpoint to `runAsUser:fsGroup` | `false` |
|
||||
| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` |
|
||||
| `volumePermissions.image.repository` | Init container volume-permissions image name | `bitnami/bitnami-shell` |
|
||||
| `volumePermissions.image.tag` | Init container volume-permissions image tag | `"10"` |
|
||||
| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `Always` |
|
||||
| `volumePermissions.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
|
||||
| `volumePermissions.resources` | Init container volume-permissions resource | `{}` |
|
||||
|
||||
### Exposure parameters
|
||||
|
||||
| Parameter | Description | Default |
|
||||
@@ -122,7 +139,7 @@ The following table shows the configuration options for the Invoiceninja helm ch
|
||||
| `service.type` | Kubernetes Service type | `ClusterIP` |
|
||||
| `service.port` | Service FastCGI port | `9000` |
|
||||
| `service.nodePort` | Kubernetes FastCGI node port | `""` |
|
||||
| `service.clusterIP` | Invoiceninja service clusterIP IP | `None` |
|
||||
| `service.clusterIP` | Invoice Ninja service clusterIP IP | `None` |
|
||||
| `service.loadBalancerSourceRanges` | Restricts access for LoadBalancer (only with `service.type: LoadBalancer`) | `[]` |
|
||||
| `service.loadBalancerIP` | loadBalancerIP if service type is `LoadBalancer` | `nil` |
|
||||
| `service.externalTrafficPolicy` | Enable client source IP preservation | `Cluster` |
|
||||
@@ -137,7 +154,7 @@ The following table shows the configuration options for the Invoiceninja helm ch
|
||||
| `nginx.ingress.hostname` | Default host for the ingress resource | `invoiceninja.local` |
|
||||
| `nginx.serverBlock` | Custom NGINX server block | `nil` |
|
||||
| `nginx.extraVolumes` | Array to add extra volumes | Check `values.yaml` file |
|
||||
| `nginx.extraVolumes[0].persistentVolumeClaim.claimName` | Name of Invoiceninja public PVC | `invoiceninja-public` |
|
||||
| `nginx.extraVolumes[0].persistentVolumeClaim.claimName` | Name of Invoice Ninja public PVC | `invoiceninja-public` |
|
||||
| `nginx.extraVolumeMounts` | Array to add extra mount | Check `values.yaml` file |
|
||||
|
||||
> See [Dependencies](#dependencies) for more.
|
||||
@@ -196,13 +213,13 @@ The following table shows the configuration options for the Invoiceninja helm ch
|
||||
|
||||
### Other parameters
|
||||
|
||||
| Parameter | Description | Default |
|
||||
| -------------------------- | --------------------------------------- | ------- |
|
||||
| `autoscaling.enabled` | Enable autoscaling for Invoiceninja | `false` |
|
||||
| `autoscaling.minReplicas` | Minimum number of Invoiceninja replicas | `1` |
|
||||
| `autoscaling.maxReplicas` | Maximum number of Invoiceninja replicas | `11` |
|
||||
| `autoscaling.targetCPU` | Target CPU utilization percentage | `nil` |
|
||||
| `autoscaling.targetMemory` | Target Memory utilization percentage | `nil` |
|
||||
| Parameter | Description | Default |
|
||||
| -------------------------- | ---------------------------------------- | ------- |
|
||||
| `autoscaling.enabled` | Enable autoscaling for Invoice Ninja | `false` |
|
||||
| `autoscaling.minReplicas` | Minimum number of Invoice Ninja replicas | `1` |
|
||||
| `autoscaling.maxReplicas` | Maximum number of Invoice Ninja replicas | `11` |
|
||||
| `autoscaling.targetCPU` | Target CPU utilization percentage | `nil` |
|
||||
| `autoscaling.targetMemory` | Target Memory utilization percentage | `nil` |
|
||||
|
||||
## Installing with Arguments
|
||||
|
||||
@@ -224,10 +241,49 @@ The above command sets the number of replicas to 3 for a highly available (HA) s
|
||||
|
||||
Alternatively, a YAML file that specifies the values for the parameters can be provided while [installing](https://helm.sh/docs/helm/helm_install/) the chart. For example,
|
||||
|
||||
```yaml
|
||||
# values.yaml
|
||||
appKey: changeit
|
||||
replicaCount: 3
|
||||
nginx:
|
||||
replicaCount: 3
|
||||
redis:
|
||||
cluster:
|
||||
slaveCount: 3
|
||||
password: changeit
|
||||
mariadb:
|
||||
auth:
|
||||
rootPassword: changeit
|
||||
password: changeit
|
||||
```
|
||||
|
||||
```bash
|
||||
helm install invoiceninja -f values.yaml invoiceninja/invoiceninja
|
||||
```
|
||||
|
||||
## Setting Environment Variables
|
||||
|
||||
Should you need to inject any environment variables such as those in [here](https://github.com/invoiceninja/dockerfiles/blob/master/env) into the `invoiceninja` container, you can use the `extraEnvVars` option:
|
||||
|
||||
```yaml
|
||||
# ... values.yaml file
|
||||
# In this example, we are setting the SMTP MAIL_HOST to be 'smtp.mailtrap.io'
|
||||
extraEnvVars:
|
||||
- name: MAIL_HOST
|
||||
value: 'smtp.mailtrap.io' # all values must be strings, so other types must be surrounded in quotes
|
||||
```
|
||||
|
||||
Alternatively you can provide the name of an existing `configmap` or `secret` object:
|
||||
|
||||
```bash
|
||||
kubectl create configmap examplemap --from-literal=MAIL_HOST='smtp.mailtrap.io'
|
||||
```
|
||||
|
||||
```yaml
|
||||
# ... values.yaml file
|
||||
extraEnvVarsCM: examplemap
|
||||
```
|
||||
|
||||
## Upgrading
|
||||
|
||||
Nothing yet.
|
||||
|
||||
@@ -28,6 +28,7 @@ Externally through the following DNS name:
|
||||
{{- else if contains "ClusterIP" .Values.nginx.service.type }}
|
||||
export SVC_NAME=$(kubectl get svc --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name=nginx,app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||
export SVC_PORT=$(kubectl get svc --namespace {{ .Release.Namespace }} $SVC_NAME -o jsonpath="{.spec.ports[0].port}")
|
||||
echo "Visit http://127.0.0.1:8080 to use your application"
|
||||
kubectl -n {{ .Release.Namespace }} port-forward svc/$SVC_NAME 8080:$SVC_PORT
|
||||
echo "Add the line '127.0.0.1 {{ .Values.nginx.ingress.hostname }}' to your hosts file"
|
||||
echo "Visit http://{{ .Values.nginx.ingress.hostname }} to use your application"
|
||||
kubectl -n {{ .Release.Namespace }} port-forward svc/$SVC_NAME 80:$SVC_PORT
|
||||
{{- end }}
|
||||
|
||||
@@ -9,7 +9,14 @@ Return the proper image name
|
||||
Return the proper Docker Image Registry Secret Names
|
||||
*/}}
|
||||
{{- define "invoiceninja.imagePullSecrets" -}}
|
||||
{{- include "common.images.pullSecrets" (dict "images" (list .Values.image ) "global" .Values.global) -}}
|
||||
{{- include "common.images.pullSecrets" (dict "images" (list .Values.image .Values.volumePermissions.image) "global" .Values.global) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper image name (for the init container volume-permissions image)
|
||||
*/}}
|
||||
{{- define "invoiceninja.volumePermissions.image" -}}
|
||||
{{ include "common.images.image" (dict "imageRoot" .Values.volumePermissions.image "global" .Values.global) }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
@@ -52,14 +59,14 @@ Create the name of the service account to use
|
||||
Return the proper Storage Class
|
||||
*/}}
|
||||
{{- define "invoiceninja.public.storageClass" -}}
|
||||
{{- include "common.storage.class" (dict "persistence" .Values.persistence "global" .Values.global) -}}
|
||||
{{- include "common.storage.class" (dict "persistence" .Values.persistence.public "global" .Values.global) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Storage Class
|
||||
*/}}
|
||||
{{- define "invoiceninja.storage.storageClass" -}}
|
||||
{{- include "common.storage.class" (dict "persistence" .Values.persistence "global" .Values.global) -}}
|
||||
{{- include "common.storage.class" (dict "persistence" .Values.persistence.storage "global" .Values.global) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
|
||||
@@ -13,20 +13,25 @@ metadata:
|
||||
{{- end }}
|
||||
data:
|
||||
{{- if .Values.nginx.ingress.enabled }}
|
||||
APP_URL: "http://{{ .Values.nginx.ingress.hostname }}/"
|
||||
{{- if .Values.nginx.ingress.tls }}
|
||||
APP_URL: "https://{{ .Values.nginx.ingress.hostname }}"
|
||||
{{- else }}
|
||||
APP_URL: "http://{{ include "common.names.fullname" . }}/"
|
||||
APP_URL: "http://{{ .Values.nginx.ingress.hostname }}"
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
APP_URL: "http://{{ include "common.names.fullname" . }}"
|
||||
{{- end }}
|
||||
APP_DEBUG: {{ .Values.debug | quote }}
|
||||
DB_HOST1: {{ include "invoiceninja.databaseHost" . | quote }}
|
||||
DB_PORT1: {{ include "invoiceninja.databasePort" . | quote }}
|
||||
DB_USERNAME1: {{ include "invoiceninja.databaseUser" . | quote }}
|
||||
DB_DATABASE1: {{ include "invoiceninja.databaseName" . | quote }}
|
||||
DB_HOST: {{ include "invoiceninja.databaseHost" . | quote }}
|
||||
DB_PORT: {{ include "invoiceninja.databasePort" . | quote }}
|
||||
DB_USERNAME: {{ include "invoiceninja.databaseUser" . | quote }}
|
||||
DB_DATABASE: {{ include "invoiceninja.databaseName" . | quote }}
|
||||
{{- if .Values.logChannel }}
|
||||
LOG_CHANNEL: {{ .Values.logChannel | quote }}
|
||||
{{- else }}
|
||||
LOG_CHANNEL: stderr
|
||||
{{- end }}
|
||||
MAIL_MAILER: {{ .Values.mailer | quote }}
|
||||
{{- if .Values.broadcastDriver }}
|
||||
BROADCAST_DRIVER: {{ .Values.broadcastDriver | quote }}
|
||||
{{- else if or .Values.redis.enabled .Values.externalRedis.host }}
|
||||
@@ -56,3 +61,5 @@ data:
|
||||
REDIS_CACHE_CONNECTION: {{ include "invoiceninja.redisCacheConnection" . | quote }}
|
||||
REDIS_QUEUE_CONNECTION: {{ include "invoiceninja.redisQueueConnection" . | quote }}
|
||||
SESSION_CONNECTION: {{ include "invoiceninja.redisSessionConnection" . | quote }}
|
||||
REQUIRE_HTTPS: {{ .Values.requireHttps | quote }}
|
||||
TRUSTED_PROXIES: {{ .Values.trustedProxies | quote }}
|
||||
|
||||
@@ -63,12 +63,14 @@ spec:
|
||||
- -cx
|
||||
- |
|
||||
COUNTER=0;
|
||||
while [ $COUNTER -lt 120 ]; do
|
||||
if mysqladmin ping -h "$DB_HOST1" -P $DB_PORT1 --silent; then
|
||||
[[ -z "${DB_HOST1}" ]] || DB_HOST="${DB_HOST1}";
|
||||
[[ -z "${DB_PORT1}" ]] || DB_PORT="${DB_PORT1}";
|
||||
while [ $COUNTER -lt 120 ]; do
|
||||
if mysqladmin ping -h "$DB_HOST" -P $DB_PORT --silent; then
|
||||
exit 0;
|
||||
fi;
|
||||
let COUNTER=COUNTER+1;
|
||||
echo "Waiting for DB ($DB_HOST1:$DB_PORT1)"
|
||||
echo "Waiting for DB... Trying again in 2s";
|
||||
sleep 2;
|
||||
done;
|
||||
echo "Did NOT see a database after 240 secs!";
|
||||
@@ -81,6 +83,38 @@ spec:
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: {{ include "common.names.fullname" . }}
|
||||
{{- if .Values.extraEnvVarsCM }}
|
||||
- configMapRef:
|
||||
name: {{ include "common.tplvalues.render" (dict "value" .Values.extraEnvVarsCM "context" $) }}
|
||||
{{- end }}
|
||||
{{- if .Values.extraEnvVarsSecret }}
|
||||
- secretRef:
|
||||
name: {{ include "common.tplvalues.render" (dict "value" .Values.extraEnvVarsSecret "context" $) }}
|
||||
{{- end }}
|
||||
env:
|
||||
{{- if .Values.extraEnvVars }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.extraEnvVars "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if and .Values.podSecurityContext .Values.volumePermissions.enabled (or .Values.persistence.public.enabled .Values.persistence.storage.enabled) }}
|
||||
- name: volume-permissions
|
||||
image: {{ include "invoiceninja.volumePermissions.image" . }}
|
||||
imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }}
|
||||
command:
|
||||
- /bin/bash
|
||||
- -ec
|
||||
- |
|
||||
chown -R {{ .Values.containerSecurityContext.runAsUser }}:{{ .Values.podSecurityContext.fsGroup }} /var/www/app/{public,storage}
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
{{- if .Values.volumePermissions.resources }}
|
||||
resources: {{- toYaml .Values.volumePermissions.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- mountPath: /var/www/app/public
|
||||
name: public
|
||||
- mountPath: /var/www/app/storage
|
||||
name: storage
|
||||
{{- end }}
|
||||
{{- if .Values.initContainers }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.initContainers "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
@@ -128,7 +162,7 @@ spec:
|
||||
name: {{ include "common.tplvalues.render" (dict "value" .Values.extraEnvVarsSecret "context" $) }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: DB_PASSWORD1
|
||||
- name: DB_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "invoiceninja.databaseSecretName" . }}
|
||||
@@ -140,6 +174,10 @@ spec:
|
||||
name: {{ include "invoiceninja.redisSecretName" . }}
|
||||
key: redis-password
|
||||
{{- end }}
|
||||
{{- if .Values.userEmail }}
|
||||
- name: IN_USER_EMAIL
|
||||
value: {{ .Values.userEmail | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.extraEnvVars }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.extraEnvVars "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
|
||||
@@ -57,4 +57,7 @@ data:
|
||||
APP_KEY: {{ .Values.appKey | b64enc | quote }}
|
||||
{{- else }}
|
||||
APP_KEY: {{ randAlphaNum 32 | b64enc | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.userPassword }}
|
||||
IN_PASSWORD: {{ .Values.userPassword | b64enc | quote }}
|
||||
{{- end }}
|
||||
|
||||
@@ -12,13 +12,13 @@
|
||||
# - myRegistryKeySecretName
|
||||
# storageClass: myStorageClass
|
||||
|
||||
## Invoiceninja image version
|
||||
## Invoice Ninja image version
|
||||
## ref: https://github.com/invoiceninja/dockerfiles
|
||||
##
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: invoiceninja/invoiceninja
|
||||
tag: 5.1.35
|
||||
tag: 5.1.64
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
##
|
||||
@@ -30,7 +30,7 @@ image:
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
|
||||
## String to turn on debug mode in Invoiceninja
|
||||
## String to turn on debug mode in Invoice Ninja
|
||||
##
|
||||
debug: false
|
||||
|
||||
@@ -38,6 +38,16 @@ debug: false
|
||||
##
|
||||
appKey: ""
|
||||
|
||||
## Email of user to create first run
|
||||
## If not specified, default user email will be "admin@example.com"
|
||||
##
|
||||
userEmail: ""
|
||||
|
||||
## Password of user to create on first run
|
||||
## If not specified, default user password will be "changeme!"
|
||||
##
|
||||
userPassword: ""
|
||||
|
||||
## Name of log channel to use
|
||||
##
|
||||
logChannel: ""
|
||||
@@ -58,10 +68,24 @@ sessionDriver: ""
|
||||
##
|
||||
queueConnection: ""
|
||||
|
||||
## List of trusted proxies for Invoice Ninja to communicate with the nginx proxy
|
||||
##
|
||||
trustedProxies: "*"
|
||||
|
||||
## Use local or Phantom JS PDF generation
|
||||
##
|
||||
snappdf: true
|
||||
|
||||
## Name of queue connection to use (use "log" for debug)
|
||||
## Please check the ref below for any other env you may need to define
|
||||
## ref: https://github.com/invoiceninja/invoiceninja/blob/v5-stable/config/mail.php
|
||||
##
|
||||
mailer: log
|
||||
|
||||
## Force HTTPS for all connections to Invoice Ninja
|
||||
##
|
||||
requireHttps: false
|
||||
|
||||
## String to partially override fullname template (will maintain the release name)
|
||||
##
|
||||
# nameOverride:
|
||||
@@ -165,11 +189,29 @@ containerSecurityContext:
|
||||
# - ALL
|
||||
# readOnlyRootFilesystem: true
|
||||
|
||||
## Init containers parameters:
|
||||
## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section.
|
||||
##
|
||||
volumePermissions:
|
||||
enabled: false
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/bitnami-shell
|
||||
tag: "10"
|
||||
pullPolicy: Always
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
resources: {}
|
||||
|
||||
## Number of replicas (requires ReadWriteMany PVC support)
|
||||
##
|
||||
replicaCount: 1
|
||||
|
||||
## Set up update strategy for Invoiceninja installation. Set to Recreate if you use persistent volume that cannot be mounted by more than one pods to makesure the pods is destroyed first.
|
||||
## Set up update strategy for Invoice Ninja installation. Set to Recreate if you use persistent volume that cannot be mounted by more than one pods to makesure the pods is destroyed first.
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy
|
||||
## Example:
|
||||
## updateStrategy:
|
||||
@@ -247,7 +289,7 @@ service:
|
||||
annotations: {}
|
||||
|
||||
## Configure extra options for liveness and readiness probes
|
||||
## This applies to all the Invoiceninja in the sharded cluster
|
||||
## This applies to all the Invoice Ninja in the sharded cluster
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
|
||||
##
|
||||
livenessProbe:
|
||||
@@ -286,7 +328,7 @@ resources:
|
||||
persistence:
|
||||
public:
|
||||
enabled: true
|
||||
## Invoiceninja data Persistent Volume Storage Class
|
||||
## Invoice Ninja data Persistent Volume Storage Class
|
||||
## If defined, storageClassName: <storageClass>
|
||||
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
## If undefined (the default) or set to null, no storageClassName spec is
|
||||
@@ -305,7 +347,7 @@ persistence:
|
||||
dataSource: {}
|
||||
storage:
|
||||
enabled: true
|
||||
## Invoiceninja data Persistent Volume Storage Class
|
||||
## Invoice Ninja data Persistent Volume Storage Class
|
||||
## If defined, storageClassName: <storageClass>
|
||||
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
## If undefined (the default) or set to null, no storageClassName spec is
|
||||
@@ -394,7 +436,7 @@ externalDatabase:
|
||||
## Database host
|
||||
##
|
||||
host: ""
|
||||
## non-root Username for Invoiceninja Database
|
||||
## non-root Username for Invoice Ninja Database
|
||||
##
|
||||
user: invoiceninja
|
||||
## Database password
|
||||
@@ -421,13 +463,13 @@ nginx:
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
|
||||
##
|
||||
type: ClusterIP
|
||||
## Configure the ingress resource that allows you to access the Invoiceninja
|
||||
## Configure the ingress resource that allows you to access the Invoice Ninja
|
||||
## ref: http://kubernetes.io/docs/user-guide/ingress/
|
||||
##
|
||||
ingress:
|
||||
enabled: true
|
||||
hostname: invoiceninja.local
|
||||
## Configure the serverblock for Invoiceninja
|
||||
## Configure the serverblock for Invoice Ninja
|
||||
## Note: you may need to replace the fastcgi_pass value if the release name is different
|
||||
##
|
||||
serverBlock: |
|
||||
@@ -456,7 +498,7 @@ nginx:
|
||||
fastcgi_buffers 4 16k;
|
||||
}
|
||||
}
|
||||
## Configure the extraVolumes and extraVolumeMounts for Invoiceninja
|
||||
## Configure the extraVolumes and extraVolumeMounts for Invoice Ninja
|
||||
## Note: you may need to replace the claimName if the release name is different
|
||||
##
|
||||
extraVolumes:
|
||||
|
||||
53
env
53
env
@@ -1,26 +1,41 @@
|
||||
APP_URL=http://in.localhost:8003/
|
||||
# IN application vars
|
||||
APP_URL=http://in.localhost:8003
|
||||
APP_KEY=<insert your generated key in here>
|
||||
APP_DEBUG=true
|
||||
MULTI_DB_ENABLED=false
|
||||
DB_HOST1=db
|
||||
DB_PORT1=3306
|
||||
DB_USERNAME1=ninja
|
||||
DB_PASSWORD1=ninja
|
||||
DB_DATABASE1=ninja
|
||||
REQUIRE_HTTPS=false
|
||||
PHANTOMJS_PDF_GENERATION=false
|
||||
QUEUE_CONNECTION=database
|
||||
|
||||
# DB connection
|
||||
DB_HOST=db
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=ninja
|
||||
DB_USERNAME=ninja
|
||||
DB_PASSWORD=ninja
|
||||
|
||||
# Create initial user
|
||||
# Default to these values if empty
|
||||
# IN_USER_EMAIL=admin@example.com
|
||||
# IN_PASSWORD=changeme!
|
||||
IN_USER_EMAIL=
|
||||
IN_PASSWORD=
|
||||
|
||||
# Mail options
|
||||
MAIL_MAILER=log
|
||||
MAIL_HOST=smtp.mailtrap.io
|
||||
MAIL_PORT=2525
|
||||
MAIL_USERNAME=null
|
||||
MAIL_PASSWORD=null
|
||||
MAIL_ENCRYPTION=null
|
||||
MAIL_FROM_ADDRESS='user@example.com'
|
||||
MAIL_FROM_NAME='Self Hosted User'
|
||||
|
||||
# MySQL
|
||||
MYSQL_ROOT_PASSWORD=ninjaAdm1nPassword
|
||||
MYSQL_USER=ninja
|
||||
MYSQL_PASSWORD=ninja
|
||||
MYSQL_DATABASE=ninja
|
||||
|
||||
#this is a system variable please do not remove
|
||||
IS_DOCKER=true
|
||||
|
||||
PHANTOMJS_PDF_GENERATION=false
|
||||
|
||||
#V4 env vars
|
||||
DB_STRICT=false
|
||||
DB_HOST=db
|
||||
DB_DATABASE=ninja
|
||||
DB_USERNAME=ninja
|
||||
DB_PASSWORD=ninja
|
||||
APP_CIPHER=AES-256-CBC
|
||||
# V4 env vars
|
||||
# DB_STRICT=false
|
||||
# APP_CIPHER=AES-256-CBC
|
||||
|
||||
Reference in New Issue
Block a user