Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2eef842a8c | |||
| d362421a80 | |||
| c0619539e6 |
@ -1,7 +1,5 @@
|
||||
TYPE=akaunting
|
||||
|
||||
ENABLE_BACKUPS=true
|
||||
|
||||
DOMAIN=akaunting.example.com
|
||||
|
||||
COMPOSE_FILE="compose.yml"
|
||||
@ -29,4 +27,9 @@ COMPANY_EMAIL=my@company.com
|
||||
ADMIN_EMAIL=me@company.com
|
||||
|
||||
SECRET_MYSQL_PASSWORD_VERSION=v1
|
||||
SECRET_MYSQL_ROOT_PASSWORD_VERSION=v1
|
||||
SECRET_MYSQL_ROOT_PASSWORD_VERSION=v1
|
||||
SECRET_ADMIN_PASSWORD_VERSION=v1
|
||||
|
||||
## Enable API Fix to support offline use (without an API key)
|
||||
# COMPOSE_FILE="$COMPOSE_FILE:compose.api-fix.yml"
|
||||
# API_FIX=apply
|
||||
|
||||
10
README.md
10
README.md
@ -1,14 +1,14 @@
|
||||
# akaunting
|
||||
|
||||
Open-source quickbooks alternative, written in PHP.
|
||||
> One line description of the recipe
|
||||
|
||||
<!-- metadata -->
|
||||
|
||||
* **Category**: Apps
|
||||
* **Status**: 0
|
||||
* **Image**: [`akaunting`](https://hub.docker.com/r/akaunting), 4, upstream
|
||||
* **Healthcheck**: Yes
|
||||
* **Backups**: Yes
|
||||
* **Healthcheck**: No
|
||||
* **Backups**: No
|
||||
* **Email**: No
|
||||
* **Tests**: No
|
||||
* **SSO**: No
|
||||
@ -20,9 +20,5 @@ Open-source quickbooks alternative, written in PHP.
|
||||
* `abra app new akaunting --secrets`
|
||||
* `abra app config <app-name>`
|
||||
* `abra app deploy <app-name>`
|
||||
* Once the app is up and running, navigate to `https://${DOMAIN}` in your browser
|
||||
* Select your locale in step 1
|
||||
* In step 2, use `akaunting` as the database schema name and leave the other fields unchanged (they should have auto-populated based on the environment variables in the deployment)
|
||||
* In step 3, fill in whatever you desire for company and admin user information
|
||||
|
||||
For more, see [`docs.coopcloud.tech`](https://docs.coopcloud.tech).
|
||||
|
||||
1
abra.sh
1
abra.sh
@ -1,3 +1,4 @@
|
||||
# Set any config versions here
|
||||
# Docs: https://docs.coopcloud.tech/maintainers/handbook/#manage-configs
|
||||
export APP_ENTRYPOINT_VERSION=v1
|
||||
export API_FIX_VERSION=v1
|
||||
63
api-fix.patch
Normal file
63
api-fix.patch
Normal file
@ -0,0 +1,63 @@
|
||||
From f0bf18d4124aa480a0650eed771c57dfd85b7f6c Mon Sep 17 00:00:00 2001
|
||||
From: MIR
|
||||
Date: Wed, 12 Nov 2025 17:36:37 -0500
|
||||
Subject: [PATCH] Fix errors when API key unavailable
|
||||
|
||||
---
|
||||
app/Traits/Modules.php | 2 +-
|
||||
app/Traits/Plans.php | 26 ++++----------------------
|
||||
2 files changed, 5 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/app/Traits/Modules.php b/app/Traits/Modules.php
|
||||
index 8382b19e6..e91b33b2d 100644
|
||||
--- a/app/Traits/Modules.php
|
||||
+++ b/app/Traits/Modules.php
|
||||
@@ -26,7 +26,7 @@ trait Modules
|
||||
|
||||
$result = json_decode($response->getBody());
|
||||
|
||||
- return $result->success ? true : false;
|
||||
+ return true;
|
||||
}
|
||||
|
||||
// Get All Modules
|
||||
diff --git a/app/Traits/Plans.php b/app/Traits/Plans.php
|
||||
index 02ce4d575..b0501138d 100644
|
||||
--- a/app/Traits/Plans.php
|
||||
+++ b/app/Traits/Plans.php
|
||||
@@ -58,29 +58,11 @@ trait Plans
|
||||
|
||||
public function getPlanLimitByType($type): object
|
||||
{
|
||||
- if (! config('app.installed') || running_in_test()) {
|
||||
- $limit = new \stdClass();
|
||||
-
|
||||
- $limit->action_status = true;
|
||||
- $limit->view_status = true;
|
||||
- $limit->message = "Success";
|
||||
-
|
||||
- return $limit;
|
||||
- }
|
||||
-
|
||||
- if (! $data = $this->getPlanLimits()) {
|
||||
- $limit = new \stdClass();
|
||||
-
|
||||
- $limit->action_status = false;
|
||||
- $limit->view_status = false;
|
||||
- $limit->message = "Not able to create a new $type.";
|
||||
-
|
||||
- return $limit;
|
||||
- }
|
||||
-
|
||||
- $limit = $data->$type;
|
||||
+ $limit = new \stdClass();
|
||||
|
||||
- $limit->message = str_replace('{company_id}', company_id(), $limit->message);
|
||||
+ $limit->action_status = true;
|
||||
+ $limit->view_status = true;
|
||||
+ $limit->message = "Success";
|
||||
|
||||
return $limit;
|
||||
}
|
||||
--
|
||||
2.43.0
|
||||
12
compose.api-fix.yml
Normal file
12
compose.api-fix.yml
Normal file
@ -0,0 +1,12 @@
|
||||
---
|
||||
services:
|
||||
app:
|
||||
configs:
|
||||
- source: api_fix
|
||||
target: /var/www/html/api-fix.patch
|
||||
mode: 0644
|
||||
|
||||
configs:
|
||||
api_fix:
|
||||
name: ${STACK_NAME}_api_fix_${API_FIX_VERSION}
|
||||
file: api-fix.patch
|
||||
28
compose.yml
28
compose.yml
@ -1,7 +1,7 @@
|
||||
---
|
||||
services:
|
||||
app:
|
||||
image: docker.io/akaunting/akaunting:3.1.19
|
||||
image: docker.io/akaunting/akaunting:latest
|
||||
networks:
|
||||
- proxy
|
||||
- backend
|
||||
@ -31,12 +31,12 @@ services:
|
||||
## Enable backups: https://docs.coopcloud.tech/maintainers/handbook/#how-do-i-configure-backuprestore
|
||||
# - "backupbot.backup=true"
|
||||
# - "backupbot.backup.path=/some/path"
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost/serviceworker.js"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
start_period: 1m
|
||||
# healthcheck:
|
||||
# test: ["CMD", "curl", "-f", "http://localhost"]
|
||||
# interval: 30s
|
||||
# timeout: 10s
|
||||
# retries: 10
|
||||
# start_period: 1m
|
||||
volumes:
|
||||
- akaunting-data:/var/www/html
|
||||
secrets:
|
||||
@ -57,11 +57,6 @@ services:
|
||||
deploy:
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
labels:
|
||||
backupbot.backup: "${ENABLE_BACKUPS:-true}"
|
||||
backupbot.backup.pre-hook: "mariadb-dump --single-transaction -u root -p\"$$(cat /run/secrets/mysql_root_password)\" akaunting | gzip > /var/lib/mysql/dump.sql.gz"
|
||||
backupbot.backup.volumes.akaunting-db.path: "dump.sql.gz"
|
||||
backupbot.restore.post-hook: "gzip -d /var/lib/mysql/dump.sql.gz && mariadb -u root -p\"$$(cat /run/secrets/mysql_root_password)\" akaunting < /var/lib/mysql/dump.sql && rm -f /var/lib/mysql/dump.sql"
|
||||
environment:
|
||||
- MYSQL_DATABASE=akaunting
|
||||
- MYSQL_USER=admin
|
||||
@ -70,6 +65,11 @@ services:
|
||||
secrets:
|
||||
- mysql_password
|
||||
- mysql_root_password
|
||||
labels:
|
||||
backupbot.backup: "${ENABLE_BACKUPS:-true}"
|
||||
backupbot.backup.pre-hook: "mariadb-dump --single-transaction -u root -p\"$$(cat /run/secrets/mysql_root_password)\" akaunting | gzip > /var/lib/mysql/dump.sql.gz"
|
||||
backupbot.backup.volumes.akaunting-db.path: "dump.sql.gz"
|
||||
backupbot.restore.post-hook: "gzip -d /var/lib/mysql/dump.sql.gz && mariadb -u root -p\"$$(cat /run/secrets/mysql_root_password)\" akaunting < /var/lib/mysql/dump.sql && rm -f /var/lib/mysql/dump.sql"
|
||||
|
||||
volumes:
|
||||
akaunting-db:
|
||||
@ -87,8 +87,10 @@ networks:
|
||||
backend:
|
||||
proxy:
|
||||
external: true
|
||||
internal:
|
||||
|
||||
configs:
|
||||
app_entrypoint:
|
||||
name: ${STACK_NAME}_app_entrypoint_${APP_ENTRYPOINT_VERSION}
|
||||
file: docker-entrypoint.sh
|
||||
file: docker-entrypoint.sh.tmpl
|
||||
template_driver: golang
|
||||
@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
DB_PASSWORD=$(cat /run/secrets/mysql_password)
|
||||
export DB_PASSWORD
|
||||
|
||||
/usr/local/bin/akaunting.sh --start
|
||||
11
docker-entrypoint.sh.tmpl
Normal file
11
docker-entrypoint.sh.tmpl
Normal file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
export DB_PASSWORD=$(cat /run/secrets/mysql_password)
|
||||
export ADMIN_PASSWORD=$(cat /run/secrets/admin_password)
|
||||
|
||||
{{ if eq (env "API_FIX") "apply" }}
|
||||
cd /var/www/html
|
||||
patch --batch --forward -p1 < ./api-fix.patch
|
||||
{{ end }}
|
||||
|
||||
/usr/local/bin/akaunting.sh --start
|
||||
Reference in New Issue
Block a user