App Submission: Invoice Ninja 5 (#347)

Co-authored-by: Steven Briscoe <stevenbriscoe@Stevens-MacBook-Pro-2.local>
Co-authored-by: Steven Briscoe <me@stevenbriscoe.com>
Co-authored-by: nmfretz <nmfretz@gmail.com>
This commit is contained in:
Steven Briscoe 2023-03-21 17:27:39 +00:00 committed by GitHub
parent 5ef581b0f8
commit 922bfc0e46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 123 additions and 0 deletions

View File

@ -0,0 +1,27 @@
server {
listen 80 default_server;
server_name _;
client_max_body_size 100M;
root /var/www/app/public/;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass invoice-ninja_app_1:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors off;
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;
}
}

View File

View File

View File

View File

@ -0,0 +1,47 @@
version: "3.7"
services:
app_proxy:
environment:
APP_HOST: invoice-ninja_nginx_1
APP_PORT: 80
PROXY_AUTH_WHITELIST: "/api/*"
nginx:
image: nginx:1.21-alpine@sha256:686aac2769fd6e7bab67663fd38750c135b72d993d0bb0a942ab02ef647fc9c3
init: true
restart: on-failure
volumes:
- ${APP_DATA_DIR}/config/nginx.conf:/etc/nginx/conf.d/nginx.conf:ro
- ${APP_DATA_DIR}/data/public:/var/www/app/public:ro
app:
image: invoiceninja/invoiceninja:5.5.93@sha256:59af42c410467154e6c50322f1d2ab048297b2d01e862f41bc9f1db4829c6086
# We're forced to run user/group 1500
# More detail here: https://github.com/invoiceninja/dockerfiles/blob/ad3ffc227d63740330f761dad6e8c87768577847/alpine/5/Dockerfile#L70-L80
user: "1500:1500"
restart: on-failure
volumes:
- ${APP_DATA_DIR}/data/public:/var/www/app/public:rw,delegated
- ${APP_DATA_DIR}/data/storage:/var/www/app/storage:rw,delegated
environment:
APP_URL: "http://${APP_DOMAIN}"
DB_HOST: invoice-ninja_db_1
DB_DATABASE: invoiceninja
DB_USERNAME: invoiceninja
DB_PASSWORD: moneyprintergobrrr
IN_USER_EMAIL: "admin@example.com"
IN_PASSWORD: $APP_PASSWORD
db:
image: mariadb:10.5.12@sha256:dfcba5641bdbfd7cbf5b07eeed707e6a3672f46823695a0d3aba2e49bbd9b1dd
user: "1000:1000"
restart: on-failure
volumes:
- ${APP_DATA_DIR}/data/db:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: invoiceninja
MYSQL_USER: invoiceninja
MYSQL_PASSWORD: moneyprintergobrrr
MYSQL_DATABASE: invoiceninja

24
invoice-ninja/hooks/pre-start Executable file
View File

@ -0,0 +1,24 @@
#!/usr/bin/env bash
set -euo pipefail
APP_DATA_DIR="$(readlink -f $(dirname "${BASH_SOURCE[0]}")/..)/data"
DESIRED_OWNER="1500:1500"
PUBLIC_DATA_DIR="${APP_DATA_DIR}/public"
STORAGE_DATA_DIR="${APP_DATA_DIR}/storage"
invoiceninja_correct_permission() {
local -r path="${1}"
if [[ -d "${path}" ]]; then
owner=$(stat -c "%u:%g" "${path}")
if [[ "${owner}" != "${DESIRED_OWNER}" ]]; then
chown "${DESIRED_OWNER}" "${path}"
fi
fi
}
invoiceninja_correct_permission "${PUBLIC_DATA_DIR}"
invoiceninja_correct_permission "${STORAGE_DATA_DIR}"

View File

@ -0,0 +1,25 @@
manifestVersion: 1.1
id: invoice-ninja
category: Finance
name: Invoice Ninja
version: "v5.5.51"
tagline: Well help with the invoicing
description: |-
Invoicing, Quotes, Expenses, Tasks.
Invoice Ninja is an invoicing application which makes sending invoices and receiving payments simple and easy. Our latest version is a clean slate rewrite of our popular invoicing application which builds on the existing feature set and adds a wide range of features and enhancements the community has asked for.
developer: InvoiceNinja, Inc.
website: https://invoiceninja.com
dependencies: []
repo: https://github.com/invoiceninja/invoiceninja
support: https://forum.invoiceninja.com/
port: 8676
gallery:
- 1.jpg
- 2.jpg
- 3.jpg
path: ''
deterministicPassword: true
defaultUsername: admin@example.com
submitter: Umbrel
submission: https://github.com/getumbrel/umbrel-apps/pull/347