Skip to content

Commit ccaa59e

Browse files
authored
Merge pull request #11 from LibreCodeCoop/docs/add-update-instructions
docs: add update instructions
2 parents bf9123e + ce566ec commit ccaa59e

2 files changed

Lines changed: 76 additions & 0 deletions

File tree

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,37 @@ If you need use a existing database, put your *.sql files on folder `volumes/mys
2525

2626
The database will persisted on folder `volumes/mysql/data`
2727

28+
## Update
29+
30+
> Two files needed to be modified in production because Kimai is no longer a 100% open source project, be careful not to remove the changes made
31+
32+
* Go to the akaunting folder
33+
```bash
34+
git pull origin main
35+
cd volumes/akaunting
36+
```
37+
38+
* Get the latest version of akaunting and apply the required patches
39+
```bash
40+
git pull origin master
41+
git apply ../../patches/akaunting-modifications.patch
42+
```
43+
44+
* Execute the following commands, one by one, do not copy and paste all at once:
45+
```bash
46+
docker compose exec php npm ci
47+
docker compose exec php npm run production
48+
docker compose exec php composer prod
49+
docker compose exec php php artisan update:all
50+
docker compose exec php php artisan cache:clear
51+
docker compose exec php php artisan optimize:clear
52+
docker compose exec php php artisan migrate
53+
chown -R www-data:www-data .
54+
```
55+
56+
## Troubleshooting
57+
* If you can't build the assets, copy the `volumes/akaunting/node_modules/` folder from another installation
58+
2859
## License
2960

3061
This project follows Akaunting licensing under the GPLv3 license.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php
2+
index 7fda971c7..6fe58d406 100644
3+
--- a/app/Http/Kernel.php
4+
+++ b/app/Http/Kernel.php
5+
@@ -50,7 +50,8 @@ class Kernel extends HttpKernel
6+
'api' => [
7+
'auth.basic.once',
8+
'auth.disabled',
9+
- 'throttle:api',
10+
+ //'throttle:api',
11+
+ //'throttle:600000,1',
12+
'permission:read-api',
13+
'company.identify',
14+
'bindings',
15+
diff --git a/app/Traits/Plans.php b/app/Traits/Plans.php
16+
index 02ce4d575..18361ed49 100644
17+
--- a/app/Traits/Plans.php
18+
+++ b/app/Traits/Plans.php
19+
@@ -89,6 +89,26 @@ trait Plans
20+
{
21+
$key = 'plans.limits';
22+
23+
+ $data = json_decode(<<<JSON
24+
+ {
25+
+ "user": {
26+
+ "action_status": true,
27+
+ "view_status": true,
28+
+ "message": ""
29+
+ },
30+
+ "company": {
31+
+ "action_status": true,
32+
+ "view_status": true,
33+
+ "message": ""
34+
+ },
35+
+ "invoice": {
36+
+ "action_status": true,
37+
+ "view_status": true,
38+
+ "message": ""
39+
+ }
40+
+ }
41+
+ JSON);
42+
+ return $data;
43+
return Cache::remember($key, Date::now()->addHour(), function () {
44+
$url = 'plans/limits';
45+

0 commit comments

Comments
 (0)