Add: InvoiceShelf

This commit is contained in:
DrMxrcy
2024-11-12 13:12:31 -05:00
parent 0799f8e04c
commit 4f092b2fb3
4 changed files with 103 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -0,0 +1,55 @@
version: "3.8"
services:
invoiceshelf_db:
image: postgres:15
networks:
- dokploy-network
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_USER=${DB_USERNAME}
- POSTGRES_DB=${DB_DATABASE}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USERNAME}"]
interval: 10s
timeout: 5s
retries: 5
invoiceshelf:
image: invoiceshelf/invoiceshelf:latest
networks:
- dokploy-network
volumes:
- app_data:/data
- app_conf:/conf
environment:
- PHP_TZ=UTC
- TIMEZONE=UTC
- APP_NAME=InvoiceShelf
- APP_ENV=production
- APP_DEBUG=false
- APP_URL=http://${INVOICESHELF_HOST}
- DB_CONNECTION=pgsql
- DB_HOST=invoiceshelf_db
- DB_PORT=5432
- DB_DATABASE=${DB_DATABASE}
- DB_USERNAME=${DB_USERNAME}
- DB_PASSWORD=${DB_PASSWORD}
- CACHE_STORE=file
- SESSION_DRIVER=file
- SESSION_LIFETIME=120
- SESSION_ENCRYPT=true
- SESSION_PATH=/
- SESSION_DOMAIN=${INVOICESHELF_HOST}
- SANCTUM_STATEFUL_DOMAINS=${INVOICESHELF_HOST}
- STARTUP_DELAY=10
depends_on:
invoiceshelf_db:
condition: service_healthy
volumes:
postgres_data:
app_data:
app_conf:

View File

@@ -0,0 +1,34 @@
import {
type DomainSchema,
type Schema,
type Template,
generatePassword,
generateRandomDomain,
} from "../utils";
export function generate(schema: Schema): Template {
const mainDomain = generateRandomDomain(schema);
const dbPassword = generatePassword();
const dbUsername = "invoiceshelf";
const dbDatabase = "invoiceshelf";
const domains: DomainSchema[] = [
{
host: mainDomain,
port: 80,
serviceName: "invoiceshelf",
},
];
const envs = [
`INVOICESHELF_HOST=${mainDomain}`,
`DB_PASSWORD=${dbPassword}`,
`DB_USERNAME=${dbUsername}`,
`DB_DATABASE=${dbDatabase}`,
];
return {
domains,
envs,
};
}

View File

@@ -744,4 +744,18 @@ export const templates: TemplateData[] = [
tags: ["automation", "workflow", "no-code"],
load: () => import("./activepieces/index").then((m) => m.generate),
},
{
id: "invoiceshelf",
name: "InvoiceShelf",
version: "latest",
description: "InvoiceShelf is a self-hosted open source invoicing system for freelancers and small businesses.",
logo: "invoiceshelf.png",
links: {
github: "https://github.com/InvoiceShelf/invoiceshelf",
website: "https://invoiceshelf.com",
docs: "https://github.com/InvoiceShelf/invoiceshelf#readme",
},
tags: ["invoice", "business", "finance"],
load: () => import("./invoiceshelf/index").then((m) => m.generate),
},
];