Compare commits

...

412 Commits

Author SHA1 Message Date
David Bomba
f79afe3dcf Set default memory limit 2025-12-18 09:06:57 +11:00
David Bomba
720d17aac0 Merge pull request #833 from benbrummer/octane
unicode emoji for dockerhub
2025-11-05 09:46:19 +11:00
Benjamin Brummer
8d53a0d915 unicode emoji 2025-11-04 14:11:16 +01:00
David Bomba
a29e6f3d18 Fixes for release for debian/octane 2025-11-04 10:00:06 +11:00
David Bomba
48fd2fdf9d Merge pull request #830 from benbrummer/octane
url as argument
2025-10-30 06:58:10 +11:00
Benjamin Brummer
97c2a4cf27 url as argument 2025-10-29 13:48:44 +01:00
David Bomba
026d00dea0 Merge pull request #828 from benbrummer/octane
Align octane with debian
2025-10-29 10:52:51 +11:00
Benjamin Brummer
7848cf055a fix typo 2025-10-28 14:58:43 +01:00
Benjamin Brummer
5434c1e6da update badges 2025-10-28 14:55:27 +01:00
Benjamin Brummer
de60faec4d rename paths in workflow 2025-10-28 14:48:44 +01:00
Benjamin Brummer
41c0b26efb fix tar extraction 2025-10-28 14:46:35 +01:00
Benjamin Brummer
670eb2ce33 Set context to octane 2025-10-28 14:35:17 +01:00
Benjamin Brummer
ea35d304df Use ADD instead of RUN 2025-10-28 14:34:59 +01:00
Benjamin Brummer
64382d89ad Rename files and folders to octane 2025-10-28 14:31:07 +01:00
Benjamin Brummer
7dfe1dadc1 rename files to octane 2025-10-28 14:22:14 +01:00
Benjamin Brummer
7d518c24dc align workflows with debian 2025-10-28 14:20:35 +01:00
David Bomba
a4289dffa3 Merge pull request #817 from benbrummer/octane
Compose file refactoring - Octane
2025-10-01 18:12:08 +10:00
Benjamin Brummer
54e5031703 Default timing configuration for healthcheck should be sufficient 2025-10-01 07:49:24 +02:00
Benjamin Brummer
7eee4e770e disable json logs 2025-10-01 07:37:30 +02:00
Benjamin Brummer
cc2cc537b5 Use docker default logging configuration 2025-10-01 07:34:49 +02:00
benbrummer
5361a2dabf Merge branch 'invoiceninja:octane' into octane 2025-09-30 13:40:56 +02:00
Benjamin Brummer
de1a30979d Do not pass all variables into mysql container 2025-09-30 13:40:07 +02:00
Benjamin Brummer
26aa6b45c1 Mounting .env file is redundant with env_file: 2025-09-30 13:39:14 +02:00
David Bomba
4de9066b39 Merge pull request #813 from benbrummer/octane
Push README.md to Dockerhub
2025-09-30 20:49:36 +10:00
Benjamin Brummer
65fbd0bd5d Use default depth for checkout 2025-09-30 12:40:21 +02:00
Benjamin Brummer
eecea97f7c Push README.md to Dockerhub 2025-09-30 12:37:35 +02:00
David Bomba
ad2a8b35dc Merge pull request #809 from benbrummer/octane
Remove artisan package:discover
2025-09-30 07:07:17 +10:00
Benjamin Brummer
6f9de01d3b matrix build with arm runners 2025-09-29 22:27:42 +02:00
Benjamin Brummer
fa5d522a36 Update upgrade instructions 2025-09-29 14:11:58 +02:00
Benjamin Brummer
84a42794d3 remove package discovery command from production setup 2025-09-29 14:08:50 +02:00
David Bomba
9cd585678c Merge pull request #807 from benbrummer/octane
Optimize artisan commands
2025-09-29 08:09:36 +10:00
Benjamin Brummer
8899d3e956 optimize artisan commands 2025-09-28 10:39:29 +02:00
Benjamin Brummer
f22c7b4f59 Increas start-period as first run might take a long time 2025-09-28 10:39:15 +02:00
David Bomba
d728221b0b Merge pull request #796 from benbrummer/octane
Create app/public
2025-09-09 07:31:43 +10:00
benbrummer
be451b454f Create app/public
Signed-off-by: benbrummer <info@benjamin-brummer.de>
2025-09-08 16:42:23 +02:00
David Bomba
184564e022 Merge pull request #795 from benbrummer/octane
Use correct image for octane
2025-09-05 09:04:31 +10:00
Benjamin Brummer
2f31fc0da8 remove .gitignore and .editorconfig 2025-09-04 21:42:46 +02:00
Benjamin Brummer
7a37b9641d remove folders for bind mounts 2025-09-04 21:42:13 +02:00
Benjamin Brummer
1917de0046 align APP_URL with docker-compose.yaml port 2025-09-04 21:35:36 +02:00
Benjamin Brummer
c9f91b4a45 use octane image in compose file 2025-09-04 21:34:52 +02:00
David Bomba
0117fbd93e Merge pull request #791 from turbo124/octane
Rollback to 8.4
2025-09-03 07:27:52 +10:00
David Bomba
fc7b94a223 Rollback to 8.4 2025-09-03 07:27:05 +10:00
David Bomba
281b6a15a4 Roll back to PHP 8.3 2025-09-02 18:54:36 +10:00
David Bomba
5e6d21646c Merge pull request #788 from benbrummer/octane
Workaround: Disable SSL for mariadb-client for compatibility with MySQL
2025-09-02 06:21:46 +10:00
benbrummer
17c1705fe7 Workaround: Disable SSL for mariadb-client for compatibility with MySQL
Signed-off-by: benbrummer <info@benjamin-brummer.de>
2025-09-01 21:34:09 +02:00
David Bomba
9180712245 Merge pull request #785 from benbrummer/octane
Debian Trixie and php 8.4
2025-08-29 22:02:11 +10:00
benbrummer
94582c4658 Debian Trixie and php 8.4
Signed-off-by: benbrummer <info@benjamin-brummer.de>
2025-08-29 12:57:23 +02:00
David Bomba
3e5035478d Merge pull request #774 from stavros-k/patch-1
Fix init.sh for octane
2025-08-20 07:57:03 +10:00
Stavros Kois
4e80bc01d0 correct dir 2025-08-19 15:58:36 +03:00
Stavros Kois
6e73e3af9d Update init.sh
Makes sure the storage directory exists, otherwise it will fail with

```sh
In ServerStateFile.php line 49:
                                       
  Unable to write to process ID file.  
```

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
2025-08-11 12:56:27 +03:00
David Bomba
9944d43f0b Merge pull request #765 from stavros-k/patch-1
Update init.sh
2025-07-07 08:42:59 +10:00
Stavros Kois
5eefcecf47 Update init.sh
Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
2025-07-03 13:57:12 +03:00
David Bomba
f80e7f2ec3 Merge pull request #752 from benbrummer/octane
saxon defaults now to 12.5.0
2025-05-11 09:44:33 +10:00
benbrummer
f5821630fa saxon defaults now to 12.5.0
Signed-off-by: benbrummer <info@benjamin-brummer.de>
2025-05-10 10:58:40 +02:00
David Bomba
1848f11a36 Merge pull request #751 from benbrummer/octane
align octane to debian
2025-05-08 19:41:31 +10:00
Benjamin Brummer
f96d4d4aa0 image versions as ARGs 2025-05-08 06:58:11 +00:00
Benjamin Brummer
5d29d3a052 align init.sh with invoiceninja-debian 2025-05-08 06:43:50 +00:00
Benjamin Brummer
0c607953ec HEALTHCHECK for laravel 2025-05-08 06:43:23 +00:00
Benjamin Brummer
ebc6c3642a remove cache volume and healthcheck configuration 2025-05-08 06:43:03 +00:00
David Bomba
ec35498159 set conditional for chrome / chromium path 2025-03-25 12:04:11 +11:00
David Bomba
4bff59808e Merge pull request #730 from benbrummer/octane
use github latest url, tar.gz without top level repository, mbstring
2025-03-19 10:05:07 +11:00
benbrummer
217c05bd1f use github latest url, tar.gz without top level repository, mbstring
Signed-off-by: benbrummer <info@benjamin-brummer.de>
2025-03-15 07:41:00 +01:00
David Bomba
24d1f9cd2e Merge pull request #714 from turbo124/octane
Fixes for publish image regression - force 22.04
2025-01-24 16:15:58 +11:00
David Bomba
9a3603b709 Fixes for publish image regression - force 22.04 2025-01-24 16:15:09 +11:00
David Bomba
c2bf3ca8d9 Merge pull request #709 from turbo124/octane
Change context dir from ./debian to debian
2025-01-24 14:28:42 +11:00
David Bomba
1c3f96e723 Change context dir from ./debian to debian 2025-01-24 14:28:11 +11:00
David Bomba
2364f53777 Merge pull request #708 from turbo124/octane
Debug php extension installer
2025-01-24 13:57:28 +11:00
David Bomba
7bfbe9ee03 Install each extension individually to identify the root cause 2025-01-24 13:56:44 +11:00
David Bomba
afd597456f Minor fixes for build files 2025-01-24 13:36:58 +11:00
David Bomba
243f46bd23 Merge pull request #707 from turbo124/octane
Fixes for php extension installer
2025-01-24 13:35:26 +11:00
David Bomba
6dfaa3b441 Fixes for php extension installer 2025-01-24 13:34:52 +11:00
David Bomba
6d0e0648e3 Fixes for php extension installer 2025-01-24 12:58:47 +11:00
David Bomba
85979fdcf2 Require mbstring 2025-01-24 09:22:36 +11:00
David Bomba
377c068667 Merge pull request #690 from benbrummer/octane
Octane
2025-01-15 08:18:57 +11:00
benbrummer
da7f8d93b0 Merge branch 'invoiceninja:octane' into octane 2025-01-13 13:40:31 +01:00
Benjamin Brummer
1d475a5218 php.ini with frankenphp/symfony recommendations 2025-01-12 00:57:51 +00:00
Benjamin Brummer
3a8184df73 fix for initialization with opcache.preload enabled 2025-01-12 00:56:21 +00:00
Benjamin Brummer
0c796fee5f use invoiceninja.tar.gz 2025-01-12 00:54:53 +00:00
David Bomba
bc5aa2e844 Merge pull request #686 from benbrummer/frankenphp
healthcheck for scheduler and worker
2025-01-11 16:40:22 +11:00
Benjamin Brummer
295bb6268b remove moiunt for php.ini 2025-01-10 07:32:58 +00:00
Benjamin Brummer
ff636077d4 --help flag for usage instructions 2025-01-10 07:31:35 +00:00
Benjamin Brummer
247f946422 include minimal php settings in the image 2025-01-10 07:31:03 +00:00
Benjamin Brummer
4c50bbad19 H3_GENERAL_PROTOCOL_ERROR only happens on Firefox 2025-01-09 13:23:29 +00:00
Benjamin Brummer
2e22177b20 permissions are already correct in the release artifact tar/tar.gz 2025-01-09 12:43:05 +00:00
Benjamin Brummer
dfc392580e healthcheck for scheduler and worker 2025-01-09 10:15:37 +00:00
David Bomba
260980f2a3 Merge pull request #685 from benbrummer/frankenphp
https for octane
2025-01-08 13:47:46 +11:00
Benjamin Brummer
57724b7d93 Single RUN for first stage to avoid insane build times 2025-01-07 11:51:09 +00:00
Benjamin Brummer
39b6680f0b added example command for https and caddy_data volume for persistent certificates 2025-01-07 10:04:24 +00:00
David Bomba
768df3c1dd Merge pull request #682 from benbrummer/frankenphp
Cleanup
2025-01-07 13:01:02 +11:00
Benjamin Brummer
7870b345ed composer is not needed 2025-01-05 16:57:56 +00:00
Benjamin Brummer
3c6ed5cda1 remove octane installation 2025-01-04 19:41:05 +00:00
Benjamin Brummer
2f43d4b45a php.ini refactoring 2025-01-04 18:52:36 +00:00
David Bomba
a71af868d2 Add build pipe for octane 2025-01-04 19:36:30 +11:00
David Bomba
237abe4aa8 Merge pull request #678 from benbrummer/frankenphp
Frankenphp
2025-01-03 13:47:40 +11:00
Benjamin Brummer
f680c8a59a require laravel/octane 2024-12-31 17:57:54 +01:00
Benjamin Brummer
8f51f3bc51 octane and multistage 2024-12-31 17:52:48 +01:00
Benjamin Brummer
e4c26dde5d Merge branch 'frankenphp' of https://github.com/benbrummer/dockerfiles into frankenphp 2024-12-28 09:25:43 +01:00
Benjamin Brummer
9c96e9d261 make mysql and redis available/default again 2024-12-28 09:25:25 +01:00
benbrummer
e1cde6b6be Merge branch 'invoiceninja:debian' into frankenphp 2024-12-28 08:58:49 +01:00
Benjamin Brummer
068acdd097 remove nginx, php-fpm and supervisord configuration 2024-12-28 08:36:19 +01:00
Benjamin Brummer
95aec27c65 Merge init scripts 2024-12-28 08:35:19 +01:00
Benjamin Brummer
6c6950d298 frankenphp, mariadb and valkey 2024-12-28 08:33:39 +01:00
David Bomba
3394694ffc Merge pull request #676 from benbrummer/debian
arm64 image with chromium
2024-12-24 18:28:05 +11:00
Benjamin Brummer
99f280319c saxon is available for arm64 and amd64 2024-12-21 20:38:44 +01:00
Benjamin Brummer
470a3d036d EXPOSE is already inherited from base image 2024-12-21 20:37:47 +01:00
Benjamin Brummer
514ebb74c6 No need to have arm64 and amd64 for php extensions 2024-12-21 20:37:16 +01:00
Benjamin Brummer
dc3b87140f Install chromium for arm64 2024-12-21 20:36:20 +01:00
Benjamin Brummer
c0afd971e1 mariadb is the default on debian 2024-12-21 20:32:22 +01:00
Benjamin Brummer
677cc44a15 remove gosu 2024-12-21 20:31:42 +01:00
David Bomba
91c7b1ea2a Merge pull request #673 from turbo124/debian
Updates for github actions
2024-12-11 09:55:32 +11:00
David Bomba
a508ccc41e Updates for github actions 2024-12-11 09:53:54 +11:00
David Bomba
d42f66617c Merge pull request #672 from brdns/debian
Remove nginx `[warn]` log when uploading
2024-12-10 06:10:58 +11:00
brdns
8746015041 Removes nginx logs when uploading: [warn] a client request body is buffered to a temporary file
[warn] a client request body is buffered to a temporary file
Was already fixed with commit bfc61fb64e
Then got reverted by commit 66408fccb2
2024-12-09 18:02:44 +01:00
David Bomba
53c38b65f9 Merge pull request #664 from benbrummer/debian-dev
dockerfile cleanup, apt reduction, php module configuration, allow to run custom CMD
2024-12-06 08:49:18 +11:00
Benjamin Brummer
473e38259f Merge remote-tracking branch 'origin/debian' into debian-dev
CMD was not properly handled
2024-12-05 13:57:10 +01:00
Benjamin Brummer
d538666600 final fix for if statement 2024-12-05 13:47:42 +01:00
Benjamin Brummer
0ace427585 - supervisord.conf defines nodaemon already
- Fix if statement
2024-12-05 13:35:32 +01:00
benbrummer
8c1357fc4c Merge branch 'debian' into debian-dev
Signed-off-by: benbrummer <info@benjamin-brummer.de>
2024-12-05 10:52:43 +01:00
Benjamin Brummer
806a340a00 - make it possible to run a custom CMD
- rename volume according to their origin
- Add arguments for required, suggested and extra php-modules
2024-12-05 10:34:45 +01:00
Benjamin Brummer
d437dab72c remove upload folder 2024-12-04 10:24:10 +01:00
Benjamin Brummer
d64ed83abf temporarly install gpg 2024-12-03 23:57:20 +01:00
Benjamin Brummer
337f38e0dc remove default values 2024-12-03 10:53:13 +01:00
David Bomba
5d5c036175 Merge pull request #667 from turbo124/debian
Patches for copying files
2024-12-03 15:01:54 +11:00
David Bomba
d5ed1935f7 set port 80 2024-12-03 15:01:08 +11:00
David Bomba
5e40e34943 run local init.sh file 2024-12-03 14:59:41 +11:00
David Bomba
c4e1d0e3a5 Updates for copy files 2024-12-03 14:49:58 +11:00
David Bomba
84dcb8caab Merge pull request #665 from turbo124/debian
Update dockerfile
2024-12-03 12:40:39 +11:00
Benjamin Brummer
733e72d5dd curl is already installed 2024-12-02 12:56:24 +01:00
Benjamin Brummer
7eaf6968d2 - fonts-noto-cjk-extra depends on fonts-noto-cjk
- *-dev packages are not required
- fonts depends on libpng16-16 (no dev)
2024-12-02 12:30:17 +01:00
Benjamin Brummer
66408fccb2 align php settings with recommendations opcache/jit from php.net (aligned for php 8.3 and 8.4), increased buffernumber to allow parallel requests without writing to file 2024-12-02 11:53:27 +01:00
Benjamin Brummer
79647d4f8c Fix do not delete public folder on container restart 2024-12-02 11:29:40 +01:00
Benjamin Brummer
067b5eb194 remove value, which matches default 2024-12-01 14:53:48 +01:00
Benjamin Brummer
eed358c32b extended gzip configuration 2024-12-01 14:38:48 +01:00
Benjamin Brummer
71909c73e0 configure chrome during installation 2024-12-01 13:46:58 +01:00
Benjamin Brummer
fab57c9db3 Ensure permissions on volumes are correct
mv public directory inside a single RUN to not increase the image
2024-12-01 12:11:57 +01:00
Benjamin Brummer
e7bc565745 Set correct owner, file and directory permissions. 2024-12-01 10:39:40 +01:00
Benjamin Brummer
87092bb8bd All directories apart of "uploads" exist already 2024-12-01 10:27:06 +01:00
Benjamin Brummer
5abd297c7f switch to user www-data before running tar. tar -o will set correct ownership afterwards. 2024-12-01 09:48:12 +01:00
Benjamin Brummer
8be252781f google-chrome only needs to have ownership for /var/www, which is by default owned by root 2024-12-01 09:42:29 +01:00
David Bomba
f281b33ea1 Update dockerfile 2024-11-30 22:05:28 +11:00
Benjamin Brummer
22d170a4e5 shrink directory configuration 2024-11-29 13:40:46 +01:00
Benjamin Brummer
f722c91d21 Merge chrome related configuration into one RUN 2024-11-29 11:04:11 +01:00
Benjamin Brummer
641b527702 fix if else 2024-11-29 10:48:14 +01:00
Benjamin Brummer
d139a48303 move google-chrome-stable related apt packages to arm64 2024-11-29 10:26:46 +01:00
benbrummer
a75b6f0a00 Merge branch 'invoiceninja:debian' into debian 2024-11-29 09:45:20 +01:00
David Bomba
113c700754 Merge pull request #663 from turbo124/debian
Corrective fixes for new dockerfile
2024-11-29 13:57:39 +11:00
David Bomba
b6be06c977 Corrective fixes for new dockerfile 2024-11-29 13:56:46 +11:00
benbrummer
8c53895c97 Merge branch 'invoiceninja:debian' into debian 2024-11-28 21:52:35 +01:00
Benjamin Brummer
8204465048 cleanup 2024-11-28 21:35:05 +01:00
David Bomba
baad65c737 Merge pull request #661 from benbrummer/debian
php 8.3 and apt package optimization
2024-11-29 07:17:52 +11:00
benbrummer
9fd35b874d second try for nginx
Signed-off-by: benbrummer <info@benjamin-brummer.de>
2024-11-28 16:18:05 +01:00
benbrummer
fe4993f8a3 set correct mount destination for nginx
Signed-off-by: benbrummer <info@benjamin-brummer.de>
2024-11-28 15:50:38 +01:00
Benjamin Brummer
b83fb831b9 - Use default laravel nginx and extend it with invoiceninja -specific settings
- Overwrite php.ini/php-fpm.ini settings with customized settings
2024-11-28 14:04:11 +01:00
Benjamin Brummer
687e74c983 Fix: app-1 for supervisor warning redirect_stderr 2024-11-28 10:55:29 +01:00
Benjamin Brummer
7644151370 memory limits are not aligned with php/opcache and cause error 500 2024-11-28 10:26:23 +01:00
Benjamin Brummer
c84f80f9a9 add build context to docker-compose.yml 2024-11-28 10:23:25 +01:00
Benjamin Brummer
6cfdca078f - Update to php 8.3
- Minimal system packages
  - additional packages will be handled as dependencies of google-chrome-stable (amd64
  - arm64 will still install all apt packages
- "--no-install-recommends" for apt-get
2024-11-28 10:22:05 +01:00
David Bomba
74ed1b2432 Merge pull request #659 from benbrummer/debian
install saxon 12.5.0 with install-php-extensions
2024-11-28 11:28:26 +11:00
Benjamin Brummer
b3b7f7b9f0 - install saxon with install-php-extensions
- replace deprecated apt-key
- artisan optimize will handle caches
2024-11-27 13:01:46 +01:00
David Bomba
a6d8f663ae Merge pull request #656 from benbrummer/debian
Use php.ini-production
2024-11-27 19:27:34 +11:00
David Bomba
3024f11a31 Merge pull request #658 from brdns/debian-dev
move client_max_body_size from default.conf to nginx.conf
2024-11-27 19:19:14 +11:00
Benjamin Brummer
6274c432d9 Fix access for nginx to storage/public 2024-11-26 17:16:09 +01:00
Brandon
f5afd3f527 Revert "Prevents swapping on pdf generation with Chrome"
This reverts commit 3ce5983131.
2024-11-26 16:28:04 +01:00
Brandon
3ce5983131 Prevents swapping on pdf generation with Chrome
Increase allowed memory usage of main container from 512M to 1G

This is useful particularly if the server uses a hard drive, which can drastically slow down pdf generation during swap
2024-11-26 16:22:38 +01:00
Brandon
bfc61fb64e client_max_body_size is a parameter of nginx.conf and not of default.conf (https://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size )
add client_body_buffer_size

prevents the following logs: [warn] a client request body is buffered to a temporary file
2024-11-26 16:07:27 +01:00
Benjamin Brummer
535d6d4c06 Refactoring docker-compose.yml 2024-11-26 12:50:59 +01:00
Benjamin Brummer
24d49a4374 refactoring dockerfile 2024-11-26 12:49:12 +01:00
Benjamin Brummer
30ad63f306 Use php.ini-production 2024-11-26 09:46:36 +01:00
David Bomba
60fd0aa79e Merge pull request #655 from turbo124/debian
Set home path for PHP when supervisor boots
2024-11-26 08:31:54 +11:00
David Bomba
d1786100ca Set home path for PHP when supervisor boots 2024-11-26 08:31:18 +11:00
David Bomba
f58ca724c9 Merge pull request #653 from turbo124/debian
Expose storage/ for nginx
2024-11-25 21:38:53 +11:00
David Bomba
53cadbf750 Expose storage/ for nginx 2024-11-25 21:38:26 +11:00
David Bomba
3fca330958 Merge pull request #651 from turbo124/debian
Updates for volume mounts
2024-11-25 11:39:13 +11:00
David Bomba
7d79b39bc2 Updates for volume mounts 2024-11-25 11:38:39 +11:00
David Bomba
aa271a1488 Merge pull request #650 from turbo124/debian
Add index.html to public/
2024-11-25 09:14:58 +11:00
David Bomba
451c1b872f Add index.html to public/ 2024-11-25 09:14:34 +11:00
David Bomba
5c74753da2 Merge pull request #648 from turbo124/debian
Updates for resolving filessystem
2024-11-24 19:58:47 +11:00
David Bomba
83f17aa669 Updates for resolving filessystem 2024-11-24 19:56:02 +11:00
David Bomba
394c4c8b5e Merge pull request #647 from turbo124/debian
Add storage link
2024-11-24 16:17:53 +11:00
David Bomba
9ed63a6762 add storage link 2024-11-24 15:48:15 +11:00
David Bomba
cb6d6d46c2 Merge pull request #646 from turbo124/debian
Adjustments for permissions
2024-11-24 11:51:49 +11:00
David Bomba
3b0e475de6 Adjustments for permissions 2024-11-24 11:50:13 +11:00
David Bomba
d5bb90fa04 Merge pull request #644 from turbo124/debian
Fixes for permissions on container init
2024-11-24 08:44:10 +11:00
David Bomba
1b62d86659 Fixes for permissions on container init 2024-11-24 08:43:50 +11:00
David Bomba
4431abcb88 Merge pull request #643 from turbo124/debian
Updates for permission handling in the container
2024-11-23 21:00:01 +11:00
David Bomba
d05e55a24e Updates for permission handling in the container 2024-11-23 20:58:56 +11:00
David Bomba
34e5043317 Merge pull request #642 from turbo124/debian
Fixes for tar command flags
2024-11-23 19:14:23 +11:00
David Bomba
6f92d1c155 Fixes for tar command flags 2024-11-23 19:13:59 +11:00
David Bomba
11330003a2 Merge pull request #641 from turbo124/debian
Updates for tar extraction
2024-11-23 19:01:32 +11:00
David Bomba
47b015af7c More explicity unpacking of .tar file 2024-11-23 19:00:45 +11:00
David Bomba
c6648a8511 Updates for tar extraction 2024-11-23 18:48:09 +11:00
David Bomba
de2036adff Merge pull request #640 from turbo124/debian
Fixes for tar command flags
2024-11-23 17:07:22 +11:00
David Bomba
ea8c5fed8e Fixes for tar command flags 2024-11-23 17:07:00 +11:00
David Bomba
c2f8cedc4a Merge pull request #639 from turbo124/debian
Enforce latest tags during build
2024-11-23 17:02:05 +11:00
David Bomba
7ddfe8a793 Enforce latest tags 2024-11-23 17:01:28 +11:00
David Bomba
196e66e06d updates for container 2024-11-23 16:57:44 +11:00
David Bomba
7498a94bd1 Merge pull request #638 from turbo124/debian
Update readme
2024-11-23 16:33:49 +11:00
David Bomba
8289c6c65e Update readme 2024-11-23 16:23:14 +11:00
David Bomba
b75ac4fd87 Update directory 2024-11-23 16:09:11 +11:00
David Bomba
94d3f6212e Merge pull request #636 from turbo124/debian
Update github action versions
2024-11-23 16:07:46 +11:00
David Bomba
a940bf2ed2 Update github action versions 2024-11-23 16:07:18 +11:00
David Bomba
76ca42bddb Merge pull request #635 from turbo124/debian
Finalize documentation
2024-11-23 14:26:12 +11:00
David Bomba
84194970b3 Merge branch 'debian' into debian
Signed-off-by: David Bomba <turbo124@gmail.com>
2024-11-23 14:26:06 +11:00
David Bomba
919e15fb40 Readme formatting 2024-11-23 14:24:50 +11:00
David Bomba
2b8bb21d04 Readme formatting 2024-11-23 14:24:14 +11:00
David Bomba
8ff82909c8 Updates for defaults 2024-11-23 14:20:08 +11:00
David Bomba
7ce743bd91 Shield Badges 2024-11-23 14:19:33 +11:00
David Bomba
ffc777d5f1 Shield Badges 2024-11-23 14:17:26 +11:00
David Bomba
1446bfabfc Shield Badges 2024-11-23 14:14:25 +11:00
David Bomba
5ae3240677 Update README.md
Signed-off-by: David Bomba <turbo124@gmail.com>
2024-11-23 14:12:02 +11:00
David Bomba
1fc60549c2 Update README.md
Signed-off-by: David Bomba <turbo124@gmail.com>
2024-11-23 14:10:04 +11:00
David Bomba
a5ad84f22b Merge pull request #634 from turbo124/debian
conditionally build saxon on amd64 only.
2024-11-23 09:44:06 +11:00
David Bomba
e5847a6ff1 Conditionally build saxon on amd64 2024-11-23 09:43:28 +11:00
David Bomba
1c1bc350dc Rename gh action 2024-11-23 08:58:24 +11:00
David Bomba
e83372d437 Merge pull request #633 from turbo124/debian
fixes for amd64 builds
2024-11-23 08:52:09 +11:00
David Bomba
22b2f5416a fixes for amd64 builds 2024-11-23 08:51:42 +11:00
David Bomba
dbb671eeab Merge pull request #632 from turbo124/debian
Fixes for build stages on different architectures.
2024-11-23 08:44:00 +11:00
David Bomba
baf7b2bff7 Conditional builds for google chrome 2024-11-23 08:43:25 +11:00
David Bomba
db7c7de624 Fixes for trailing backslashes 2024-11-23 08:41:54 +11:00
David Bomba
e8b62de217 Merge pull request #631 from turbo124/debian
Remove alpine build from Debian branch
2024-11-23 08:32:54 +11:00
David Bomba
065a7f94e6 Remove alpine build from Debian branch 2024-11-23 08:32:31 +11:00
David Bomba
47c2ee05b9 Merge pull request #630 from turbo124/debian
Fixes for publish release
2024-11-23 08:30:56 +11:00
David Bomba
adeba71a55 Fixes for publish release 2024-11-23 08:30:31 +11:00
David Bomba
65d5904f35 Merge pull request #629 from turbo124/debian
Fixes for publish release
2024-11-23 08:27:31 +11:00
David Bomba
00a346853c Fixes for publish release 2024-11-23 08:27:03 +11:00
David Bomba
ee74e6170c Merge pull request #628 from turbo124/debian
Debian
2024-11-22 19:05:41 +11:00
David Bomba
857eaf86bb Cleanup build iamge 2024-11-22 17:01:40 +11:00
David Bomba
b8dbe76900 Fixes for incorrect build path 2024-11-22 16:43:46 +11:00
David Bomba
bf07c49d31 Fixes for incorrect build path 2024-11-22 16:42:06 +11:00
David Bomba
397d19c06d Fixes for incorrect build path 2024-11-22 16:40:01 +11:00
David Bomba
4d16fb2efc Fixes for incorrect build path 2024-11-22 16:37:41 +11:00
David Bomba
01b30fdb1a Fixes for incorrect build path 2024-11-22 16:35:04 +11:00
David Bomba
814b8bd283 Fixes for incorrect build path 2024-11-22 16:32:19 +11:00
David Bomba
201a229ec7 Remove redundant gh builds 2024-11-22 16:29:10 +11:00
David Bomba
1a144db29a remove duplicate font-liberation 2024-11-22 16:26:32 +11:00
David Bomba
655e7b61ea change image name 2024-11-22 16:09:15 +11:00
David Bomba
113ed64aee Change installation of google-chrome in gh actions 2024-11-22 16:08:26 +11:00
David Bomba
6430ddcb92 Update readme 2024-11-22 16:03:08 +11:00
David Bomba
7a9d5f7187 Add build steps 2024-11-22 15:42:59 +11:00
David Bomba
eeaaf95d47 Complete build pipeline to include debian image 2024-11-22 15:37:45 +11:00
David Bomba
b338ef90cb Enable opcache 2024-11-22 14:01:12 +11:00
David Bomba
1f778c0945 updates for debian 2024-11-22 13:48:50 +11:00
David Bomba
b65257db66 New debian pipe 2024-11-22 10:45:30 +11:00
David Bomba
9941847af7 Merge pull request #608 from turbo124/master
Add intl extension
2024-07-08 09:44:43 +10:00
David Bomba
edf21b5d4f Add intl extension 2024-07-08 09:21:29 +10:00
David Bomba
7acd479cfd Merge pull request #593 from turbo124/master
Changes for release filename
2024-06-24 09:06:16 +10:00
David Bomba
bed751ce18 Changes for release filename 2024-06-24 09:05:48 +10:00
David Bomba
303bc81d3d Merge pull request #517 from Leopere/patch-1
Please don't bind mysql to all interfaces with default credentials in Docker-compose
2024-06-23 13:59:00 +10:00
David Bomba
47e5c41a19 Merge pull request #587 from Daniel15/patch-1
php.ini: Update opcache.preload example to use correct path
2024-06-12 16:43:49 +10:00
Daniel Lo Nigro
89a994b12f php.ini: Update opcache.preload to use correct path
Signed-off-by: Daniel Lo Nigro <d@d.sb>
2024-06-11 23:05:20 -07:00
David Bomba
5984339118 Merge pull request #586 from turbo124/master
Fixes for resource path download
2024-06-09 13:32:22 +10:00
David Bomba
47dba02b27 Fixes for build 2024-06-09 13:31:38 +10:00
David Bomba
1aca36878c Fixes for download url 2024-06-09 12:42:49 +10:00
David Bomba
cf324703a8 Merge pull request #585 from turbo124/master
Fixes for build
2024-06-09 12:32:11 +10:00
David Bomba
df2ea66cda Fixes for build 2024-06-09 12:31:47 +10:00
David Bomba
02eed022ac Merge pull request #584 from turbo124/master
Fixes for build
2024-06-09 12:30:28 +10:00
David Bomba
738546d7b1 Add back fonts 2024-06-09 12:30:02 +10:00
David Bomba
e31a2b77bc Fies for downloading package 2024-06-09 12:29:25 +10:00
David Bomba
50debff2da Fixes for build 2024-06-09 11:57:23 +10:00
David Bomba
492d895d06 Merge pull request #583 from turbo124/master
Fixes for build
2024-06-09 11:38:28 +10:00
David Bomba
51294f6b76 Fixes for build 2024-06-09 11:38:04 +10:00
David Bomba
81617a3dec Updates for build 2024-06-07 21:10:51 +10:00
David Bomba
a874ceb7c2 Merge pull request #581 from chaseSpace/master
build: add Chinese font pkg support
2024-06-06 13:06:47 +10:00
Leigg
4a3d8783d4 build: add Chinese font pkg support
Signed-off-by: Leigg <34116031+chaseSpace@users.noreply.github.com>
2024-06-06 09:44:17 +08:00
David Bomba
84a6637f80 Merge pull request #575 from julianengel/patch-1
Added GoCardless/Nordigen key to env file
2024-05-02 08:35:54 +10:00
Julian Engel
821f3f5ec7 Added GoCardless/Nordigen key to env file
Signed-off-by: Julian Engel <julianengel@users.noreply.github.com>
2024-05-01 15:47:35 +02:00
David Bomba
dafd4051d3 Merge pull request #572 from turbo124/master
Updates for react release
2024-04-05 08:45:27 +11:00
David Bomba
c6b44487f3 Updates for react release 2024-04-05 08:45:03 +11:00
David Bomba
b2e03ce544 Merge pull request #570 from turbo124/master
Rollback copy
2024-04-05 07:29:10 +11:00
David Bomba
78fd70118a Rollback copy 2024-04-05 07:28:47 +11:00
David Bomba
59616eada8 Merge pull request #569 from turbo124/master
Set react as default interface
2024-04-04 22:02:58 +11:00
David Bomba
0fab60378a Improvements for build 2024-04-04 22:02:17 +11:00
David Bomba
47db01612d Improvements for build 2024-04-04 22:01:41 +11:00
David Bomba
1a1cea632b Merge pull request #568 from turbo124/master
Refactor build steps
2024-04-04 20:05:01 +11:00
David Bomba
5609b988f3 Refactor build steps 2024-04-04 20:04:13 +11:00
David Bomba
0f9d39998f Merge pull request #561 from anojht/patch-1
Fix Docker builds for circular dependency in project
2024-01-21 21:27:02 +11:00
Anojh Thayaparan
fd01abb0a0 set workdir to fix npm install step 2024-01-20 23:55:07 -08:00
Anojh Thayaparan
6887e2b30a Revert old approach 2024-01-20 21:09:28 -08:00
Anojh Thayaparan
6faf1dc135 Rename final build stage to prod for CI/CD pipeline setup 2024-01-20 21:00:49 -08:00
Anojh Thayaparan
d7cd59c80f Fix Docker builds for circular dependency in project
Due to the circular dependency of livewire JS module from composer, without intermediate build stages the Docker build fails during the vite build stage due to missing module.

The changes here allow composer install to run then copies the vendor folder to an intermediate stage in order to complete the vite build with the livewire dependency being present.

Then the contents are copied back in another intermediate stage to the php environment to complete the build.

Signed-off-by: Anojh Thayaparan <anojh@hotmail.com>
2024-01-20 20:55:41 -08:00
David Bomba
8206377870 Merge pull request #560 from turbo124/master
Updates for broken build pipeline
2024-01-21 12:53:02 +11:00
David Bomba
93214291c9 v5.8.13 2024-01-21 12:52:08 +11:00
David Bomba
f3477e6e80 Updates for DockerFile 2024-01-18 20:27:00 +11:00
David Bomba
d766e8284c Merge pull request #559 from turbo124/master
Bump for Node version
2024-01-18 19:45:27 +11:00
David Bomba
08e24b4b01 Bump for Node version 2024-01-18 19:44:44 +11:00
David Bomba
43cc7417ba Merge pull request #541 from turbo124/master
Fixes for vite build
2023-09-30 10:34:18 +10:00
David Bomba
150abf1d6e Fixes for vite build 2023-09-30 10:33:38 +10:00
David Bomba
31b3d309b3 Merge pull request #540 from turbo124/master
Updates for react build
2023-09-21 13:36:49 +10:00
David Bomba
cb74a1f93b Updates for react build 2023-09-21 13:32:22 +10:00
David Bomba
f566ec5715 Merge pull request #539 from turbo124/master
Create react version dir
2023-09-21 08:51:23 +10:00
David Bomba
91cc86af6d Create react version dir 2023-09-21 08:51:04 +10:00
David Bomba
7bac478538 Merge pull request #538 from turbo124/master
Refactor for react builds
2023-09-21 08:47:39 +10:00
David Bomba
f93fa6b874 refactor for react builds 2023-09-21 08:46:25 +10:00
David Bomba
d9a40ebb43 Merge pull request #537 from turbo124/master
Updates for react build
2023-09-21 07:30:17 +10:00
David Bomba
db5d0ebf50 Updates for react build 2023-09-21 07:29:42 +10:00
David Bomba
926b3d618b Merge pull request #536 from turbo124/master
Improve react support in dockerfile
2023-09-20 22:15:28 +10:00
David Bomba
85d256a435 Improve react support in dockerfile 2023-09-20 22:14:49 +10:00
David Bomba
acf9c22ff7 looping in react folder 2023-09-20 18:16:37 +10:00
David Bomba
b0ebac9719 improve react builds for Docker 2023-09-20 17:42:31 +10:00
David Bomba
65c5ceb69b Merge pull request #535 from turbo124/master
Fixes for stale react files
2023-09-18 16:03:33 +10:00
David Bomba
6aa39b4b57 Fixes for stale react files 2023-09-18 16:02:54 +10:00
David Bomba
c4ac430d1b Merge pull request #532 from turbo124/master
Disable access to php scripts in /storage
2023-09-06 00:10:50 +10:00
David Bomba
87066953d3 Disable access to php scripts in /storage 2023-09-06 00:05:54 +10:00
Ffaen
3969a37852 Bump chart version to 5.6.24 (#527) 2023-08-29 22:07:23 +08:00
David Bomba
bec60de1e7 Merge pull request #524 from turbo124/master
Updates for docker files to use PHP 8.2
2023-07-09 16:21:07 +10:00
David Bomba
c0150debbf Updates for docker files to use PHP 8.2 2023-07-09 16:20:45 +10:00
David Bomba
f45261617f Merge pull request #521 from turbo124/master
Fixes for React builds
2023-07-07 17:59:18 +10:00
David Bomba
21b6cf1f26 Fixes for React builds 2023-07-07 17:58:46 +10:00
David Bomba
d3a4948641 Merge pull request #519 from turbo124/master
Adds options to use config bases php.ini
2023-07-07 16:43:28 +10:00
David Bomba
a9a6b72c7a Position composer dump correctly 2023-07-07 16:43:06 +10:00
David Bomba
4fd6ca33c8 Do no use scripts in composer i 2023-07-07 16:29:57 +10:00
David Bomba
bca8404f5f work around for failing image build 2023-07-06 23:54:13 +10:00
David Bomba
3cf7c28875 Update cache buster 2023-07-06 22:03:26 +10:00
David Bomba
96dee55e7f Revert back to stable 2023-07-06 17:22:27 +10:00
David Bomba
ae592a8407 Revert back to stable 2023-07-06 17:19:27 +10:00
David Bomba
b72757ead0 Fixes for composer 2023-07-06 17:09:50 +10:00
David Bomba
a20fc14683 Add debug to package discovery 2023-07-06 16:00:48 +10:00
David Bomba
0e2934d1e3 Fixes for package discovery 2023-07-06 15:44:39 +10:00
David Bomba
fefc51ccf1 Fixes for package discovery 2023-07-06 14:51:50 +10:00
David Bomba
acdd6851ff fixes for build 2023-07-06 14:05:41 +10:00
David Bomba
6ff8e04aa7 Update cache buster 2023-07-06 13:53:01 +10:00
David Bomba
86f1dd43cf debugging composer 2023-07-06 13:24:16 +10:00
David Bomba
cc1f569324 fixes for composer 2023-07-06 12:49:41 +10:00
David Bomba
c78f7a7bdf fixes for composer 2023-07-06 12:47:13 +10:00
David Bomba
7198222787 debug composer failures 2023-07-06 12:36:12 +10:00
David Bomba
4ef4531a4e Ensure composer is present 2023-07-06 12:17:56 +10:00
David Bomba
c51d113abe Fixes for builds 2023-07-06 11:11:47 +10:00
David Bomba
dddd558873 Fixes for custom php.ini 2023-07-06 11:00:37 +10:00
David Bomba
5727550983 Add options for using config bases php.ini 2023-07-06 10:49:28 +10:00
David Bomba
03536efb6a Add options for using config bases php.ini 2023-07-06 10:48:50 +10:00
Leopere
6a05bdbbd5 Update docker-compose.yml
Please don't do this. Default credentials on the sql container in the .env file and then bind blindly 3305 on all interfaces for the public  to log in with ninja//ninja
2023-06-23 11:06:27 -04:00
David Bomba
e5debf03d4 Merge pull request #509 from invoiceninja/revert-506-feat/init-traefik-config
Revert "add traefik config example"
2023-04-29 09:02:03 +10:00
David Bomba
33a55e362b Revert "add traefik config example" 2023-04-29 09:01:55 +10:00
David Bomba
70e1de9a95 Merge pull request #506 from Access-InTech/feat/init-traefik-config
add traefik config example
2023-04-29 08:31:38 +10:00
Xenion1987
e1b113bba1 add http-01 example 2023-04-28 19:29:31 +02:00
Xenion1987
c967aaccf4 add traefik config example 2023-04-25 12:39:11 +02:00
David Bomba
15aefa698b Merge pull request #500 from turbo124/master
Update release endpoint
2023-03-01 11:31:05 +11:00
David Bomba
c9beedc84b Update release endpoint 2023-03-01 11:30:48 +11:00
David Bomba
d409d9696a Merge pull request #499 from turbo124/master
Update react files on init()
2023-02-28 19:33:49 +11:00
David Bomba
7d977a41e3 Update react files on init() 2023-02-28 19:33:17 +11:00
David Bomba
8db5c792a8 Merge pull request #496 from turbo124/master
Minor fixes for paths
2023-02-10 07:58:10 +11:00
David Bomba
b3768cbed3 Minor fixes for paths 2023-02-10 07:57:47 +11:00
David Bomba
25d2d1d271 Merge pull request #494 from turbo124/master
Build docker with react bundled
2023-02-09 19:20:30 +11:00
David Bomba
abfb5d1338 Build docker with react bundled 2023-02-08 23:30:51 +11:00
David Bomba
300c2d236d Merge pull request #488 from Xenion1987/patch-1
disable nginx version output
2023-01-14 09:35:35 +11:00
Marvin Moldenhauer
56e451ea8b disable nginx version output
Add `server_tokens off;` to not display nginx version in HTTP headers output.

server_tokens on:
server: nginx/1.23.3

server_tokens on:
server: nginx
2023-01-13 18:37:56 +01:00
Ween Jiann
ad3ffc227d Add ipv6 support to chart (#484) 2022-12-24 14:48:36 +08:00
Ween Jiann
e64db79c75 Re-trigger chart release (#483) 2022-12-23 12:58:42 +08:00
Ween Jiann
5fcad81fc2 Update release chart action (#482) 2022-12-23 12:53:04 +08:00
Ween Jiann
2e383ef879 Update chart dependencies (#476)
* Update chart dependencies

* Update IN version

* Update lock file

* Update README.md
2022-12-23 12:47:07 +08:00
Ween Jiann
bb6b3dc1e8 Update k8s versions for chart testing action (#481) 2022-12-23 12:36:03 +08:00
Ween Jiann
4a7b28f1d0 Fix: remove v prefix from kubeconform (#480) 2022-12-23 12:29:23 +08:00
Ween Jiann
1699ddde65 Fix: kind versions in chart testing (#479) 2022-12-23 00:32:00 +08:00
Ween Jiann
63431878b8 Fix: wrong name in chart testing action (#478) 2022-12-23 00:24:51 +08:00
Ween Jiann
03cc1ff548 Update chart testing action (#477) 2022-12-23 00:15:18 +08:00
Jonathan Starck
4aa7a7032c Add native support MYSQL8 (#462)
* Add native Support for MYSQL Version 8.x

* Adaptation of the documentation for MYSQL 8.x

* Backup note added
2022-10-27 17:37:07 +08:00
David Bomba
4fa02c2785 Merge pull request #464 from turbo124/master
Fixes for fonts
2022-10-06 12:54:05 +11:00
David Bomba
d25210c8b9 Fixes for fonts 2022-10-06 12:53:44 +11:00
David Bomba
f97fdda827 Merge pull request #463 from turbo124/master
Additional fonts - chinese + arabic
2022-10-06 12:35:27 +11:00
David Bomba
5188c45b41 Upgrade fonts 2022-10-06 12:34:52 +11:00
David Bomba
e3873bcac2 Merge branch 'master' of https://github.com/turbo124/dockerfiles 2022-10-06 12:32:11 +11:00
David Bomba
24ef742ce1 Update README.md 2022-10-02 20:41:25 +11:00
David Bomba
886dfe7832 Update README.md 2022-10-02 20:41:04 +11:00
David Bomba
0054620e55 Merge branch 'master' of https://github.com/turbo124/dockerfiles 2022-08-19 14:12:07 +10:00
David Bomba
4b82f750fc Update docker-compose.yml 2022-07-25 08:58:43 +10:00
David Bomba
97d339df4e Update Dockerfile 2022-07-25 08:58:19 +10:00
David Bomba
906cfb0c87 Merge pull request #453 from Psycho0verload/master
[BUGFIX] Error building the mysql backup build
2022-07-22 20:15:03 +10:00
Jonathan Starck
62a7f6d7cf [BUGFIX] TRUSTED_PROXIES is not in env
Bugfix for Issue #454
2022-07-22 12:08:42 +02:00
Jonathan Starck
1d97234b51 Change MYSQL5 to MYSQL5-Debian so that build works for the backup cronjob 2022-07-20 18:06:34 +02:00
David Bomba
aab280dcc1 Prep container for PHP 8.1 (#450) 2022-07-20 23:32:52 +08:00
David Bomba
faffcadc45 Prep container for PHP 8.1 2022-07-20 13:05:12 +10:00
David Bomba
25b3654a53 Merge pull request #437 from sleeyax/master
Bump helm version to 5.3.80
2022-04-20 11:26:52 +09:30
Sleeyax
46cd35bf32 Bump chart version 2022-04-20 02:20:39 +02:00
Sleeyax
53b4e6dafd Bump helm version to 5.3.80 2022-04-20 02:07:00 +02:00
David Bomba
27b6c82fe4 Merge pull request #428 from VeselaHouba/master
Revert #419 (email and password escaping)
2022-01-14 09:35:30 +11:00
Michalek
64fdd58ba9 Revert #419 (email and password escaping) 2022-01-13 23:31:21 +01:00
Ffaen
85519a0038 Bump helm version to 5.3.39 (#420) 2021-12-26 08:22:10 +08:00
Ffaen
5d5f34b7e7 Escape email and password upon IN User Creation (#419)
Fixes #415
2021-12-26 08:19:35 +08:00
David Bomba
774b8cb6eb Update Dockerfile 2021-12-12 18:55:12 +11:00
David Bomba
76a0886278 Update Dockerfile 2021-12-10 17:24:41 +11:00
Ffaen
2bac5707ae Bump helm version to 5.3.29 (#406)
* Bump helm version to 5.3.29

Closes #405

* Update charts/invoiceninja/Chart.yaml
2021-11-08 09:45:25 +08:00
Fabian
c17e37c4b8 Fix: mysqladmin ping timeout from 12 hours to 15 seconds (#392)
* Update deployment.yaml

Changed init-container "wait-db" for waiting 15 seconds instead of 12 hours (default) in case of a timeout

* Update Chart.yaml
2021-08-22 20:45:21 +08:00
Ween Jiann
08f9493f0d Release Candidate and change PDF generation key (#386)
* Fix PDF generation

* Default to internal Nginx

* Set Redis replica to 1

* Fix readme

* Updated dependency
2021-07-16 10:04:47 +08:00
David Bomba
40f483a32d Update README.md 2021-07-14 17:23:40 +10:00
David Bomba
eb58c26ebf Update env 2021-07-12 21:01:48 +10:00
Ween Jiann
d50bfde676 Remove storage persistence (#383) 2021-07-10 11:25:40 +08:00
Ween Jiann
c12e985f81 Refactor Github workflow files (#382)
* Refactor

* Add sha

* Add missing dash
2021-07-10 11:20:09 +08:00
Ween Jiann
8ef0df3d41 Check init via tinker (#381) 2021-07-10 02:43:43 +08:00
Ween Jiann
f55e9a2b49 Temporarily re-enable storage persistence (#380)
* Temporarily re-enable storage persistence

* Bump version
2021-07-10 01:04:30 +08:00
Ween Jiann
e3f47d2932 Add appURL override to chart (#379)
* Add appURL override

* Bump version
2021-07-10 00:42:44 +08:00
Ween Jiann
1636faf40d Add access modes to PVC in chart (#378)
* Add accessmodes

* Bump chart version
2021-07-09 22:23:18 +08:00
Ween Jiann
ea285c41ec Add Nginx to IN pod in chart (#377)
* Add inline-nginx

* Bump chart version

* Fix missing s in key

* Update lock file

* Add ingress
2021-07-09 20:48:21 +08:00
Ween Jiann
1537b87a3d Default persistence for storage to false in chart (#376)
* Default storage persistence to false

* Bump chart version

* Updated README.md
2021-07-09 16:37:56 +08:00
Ween Jiann
225c0eb275 Allow use of existing secret in chart (#375)
* Added existingSecrets

* Bump chart version
2021-07-09 11:42:15 +08:00
Ween Jiann
34878d0f93 Extend liveness probe delay to prevent first migration failure (#374)
* Change liveness probe type

* Change liveness probe values

* Bump chart version
2021-07-09 11:16:24 +08:00
Ween Jiann
8b9e69d51b Updated Redis chart dependencies (#372)
* Updated chart dependencies

* Change redis password flag
2021-07-08 02:11:39 +08:00
Ween Jiann
7238e521e6 Automatically set values for Nginx sub-chart based on install name (#370)
* Automatically set serverblock from IN chart

* Automatically set nginx PVC

* Bump chart version

* Upgrade dependencies

* Updated k8s test versions
2021-07-07 04:19:03 +08:00
Ween Jiann
5a1bf5c430 Refactor dockerfile for caching (#371)
* Improve caching

* Updated publish-image workflow
2021-07-06 17:11:08 +08:00
Ween Jiann
7a935a0eef Add caching to build (#369)
* Rename publish workflow

* Add caching to v5

* Updated cache buster
2021-07-02 21:42:18 +08:00
Ween Jiann
ff897d568f Change php-alpine from latest to 3.13 (#367) 2021-06-27 18:00:41 +08:00
David Bomba
b0bb0ffd25 Merge pull request #366 from turbo124/master
Rollback php-installer tags
2021-06-27 15:57:54 +10:00
David Bomba
3902b40bc1 remove tags 2021-06-27 15:55:52 +10:00
David Bomba
29e2d93e59 Merge pull request #365 from turbo124/master
Download php-installer
2021-06-27 15:21:28 +10:00
David Bomba
b7aea66e62 Download php-installer 2021-06-27 15:17:43 +10:00
David Bomba
e2db08f207 Update env
Set QUEUE_CONNECTION=database as default
2021-06-07 08:01:09 +10:00
Ffaen
59291d8687 Set trusted proxy value to allow invoiceninja to read nginx headers (#356)
Fixes #355
2021-05-27 00:32:56 +08:00
Ween Jiann
6f747207ec Add values for initial user creation to Chart (#350)
* Added user details in values.yaml

* Fix grammer in README.md

* Remove '1' suffix in DB config

* Add user password to secret

* Bump version

* Updated wait-db

* Bump IN version
2021-05-21 18:32:42 +08:00
Ween Jiann
c2aabd14ac Fix storageClass (#353) 2021-05-18 09:55:04 +08:00
Ffaen
07f1e601ab Update README to add information on env variables (#351)
* Update README to add information on env variables

References #349

* Set APP_URL to https if TLS enabled
2021-05-17 09:41:20 +08:00
Ween Jiann
13423d38c0 Fix chown in v4 (#348) 2021-05-14 09:45:32 +08:00
Ween Jiann
e34ac95617 Use logging with timestamp (#346) 2021-05-13 09:59:43 +08:00
Ween Jiann
6c68882449 Automatically create user and skip setup page (#345)
* Added checks to docker-entrypoint

* Add init scripts feature

* Added backward compatibility

* Added auto user creation

* Updated README.md and env

* Use dbCheck for checking DB connection
2021-05-13 09:41:08 +08:00
51 changed files with 736 additions and 2566 deletions

View File

@@ -1,24 +0,0 @@
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
# Matches multiple files with brace expansion notation
# Set default charset
[*.*]
charset = utf-8
# Tab indentation (no size specified)
[Makefile]
indent_style = tab
# Matches the files *.yml
[*.yml]
indent_style = space
indent_size = 2

View File

@@ -3,4 +3,4 @@ chart-dirs:
chart-repos:
- bitnami=https://charts.bitnami.com/bitnami
check-version-increment: true
debug: true
debug: false

View File

@@ -0,0 +1,48 @@
name: Build Octane Container Image
on:
pull_request:
paths:
- ".github/**"
- "octane/**"
push:
paths:
- ".github/**"
- "octane/**"
env:
REGISTRY_IMAGE: invoiceninja/invoiceninja-octane
jobs:
build:
runs-on: ${{ startsWith(matrix.platform, 'linux/arm') && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
strategy:
fail-fast: false
matrix:
platform:
- linux/amd64
- linux/arm64
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_IMAGE }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Build
id: build
uses: docker/build-push-action@v6
with:
context: octane
platforms: ${{ matrix.platform }}
tags: ${{ env.REGISTRY_IMAGE }}
outputs: type=image,push-by-digest=true,name-canonical=true
cache-from: type=gha
cache-to: type=gha,mode=max

View File

@@ -1,77 +0,0 @@
name: Publish Releases to Hub
# 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:
push:
tags-ignore:
- "invoiceninja-*"
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Prepare
id: prep
run: |
DOCKER_IMAGE=invoiceninja/invoiceninja
VERSION=edge
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
fi
TAGS="${DOCKER_IMAGE}:${VERSION}"
MAJOR="$(echo "${VERSION}" | cut -d. -f1)"
MINOR="$(echo "${VERSION}" | cut -d. -f2)"
TAGS="$TAGS,${DOCKER_IMAGE}:${MAJOR},${DOCKER_IMAGE}:${MAJOR}.${MINOR}"
if [[ $VERSION =~ ^5\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
TAGS="$TAGS,${DOCKER_IMAGE}:latest"
fi
echo ::set-output name=tags::${TAGS}
echo ::set-output name=version::${VERSION}
echo ::set-output name=major::${MAJOR}
- 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-${{ github.sha }}
# restore-keys: |
# ${{ runner.os }}-buildx-
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
builder: ${{ steps.buildx.outputs.name }}
context: ./alpine/${{ steps.prep.outputs.major }}/
build-args: INVOICENINJA_VERSION=${{ steps.prep.outputs.version }}
target: prod
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
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

View File

@@ -0,0 +1,166 @@
name: Publish Octane Container Images
on:
push:
tags-ignore:
- "invoiceninja-*"
env:
REGISTRY_IMAGE: invoiceninja/invoiceninja-octane
jobs:
version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
major: ${{ steps.version.outputs.major }}
minor: ${{ steps.version.outputs.minor }}
url: ${{ steps.version.outputs.url }}
steps:
- id: version
run: |
VERSION=edge
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
# Remove -o or -d suffix if present
VERSION=${VERSION%-*}
fi
MAJOR="$(echo "${VERSION}" | cut -d. -f1)"
MINOR="$(echo "${VERSION}" | cut -d. -f2)"
URL=https://github.com/invoiceninja/invoiceninja/releases/download/v${VERSION}/invoiceninja.tar.gz
# Debug output
echo "Current version: ${VERSION}"
echo "Version pattern check: $([[ $VERSION =~ ^5\.[0-9]{1,3}\.[0-9]{1,3}$ ]] && echo "matches" || echo "doesn't match")"
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "major=${MAJOR}" >> $GITHUB_OUTPUT
echo "minor=${MINOR}" >> $GITHUB_OUTPUT
echo "url=${URL}" >> $GITHUB_OUTPUT
build:
runs-on: ${{ startsWith(matrix.platform, 'linux/arm') && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
needs:
- version
strategy:
fail-fast: false
matrix:
platform:
- linux/amd64
- linux/arm64
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Prepare
id: prep
run: |
platform=${{ matrix.platform }}
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_IMAGE }}
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Build and push by digest
id: build
uses: docker/build-push-action@v6
with:
context: octane
build-args: URL=${{ needs.version.outputs.url }}
platforms: ${{ matrix.platform }}
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ env.REGISTRY_IMAGE }}
outputs: type=image,push-by-digest=true,name-canonical=true,push=${{ github.event_name != 'pull_request' }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Export digest
run: |
mkdir -p ${{ runner.temp }}/digests
digest="${{ steps.build.outputs.digest }}"
touch "${{ runner.temp }}/digests/${digest#sha256:}"
- name: Upload digest
uses: actions/upload-artifact@v4
with:
name: digests-${{ env.PLATFORM_PAIR }}
path: ${{ runner.temp }}/digests/*
if-no-files-found: error
retention-days: 1
merge:
runs-on: ubuntu-latest
needs:
- version
- build
steps:
- name: Download digests
uses: actions/download-artifact@v4
with:
path: ${{ runner.temp }}/digests
pattern: digests-*
merge-multiple: true
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_IMAGE }}
tags: |
${{ needs.version.outputs.version }}
${{ needs.version.outputs.major }}
${{ needs.version.outputs.major }}.${{ needs.version.outputs.minor }}
latest
- name: Create manifest list and push
working-directory: ${{ runner.temp }}/digests
if: ${{ github.event_name != 'pull_request' }}
run: |
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
- name: Inspect image
if: ${{ github.event_name != 'pull_request' }}
run: |
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}
Description:
if: ${{ github.event_name != 'pull_request' }}
runs-on: ubuntu-latest
needs:
- merge
steps:
- name: Checkout
uses: actions/checkout@v5
with:
sparse-checkout: "README.md"
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: ${{ env.REGISTRY_IMAGE }}

View File

@@ -12,21 +12,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- uses: azure/setup-helm@v1
id: install
- name: Set up Helm
uses: azure/setup-helm@v3
- name: Add Helm repos
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.2.1
uses: helm/chart-releaser-action@v1.4.1
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

View File

@@ -12,20 +12,20 @@ jobs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Fetch history
run: git fetch --prune --unshallow
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v1
uses: azure/setup-helm@v3
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: "3.9"
check-latest: true
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.0.1
uses: helm/chart-testing-action@v2.3.1
- name: Run chart-testing (list-changed)
id: list-changed
@@ -41,7 +41,8 @@ jobs:
- name: Run chart-testing (lint)
run: ct lint --config .github/ct-lint.yaml
kubeval-chart:
kubeconform-chart:
runs-on: ubuntu-latest
needs:
- lint-chart
@@ -49,50 +50,62 @@ jobs:
matrix:
chart: ${{ fromJson(needs.lint-chart.outputs.matrix) }}
k8s:
- v1.17.11
- v1.18.8
- v1.19.4
- "1.25.5"
- "1.24.9"
- "1.23.15"
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Update Helm depdendencies
env:
CHART_DIR: ${{ matrix.chart }}
run: |
helm dependency update "${CHART_DIR}"
mkdir kubeval
helm template "${CHART_DIR}" > kubeval/combined.yaml
mkdir tmp
helm template "${CHART_DIR}" > tmp/combined.yaml
- name: Run kubeval
uses: instrumenta/kubeval-action@master
- uses: yokawasa/action-setup-kube-tools@v0.9.2
with:
files: kubeval
version: ${{ matrix.k8s }}
setup-tools: |
kubeconform
- name: Run kubeconform
if: ${{ matrix.k8s }}
run: kubeconform -kubernetes-version ${{ matrix.k8s }} tmp/combined.yaml
install-chart:
name: install-chart
runs-on: ubuntu-latest
needs:
- lint-chart
- kubeval-chart
- kubeconform-chart
strategy:
matrix:
k8s:
- v1.17.11
- v1.18.8
- v1.19.4
- v1.25.3
- v1.24.7
- v1.23.13
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Create kind ${{ matrix.k8s }} cluster
uses: helm/kind-action@v1.1.0
uses: helm/kind-action@v1.4.0
with:
node_image: kindest/node:${{ matrix.k8s }}
- name: Run chart-testing (install)
uses: helm/chart-testing-action@v2.0.1
- uses: actions/setup-python@v4
with:
command: install
config: .github/ct-install.yaml
python-version: "3.9"
check-latest: true
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.3.1
- name: Run chart-testing (install)
run: ct install --config .github/ct-install.yaml

14
.gitignore vendored
View File

@@ -1,14 +0,0 @@
# OS files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
# Helm
charts/**/charts/
# Compose filesystem
/docker

View File

@@ -1,58 +0,0 @@
ifndef TAG
$(error The TAG variable is missing.)
endif
# Docker Hub namespace
HUB_NAMESPACE="invoiceninja"
# Image name
IMAGE="invoiceninja"
# Check if v5 tag is passed, so that a v5 version should be built
IS_V5=$(shell echo ${TAG} | egrep ^5)
# Version of Invoice Ninja. As the tag can be something like 5.0.4-p1, the version is 5.0.4.
# This supports changes to the Dockerfiles with always the same Invoice Ninja version
VERSION=$(shell echo ${TAG} | sed "s/-.*//")
# Building docker images based on alpine.
# Assigned tags:
# - :alpine
# - :alpine-<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
$(info Make: Done.)
endif
.PHONY: push-alpine
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
$(info Make: Done.)
endif
.PHONY: build-alpine-v5
build-alpine-v5:
ifneq ($(IS_V5),)
$(info Make: Building "$(VERSION)" tagged images from alpine.)
@docker build -t ${HUB_NAMESPACE}/${IMAGE}:${VERSION} --build-arg INVOICENINJA_VERSION=${VERSION} ./alpine/5/
@docker tag ${HUB_NAMESPACE}/${IMAGE}:${VERSION} ${HUB_NAMESPACE}/${IMAGE}:5
@docker tag ${HUB_NAMESPACE}/${IMAGE}:${VERSION} ${HUB_NAMESPACE}/${IMAGE}:latest
$(info Make: Done.)
endif
.PHONY: push-alpine-v5
push-alpine-v5:
ifneq ($(IS_V5),)
$(info Make: Pushing tagged images from alpine.)
@docker push ${HUB_NAMESPACE}/${IMAGE}:${VERSION}
@docker push ${HUB_NAMESPACE}/${IMAGE}:5
@docker push ${HUB_NAMESPACE}/${IMAGE}:latest
endif

129
README.md
View File

@@ -1,103 +1,94 @@
![Docker images](https://github.com/invoiceninja/dockerfiles/workflows/Docker%20images/badge.svg)
[![Docker image, latest](https://img.shields.io/docker/image-size/invoiceninja/invoiceninja/latest?label=latest)](https://hub.docker.com/r/invoiceninja/invoiceninja)
[![Docker image, alpine](https://img.shields.io/docker/image-size/invoiceninja/invoiceninja/alpine?label=alpine)](https://hub.docker.com/r/invoiceninja/invoiceninja)
[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/invoiceninja)](https://artifacthub.io/packages/search?repo=invoiceninja)
[![Docker Image Size](https://img.shields.io/docker/image-size/invoiceninja/invoiceninja-octane?label=octane)](https://hub.docker.com/r/invoiceninja/invoiceninja-octane)
[![Docker Pulls](https://img.shields.io/docker/pulls/invoiceninja/invoiceninja-octane)](https://hub.docker.com/r/invoiceninja/invoiceninja-octane)
[![Publish Status](https://github.com/invoiceninja/dockerfiles/actions/workflows/publish-image-octane.yaml/badge.svg)](https://github.com/invoiceninja/dockerfiles/actions/workflows/publish-image-octane.yaml)
[![Build Status](https://github.com/invoiceninja/dockerfiles/actions/workflows/build-image-octane.yaml/badge.svg)](https://github.com/invoiceninja/dockerfiles/actions/workflows/build-image-octane.yaml)
# Octane Docker for [Invoice Ninja](https://www.invoiceninja.com/)
# Docker for [Invoice Ninja](https://www.invoiceninja.com/)
👑 **Features**
:crown: **Features**
[FRANKENPHP](https://frankenphp.dev/)
Built-in Chrome for PDF generation and other features
Saxon XLST 2 engine
OPcache
Multi language support
:lock: Automatic HTTPS (:heart: [Caddy](https://caddyserver.com/))
:fire: NGINX webserver support [NGINX](https://nginx.org/)
:hammer: Fully production-ready through Helm Chart
:pencil: Adjustable to your needs via environment variable
## Get started with Docker Compose
## Get some Kubernetes + Helm with that!
Introducing our very own [Helm Chart](https://github.com/invoiceninja/dockerfiles/tree/master/charts/invoiceninja) that helps you launch a simple standalone app to a production-ready, highly available Invoice Ninja setup. All you need to do is initialise Kubernetes (available with Docker Desktop), install [Helm](https://helm.sh/docs/intro/install/), and spin up Invoice Ninja using the steps provided [here](https://github.com/invoiceninja/dockerfiles/tree/master/charts/invoiceninja#installing-the-chart).
Other resources:
[Helm Chart](https://github.com/Saddamus/invoiceninja-helm) by @Saddamus
[K8s Manifest](https://github.com/invoiceninja/dockerfiles/issues/94) by @spacepluk
## Alternatively get started with Docker Compose
The dockerfile has been revamped to make it easier to get started, by default the base image selected is 5 which will pull in the latest v5 stable image.
This Debian-based image includes Chrome for enhanced PDF generation and other features. To get started:
```bash
git clone https://github.com/invoiceninja/dockerfiles.git
cd dockerfiles
git clone https://github.com/invoiceninja/dockerfiles.git -b octane
cd dockerfiles/octane
```
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=
```
The `APP_KEY` can be generated by running
## Initial account setup
### Primary account setup
Prior to starting the container for the first time, open the .env file and update the IN_USER_EMAIL and IN_PASSWORD variables with your primary account.
This will take care of the initial account setup. You can later remove these .env variables.
> ⚠️ **Warning**
> If `IN_USER_EMAIL` and `IN_PASSWORD` are not set the default user email and password is "admin@example.com" and "changeme!" respectively.
After the container has completed the first startup you can delete these two environment variables.
### Generate a APP_KEY
The `APP_KEY` can be generated by running:
```bash
docker run --rm -it invoiceninja/invoiceninja php artisan key:generate --show
# If you haven't started the containers yet:
docker run --rm -it invoiceninja/invoiceninja-octane frankenphp php-cli artisan key:generate --show
# Or if your containers are already running:
docker compose exec app frankenphp php-cli artisan key:generate --show
```
Copy the entire string and insert in the env file at `APP_KEY=base64....`
Copy the entire string and insert in the .env file at `APP_KEY=base64....`
To ensure folder permissions are correct when the container comes up for the first time it is important that you set the correct folder permissions on the `docker` folder.
**Note: For PDF generation using localhost, your domain name MUST end in .test for PDFs to generate correctly due to Chrome's DNS resolver.
From the terminal run
Start the container with:
```bash
chmod 755 docker/app/public
sudo chown -R 1500:1500 docker/app
docker compose up -d
```
### Note for people running the container locally on their PC ###
**Note: When performing the setup, the Database host is ```mysql```
If you are running the container locally, then the container will need to resolve the host, to support this you will want to insert your LAN IP address and the host name in the hosts file located in ```config/hosts```
### Updating the Image
For example, lets say your APP_URL is ```http://in5.test:8000``` and your LAN IP is 192.168.0.124 the hosts file will have an entry looking like this:
```192.168.0.124 in5.test```
**Please note that for PDF generation using local host, your domain name MUST end in .test for your PDFs to generate correctly, this is a DNS resolver issue with chromium.
All that is left to do now is bring up the container
``` docker-compose up -d```
**Note: When performing the setup, the Database host is ```db```
### Running on ARM64 (Raspberry Pi 4)
When deploying on an ARM64 system, you need to comment out the `image: mysql:5` line and uncomment `image: mariadb:10.4` in the `docker-compose.yml` file.
### Updating the Image when using `docker-compose`
As `docker-compose` does not support any form of version control, this git provide updates to `docker-compose.yml` directly.
To upgrade to a newer release image, please make sure to update the `docker-compose.yml` first by running
To upgrade to a newer release image, update your docker-compose.yml first by running:
```bash
git pull
docker compose pull
docker compose up -d
```
You may need to manually merge any changes that cannot be merged automatically by git.
It is recommended to perform a backup before updating.
## Support
### Support
If you discover a bug, please create and issue, if you query is general in nature please visit us on our [Forum ](https://forum.invoiceninja.com/)
If you discover a bug, please create an issue. For general queries, visit our [Forum](https://forum.invoiceninja.com/)
### Todo
This is a new image which should provide much better support for all users, however there are some items left to complete
- [ ] Backup script
- [ ] Integrate soketi server
- [ ] Add elastic search for site wide search

View File

@@ -1,73 +0,0 @@
ARG PHP_VERSION=7.2
ARG BAK_STORAGE_PATH=/var/www/app/docker-backup-storage/
ARG BAK_PUBLIC_PATH=/var/www/app/docker-backup-public/
FROM php:${PHP_VERSION}-fpm-alpine as prod
LABEL maintainer="David Bomba <turbo124@gmail.com>"
#####
# SYSTEM REQUIREMENT
#####
ARG INVOICENINJA_VERSION
ARG BAK_STORAGE_PATH
ARG BAK_PUBLIC_PATH
RUN mv /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini
# Install PHP extensions
# https://hub.docker.com/r/mlocati/php-extension-installer/tags
COPY --from=mlocati/php-extension-installer:1.1.41 /usr/bin/install-php-extensions /usr/local/bin/
RUN install-php-extensions \
gd \
gmp \
opcache \
pdo_mysql \
zip
# Separate user
ENV INVOICENINJA_USER=invoiceninja
WORKDIR /var/www/app
RUN addgroup --gid=1500 -S "$INVOICENINJA_USER" \
&& adduser --uid=1500 \
--disabled-password \
--gecos "" \
--home "$(pwd)" \
--ingroup "$INVOICENINJA_USER" \
--no-create-home \
"$INVOICENINJA_USER" \
&& chown -R "$INVOICENINJA_USER":"$INVOICENINJA_USER" .
COPY rootfs /
RUN chmod +x /usr/local/bin/docker-entrypoint
USER 1500
# Download and install IN
ENV INVOICENINJA_VERSION="${INVOICENINJA_VERSION}"
ENV BAK_STORAGE_PATH $BAK_STORAGE_PATH
ENV BAK_PUBLIC_PATH $BAK_PUBLIC_PATH
RUN curl -o /tmp/ninja.zip -L https://download.invoiceninja.com/ninja-v${INVOICENINJA_VERSION}.zip \
&& unzip -q /tmp/ninja.zip -d /tmp/ \
&& mv /tmp/ninja/* /var/www/app \
&& rm -rf /tmp/ninja* \
&& mv /var/www/app/storage $BAK_STORAGE_PATH \
&& mv /var/www/app/public $BAK_PUBLIC_PATH \
&& mkdir -p /var/www/app/public/logo /var/www/app/storage \
&& chmod -R 755 /var/www/app/storage \
&& rm -rf /var/www/app/docs /var/www/app/tests
# Override the environment settings from projects .env file
ENV IS_DOCKER true
ENV LOG errorlog
ENV SELF_UPDATER_SOURCE ''
# Use to be mounted into nginx
VOLUME /var/www/app/public
ENTRYPOINT ["docker-entrypoint"]
CMD ["php-fpm"]

View File

@@ -1,17 +0,0 @@
; How often (in seconds) to check file timestamps for changes to the shared
; memory storage allocation. ("1" means validate once per second, but only
; once per request. "0" means always validate)
;opcache.revalidate_freq=2
opcache.revalidate_freq=60
# http://symfony.com/doc/current/performance.html
; Duration of time, in seconds for which to cache realpath information for a given
; file or directory. For systems with rarely changing files, consider increasing this
; value.
; http://php.net/realpath-cache-ttl
;realpath_cache_ttl = 120
realpath_cache_ttl = 600
; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 8M

View File

@@ -1,110 +0,0 @@
#!/usr/bin/env sh
set -e
# logging functions
in_log() {
local type="$1"; shift
printf '%s [%s] [Entrypoint]: %s\n' "$(date -u '+%Y-%m-%dT%H:%M:%SZ')" "$type" "$*"
}
in_error() {
in_log ERROR "$@" >&2
exit 1
}
# Indirect expansion (ie) is not supported in bourne shell. That's why we are using this "magic" here.
ie_gv() {
eval "echo \$$1"
}
# usage: file_env VAR [DEFAULT]
# ie: file_env 'XYZ_DB_PASSWORD' 'example'
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
file_env() {
local var="$1"
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})`
fi
export "$var"="$val"
unset "$fileVar"
}
# first arg is `-f` or `--some-option`
if [ "${1#-}" != "$1" ]; then
set -- php-fpm "$@"
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
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
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
# Initialize values that might be stored in a file
file_env 'APP_KEY'
file_env 'API_SECRET'
file_env 'CLOUDFLARE_API_KEY'
file_env 'DB_USERNAME'
file_env 'DB_USERNAME1'
file_env 'DB_USERNAME2'
file_env 'DB_PASSWORD'
file_env 'DB_PASSWORD1'
file_env 'DB_PASSWORD2'
file_env 'MAIL_USERNAME'
file_env 'MAIL_PASSWORD'
file_env 'MAILGUN_SECRET'
file_env 'S3_KEY'
file_env 'S3_SECRET'
# Run Laravel stuff
if [[ "$1" == "supervisord" ]] || [[ "$1" == "php-fpm" ]]; then
echo "Initialising Laravel..."
. laravel-init.sh
fi
exec docker-php-entrypoint "$@"

View File

@@ -1,5 +0,0 @@
#!/bin/sh
php artisan config:cache
php artisan optimize
php artisan migrate --force

View File

@@ -1,100 +0,0 @@
ARG PHP_VERSION=7.4
ARG BAK_STORAGE_PATH=/var/www/app/docker-backup-storage/
ARG BAK_PUBLIC_PATH=/var/www/app/docker-backup-public/
# Get Invoice Ninja and install nodejs packages
FROM --platform=$BUILDPLATFORM node:lts-alpine as build
ARG INVOICENINJA_VERSION
ARG BAK_STORAGE_PATH
ARG BAK_PUBLIC_PATH
# Download Invoice Ninja
ADD https://github.com/invoiceninja/invoiceninja/tarball/v$INVOICENINJA_VERSION /tmp/ninja.tar.gz
# Extract Invoice Ninja
RUN mkdir -p /var/www/app \
&& tar --strip-components=1 -xf /tmp/ninja.tar.gz -C /var/www/app/ \
&& mkdir -p /var/www/app/public/logo /var/www/app/storage \
&& mv /var/www/app/.env.example /var/www/app/.env \
&& rm -rf /var/www/app/docs /var/www/app/tests
WORKDIR /var/www/app/
# Install node packages
RUN npm install --production \
&& npm run production \
&& rm -rf node_modules \
&& mv /var/www/app/storage $BAK_STORAGE_PATH \
&& mv /var/www/app/public $BAK_PUBLIC_PATH
# Prepare php image
FROM php:${PHP_VERSION}-fpm-alpine as prod
ARG INVOICENINJA_VERSION
ARG BAK_STORAGE_PATH
ARG BAK_PUBLIC_PATH
LABEL maintainer="David Bomba <turbo124@gmail.com>"
RUN mv /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini
# Install PHP extensions
# https://hub.docker.com/r/mlocati/php-extension-installer/tags
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
RUN install-php-extensions \
bcmath \
exif \
gd \
gmp \
mysqli \
opcache \
pdo_mysql \
zip \
@composer \
&& rm /usr/local/bin/install-php-extensions
# Install chromium
RUN set -eux; \
apk add --no-cache \
supervisor \
mysql-client \
git \
chromium \
ttf-freefont
# Copy files
COPY rootfs /
## Create user
ARG UID=1500
ENV INVOICENINJA_USER invoiceninja
RUN addgroup --gid=$UID -S "$INVOICENINJA_USER" \
&& adduser --uid=$UID \
--disabled-password \
--gecos "" \
--home "/var/www/app" \
--ingroup "$INVOICENINJA_USER" \
"$INVOICENINJA_USER"
# Set up app
ENV INVOICENINJA_VERSION $INVOICENINJA_VERSION
ENV BAK_STORAGE_PATH $BAK_STORAGE_PATH
ENV BAK_PUBLIC_PATH $BAK_PUBLIC_PATH
COPY --from=build --chown=$INVOICENINJA_USER:$INVOICENINJA_USER /var/www/app /var/www/app
USER $UID
WORKDIR /var/www/app
# Do not remove this ENV
ENV IS_DOCKER true
RUN /usr/local/bin/composer install --no-dev --quiet \
&& rm .env
# Override the environment settings from projects .env file
ENV APP_ENV production
ENV LOG errorlog
ENV SNAPPDF_EXECUTABLE_PATH /usr/bin/chromium-browser
ENTRYPOINT ["docker-entrypoint"]
CMD ["supervisord"]

View File

@@ -1,42 +0,0 @@
[supervisord]
nodaemon=true
pidfile=/tmp/supervisord.pid
logfile=/dev/null ; nodaemon will cause logs to go to stdout
logfile_maxbytes=0
loglevel=info
[program:php-fpm]
redirect_stderr=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
command=php-fpm
[program:scheduler]
autorestart=true
redirect_stderr=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
command=php artisan schedule:work
[program:queue-worker]
process_name=%(program_name)s_%(process_num)02d
autorestart=true
redirect_stderr=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
numprocs=2
command=php artisan queue:work --sleep=3 --tries=1 --memory=256 --timeout=3600
[eventlistener:shutdown]
command=shutdown.sh
events=PROCESS_STATE_STOPPED, PROCESS_STATE_EXITED, PROCESS_STATE_FATAL
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0

View File

@@ -1,109 +0,0 @@
#!/usr/bin/env sh
set -e
# logging functions
in_log() {
local type="$1"
shift
printf '%s [%s] [Entrypoint]: %s\n' "$(date -u '+%Y-%m-%dT%H:%M:%SZ')" "$type" "$*"
}
in_error() {
in_log ERROR "$@" >&2
exit 1
}
# Indirect expansion (ie) is not supported in bourne shell. That's why we are using this "magic" here.
ie_gv() {
eval "echo \$$1"
}
# usage: file_env VAR [DEFAULT]
# ie: file_env 'XYZ_DB_PASSWORD' 'example'
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
file_env() {
local var="$1"
local fileVar="${var}_FILE"
local def="${2:-}"
if [ "$(ie_gv ${var})" != "" ]; then
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
unset "$fileVar"
}
# first arg is `-f` or `--some-option`
if [ "${1#-}" != "$1" ]; then
set -- php-fpm "$@"
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
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
fi
rm -rf "$BAK_PUBLIC_PATH"
# Initialize values that might be stored in a file
file_env 'APP_KEY'
file_env 'API_SECRET'
file_env 'CLOUDFLARE_API_KEY'
file_env 'DB_USERNAME'
file_env 'DB_USERNAME1'
file_env 'DB_USERNAME2'
file_env 'DB_PASSWORD'
file_env 'DB_PASSWORD1'
file_env 'DB_PASSWORD2'
file_env 'MAIL_USERNAME'
file_env 'MAIL_PASSWORD'
file_env 'MAILGUN_SECRET'
file_env 'S3_KEY'
file_env 'S3_SECRET'
# Run Laravel stuff
if [[ "$1" == "supervisord" ]] || [[ "$1" == "php-fpm" ]]; then
echo "Initialising Laravel..."
. laravel-init.sh
fi
exec docker-php-entrypoint "$@"

View File

@@ -1,5 +0,0 @@
#!/bin/sh
php artisan config:cache
php artisan optimize
php artisan migrate --force

View File

@@ -1,8 +0,0 @@
#!/bin/sh
printf "READY\n"
while read line; do
echo "Processing Event: $line" >&2
kill -SIGQUIT $PPID
done </dev/stdin

View File

@@ -1,17 +0,0 @@
; How often (in seconds) to check file timestamps for changes to the shared
; memory storage allocation. ("1" means validate once per second, but only
; once per request. "0" means always validate)
;opcache.revalidate_freq=2
opcache.revalidate_freq=60
# http://symfony.com/doc/current/performance.html
; Duration of time, in seconds for which to cache realpath information for a given
; file or directory. For systems with rarely changing files, consider increasing this
; value.
; http://php.net/realpath-cache-ttl
;realpath_cache_ttl = 120
realpath_cache_ttl = 600
; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 8M

View File

@@ -1,23 +0,0 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/

View File

@@ -1,15 +0,0 @@
dependencies:
- name: common
repository: https://charts.bitnami.com/bitnami
version: 1.4.3
- name: nginx
repository: https://charts.bitnami.com/bitnami
version: 8.8.5
- name: mariadb
repository: https://charts.bitnami.com/bitnami
version: 9.3.11
- name: redis
repository: https://charts.bitnami.com/bitnami
version: 12.9.2
digest: sha256:4255a558312b033e820635f491b0960bd4ec8e716164025212af06adafbd4cb9
generated: "2021-05-11T09:31:45.433+08:00"

View File

@@ -1,46 +0,0 @@
apiVersion: v2
name: 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
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
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.4.0
# 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.61
keywords:
- invoiceninja
home: https://invoiceninja.github.io/dockerfiles
sources:
- https://github.com/invoiceninja/invoiceninja
- https://github.com/invoiceninja/dockerfiles
dependencies:
- name: common
repository: https://charts.bitnami.com/bitnami
tags:
- bitnami-common
version: 1.x.x
- name: nginx
repository: https://charts.bitnami.com/bitnami
version: 8.8.x
- condition: mariadb.enabled
name: mariadb
repository: https://charts.bitnami.com/bitnami
version: 9.3.x
- condition: redis.enabled
name: redis
repository: https://charts.bitnami.com/bitnami
version: 12.9.x
maintainers:
- email: lwj5@hotmail.com
name: lwj5

View File

@@ -1,245 +0,0 @@
# Invoice Ninja Helm Chart
This helm chart installs a Invoice Ninja and its dependencies into a running
Kubernetes cluster.
The chart installs the [Invoice Ninja](https://hub.docker.com/r/invoiceninja/invoiceninja) docker image.
Please read [Upgrading](#upgrading) section before upgrading MAJOR versions.
## Dependencies
- The Bitnami [common](https://github.com/bitnami/charts/tree/master/bitnami/common) helm chart
- The Bitnami [mariadb](https://github.com/bitnami/charts/tree/master/bitnami/mariadb) helm chart
- The Bitnami [nginx](https://github.com/bitnami/charts/tree/master/bitnami/nginx) helm chart
- The Bitnami [redis](https://github.com/bitnami/charts/tree/master/bitnami/redis) helm chart
- Tested on Kubernetes 1.17+
## Installing the Chart
To install the chart with the release name `invoiceninja`:
```bash
helm repo add invoiceninja https://invoiceninja.github.io/dockerfiles
helm install invoiceninja invoiceninja/invoiceninja
```
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`
## Uninstalling the Chart
To uninstall/delete the `invoiceninja` deployment:
```bash
helm delete invoiceninja
```
The command removes all the Kubernetes components associated with the chart and deletes the release.
## Parameters
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](#installing-with-arguments)
### Global Configuration
The following table shows the configuration options for the Invoice Ninja helm chart:
### Global parameters
| Parameter | Description | Default |
| ------------------------- | ----------------------------------------------- | ------------------------------------------------------- |
| `global.imageRegistry` | Global Docker image registry | `nil` |
| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
| `global.storageClass` | Global storage class for dynamic provisioning | `nil` |
### Common parameters
| Parameter | Description | Default |
| ------------------- | -------------------------------------------------------------------- | ------------------------------ |
| `nameOverride` | String to partially override common.names.fullname | `nil` |
| `fullnameOverride` | String to fully override common.names.fullname | `nil` |
| `clusterDomain` | Default Kubernetes cluster domain | `cluster.local` |
| `commonLabels` | Labels to add to all deployed objects | `{}` |
| `commonAnnotations` | Annotations to add to all deployed objects | `{}` |
| `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) |
### Invoice Ninja parameters
| 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_ |
| `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 Invoice Ninja container | `{}` |
| `extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars | `nil` |
| `extraEnvVarsSecret` | Name of existing Secret containing extra env vars | `nil` |
### Invoice Ninja deployment parameters
| Parameter | Description | Default |
| --------------------------- | ----------------------------------------------------------------------------------------- | ------------------------------ |
| `replicaCount` | Number of Invoice Ninja Pods to run | `1` |
| `containerPorts.fastcgi` | FastCGI port to expose at container level | `9000` |
| `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` | `""` |
| `nodeAffinityPreset.key` | Node label key to match. Ignored if `affinity` is set. | `""` |
| `nodeAffinityPreset.values` | Node label values to match. Ignored if `affinity` is set. | `[]` |
| `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 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 |
| ---------------------------------- | -------------------------------------------------------------------------- | ------------------------------ |
| `service.type` | Kubernetes Service type | `ClusterIP` |
| `service.port` | Service FastCGI port | `9000` |
| `service.nodePort` | Kubernetes FastCGI node port | `""` |
| `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` |
| `service.annotations` | Service annotations | `{}` (evaluated as a template) |
### Ingress parameters
| Parameter | Description | Default |
| ------------------------------------------------------- | ------------------------------------- | ------------------------ |
| `nginx.service.type` | Kubernetes Service type | `ClusterIP` |
| `nginx.ingress.enabled` | Enable ingress controller resource | `true` |
| `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 Invoice Ninja public PVC | `invoiceninja-public` |
| `nginx.extraVolumeMounts` | Array to add extra mount | Check `values.yaml` file |
> See [Dependencies](#dependencies) for more.
### Persistence parameters
| Parameter | Description | Default |
| ----------------------------------- | ---------------------------------------- | ----------------- |
| `persistence.public.enabled` | Enable persistence using PVC | `true` |
| `persistence.public.existingClaim` | Enable persistence using an existing PVC | `nil` |
| `persistence.public.storageClass` | PVC Storage Class | `nil` |
| `persistence.public.accessModes` | PVC Access Modes | `[ReadWriteMany]` |
| `persistence.public.size` | PVC Storage Request | `1Gi` |
| `persistence.public.dataSource` | PVC data source | `{}` |
| `persistence.storage.enabled` | Enable persistence using PVC | `true` |
| `persistence.storage.existingClaim` | Enable persistence using an existing PVC | `nil` |
| `persistence.storage.storageClass` | PVC Storage Class | `nil` |
| `persistence.storage.accessModes` | PVC Access Modes | `[ReadWriteMany]` |
| `persistence.storage.size` | PVC Storage Request | `5Gi` |
| `persistence.storage.dataSource` | PVC data source | `{}` |
### Redis parameters
| Parameter | Description | Default |
| --------------------------------- | -------------------------------------------- | ----------------------------------------- |
| `redis.enabled` | If external redis is used, set it to `false` | `true` |
| `redis.password` | Redis password | _random 10 character alphanumeric string_ |
| `redis.sentinel.enabled` | Enable sentinel containers | `true` |
| `redis.sentinel.usePassword` | Use password for sentinel containers | `false` |
| `externalRedis.host` | Host of the external redis | `nil` |
| `externalRedis.port` | Port of the external redis | `6379` |
| `externalRedis.password` | Password for the external redis | `nil` |
| `externalRedis.sentinel` | Using sentinels | `false` |
| `externalRedis.databases.default` | Database to use by default | `0` |
| `externalRedis.databases.cache` | Database to use by cache | `1` |
> See [Dependencies](#dependencies) for more.
### Database parameters
| Parameter | Description | Default |
| --------------------------------- | ------------------------------------------- | ----------------------------------------- |
| `mariadb.enabled` | Deploy MariaDB container(s) | `true` |
| `mariadb.auth.rootPassword` | Password for the MariaDB `root` user | _random 10 character alphanumeric string_ |
| `mariadb.auth.database` | Database name to create | `invoiceninja` |
| `mariadb.auth.username` | Database user to create | `invoiceninja` |
| `mariadb.auth.password` | Password for the database | _random 10 character alphanumeric string_ |
| `externalDatabase.host` | Host of the external database | `nil` |
| `externalDatabase.user` | Existing username in the external db | `invoiceninja` |
| `externalDatabase.password` | Password for the above username | `nil` |
| `externalDatabase.database` | Name of the existing database | `invoiceninja` |
| `externalDatabase.port` | Database port number | `3306` |
| `externalDatabase.existingSecret` | Name of the database existing Secret Object | `nil` |
> See [Dependencies](#dependencies) for more.
### Other parameters
| 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
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
```bash
helm install invoiceninja \
--set appKey=changeit \
--set replicaCount=3 \
--set nginx.replicaCount=3 \
--set redis.cluster.slaveCount=3 \
--set redis.password=changeit \
--set mariadb.auth.rootPassword=changeit \
--set mariadb.auth.password=changeit \
invoiceninja/invoiceninja
```
The above command sets the number of replicas to 3 for a highly available (HA) setup. Note that you would need to use an external DB such as MariaDB Galera for a full HA production setup.
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,
```bash
helm install invoiceninja -f values.yaml invoiceninja/invoiceninja
```
## Upgrading
Nothing yet.

View File

@@ -1,34 +0,0 @@
** Please be patient while the chart is being deployed **
Your controller can be accessed through the following DNS name from within your cluster:
http://{{ include "invoiceninja.nginx.fullname" . }}.{{ .Release.Namespace }}.svc
To access your controller from outside the cluster follow the steps below:
{{- if or .Values.nginx.ingress.enabled }}
Externally through the following DNS name:
http://{{ .Values.nginx.ingress.hostname }}
-- OR --
{{ end }}
{{- if contains "NodePort" .Values.nginx.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "invoiceninja.nginx.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.nginx.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "invoiceninja.nginx.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "invoiceninja.nginx.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- 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 "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 }}

View File

@@ -1,250 +0,0 @@
{{/*
Return the proper image name
*/}}
{{- define "invoiceninja.image" -}}
{{- include "common.images.image" (dict "imageRoot" .Values.image "global" .Values.global) -}}
{{- end -}}
{{/*
Return the proper Docker Image Registry Secret Names
*/}}
{{- define "invoiceninja.imagePullSecrets" -}}
{{- 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 -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "invoiceninja.mariadb.fullname" -}}
{{- printf "%s-%s" .Release.Name "mariadb" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "invoiceninja.nginx.fullname" -}}
{{- printf "%s-%s" .Release.Name "nginx" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "invoiceninja.redis.fullname" -}}
{{- printf "%s-%s" .Release.Name "redis" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "invoiceninja.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "common.names.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{- default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}
{{/*
Return the proper Storage Class
*/}}
{{- define "invoiceninja.public.storageClass" -}}
{{- include "common.storage.class" (dict "persistence" .Values.persistence "global" .Values.global) -}}
{{- end -}}
{{/*
Return the proper Storage Class
*/}}
{{- define "invoiceninja.storage.storageClass" -}}
{{- include "common.storage.class" (dict "persistence" .Values.persistence "global" .Values.global) -}}
{{- end -}}
{{/*
Return the proper Storage Name
*/}}
{{- define "invoiceninja.public.storageName" -}}
{{- printf "%s-%s" .Release.Name "public" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Return the proper Storage Name
*/}}
{{- define "invoiceninja.storage.storageName" -}}
{{- printf "%s-%s" .Release.Name "storage" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Return the MariaDB Hostname
*/}}
{{- define "invoiceninja.databaseHost" -}}
{{- if .Values.mariadb.enabled }}
{{- if eq .Values.mariadb.architecture "replication" }}
{{- printf "%s-%s" (include "invoiceninja.mariadb.fullname" .) "primary" | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s" (include "invoiceninja.mariadb.fullname" .) -}}
{{- end -}}
{{- else -}}
{{- printf "%s" .Values.externalDatabase.host -}}
{{- end -}}
{{- end -}}
{{/*
Return the MariaDB Port
*/}}
{{- define "invoiceninja.databasePort" -}}
{{- if .Values.mariadb.enabled }}
{{- printf "3306" -}}
{{- else -}}
{{- printf "%d" (.Values.externalDatabase.port | int ) -}}
{{- end -}}
{{- end -}}
{{/*
Return the MariaDB Database Name
*/}}
{{- define "invoiceninja.databaseName" -}}
{{- if .Values.mariadb.enabled }}
{{- printf "%s" .Values.mariadb.auth.database -}}
{{- else -}}
{{- printf "%s" .Values.externalDatabase.database -}}
{{- end -}}
{{- end -}}
{{/*
Return the MariaDB User
*/}}
{{- define "invoiceninja.databaseUser" -}}
{{- if .Values.mariadb.enabled }}
{{- printf "%s" .Values.mariadb.auth.username -}}
{{- else -}}
{{- printf "%s" .Values.externalDatabase.user -}}
{{- end -}}
{{- end -}}
{{/*
Return the MariaDB Secret Name
*/}}
{{- define "invoiceninja.databaseSecretName" -}}
{{- if .Values.externalDatabase.existingSecret -}}
{{- printf "%s" .Values.externalDatabase.existingSecret -}}
{{- else -}}
{{- printf "%s" (include "invoiceninja.mariadb.fullname" .) -}}
{{- end -}}
{{- end -}}
{{/*
Return the Redis Hostname
*/}}
{{- define "invoiceninja.redisHost" -}}
{{- if .Values.redis.enabled }}
{{- if .Values.redis.sentinel.enabled }}
{{- printf "%s-%s" (include "invoiceninja.redis.fullname" .) "headless" | trunc 63 | trimSuffix "-" -}}
{{- else }}
{{- printf "%s-%s" (include "invoiceninja.redis.fullname" .) "master" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- else -}}
{{- printf "%s" .Values.externalRedis.host -}}
{{- end -}}
{{- end -}}
{{/*
Return the Redis Port
*/}}
{{- define "invoiceninja.redisPort" -}}
{{- if .Values.redis.enabled }}
{{- if .Values.redis.sentinel.enabled }}
{{- printf "26379" -}}
{{- else }}
{{- printf "6379" -}}
{{- end -}}
{{- else -}}
{{- printf "%d" (.Values.externalRedis.port | int ) -}}
{{- end -}}
{{- end -}}
{{/*
Return the Redis Database
*/}}
{{- define "invoiceninja.redisDatabase" -}}
{{- if .Values.redis.enabled }}
{{- printf "0" -}}
{{- else -}}
{{- printf "%s" .Values.externalRedis.databases.default -}}
{{- end -}}
{{- end -}}
{{/*
Return the Redis Database
*/}}
{{- define "invoiceninja.redisCacheDatabase" -}}
{{- if .Values.redis.enabled }}
{{- printf "1" -}}
{{- else -}}
{{- printf "%s" .Values.externalRedis.databases.cache -}}
{{- end -}}
{{- end -}}
{{/*
Return the Redis Secret Name
*/}}
{{- define "invoiceninja.redisSecretName" -}}
{{- if .Values.externalRedis.existingSecret -}}
{{- printf "%s" .Values.externalRedis.existingSecret -}}
{{- else -}}
{{- printf "%s" (include "invoiceninja.redis.fullname" .) -}}
{{- end -}}
{{- end -}}
{{/*
Return the Broadcast Connection Name
*/}}
{{- define "invoiceninja.redisBroadcastConnection" -}}
{{- if or (and .Values.redis.enabled .Values.redis.sentinel.enabled) (and .Values.externalRedis.host .Values.externalRedis.sentinel) }}
{{- printf "sentinel-default" -}}
{{- else -}}
{{- printf "default" -}}
{{- end -}}
{{- end -}}
{{/*
Return the Cache Connection Name
*/}}
{{- define "invoiceninja.redisCacheConnection" -}}
{{- if or (and .Values.redis.enabled .Values.redis.sentinel.enabled) (and .Values.externalRedis.host .Values.externalRedis.sentinel) }}
{{- printf "sentinel-cache" -}}
{{- else -}}
{{- printf "cache" -}}
{{- end -}}
{{- end -}}
{{/*
Return the Queue Connection Name
*/}}
{{- define "invoiceninja.redisQueueConnection" -}}
{{- if or (and .Values.redis.enabled .Values.redis.sentinel.enabled) (and .Values.externalRedis.host .Values.externalRedis.sentinel) }}
{{- printf "sentinel-default" -}}
{{- else -}}
{{- printf "default" -}}
{{- end -}}
{{- end -}}
{{/*
Return the Session Connection Name
*/}}
{{- define "invoiceninja.redisSessionConnection" -}}
{{- if or (and .Values.redis.enabled .Values.redis.sentinel.enabled) (and .Values.externalRedis.host .Values.externalRedis.sentinel) }}
{{- printf "sentinel-default" -}}
{{- else -}}
{{- printf "default" -}}
{{- end -}}
{{- end -}}

View File

@@ -1,58 +0,0 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "common.names.fullname" . }}
labels:
{{- include "common.labels.standard" $ | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations:
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
data:
{{- if .Values.nginx.ingress.enabled }}
APP_URL: "http://{{ .Values.nginx.ingress.hostname }}"
{{- 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 }}
{{- if .Values.logChannel }}
LOG_CHANNEL: {{ .Values.logChannel | quote }}
{{- else }}
LOG_CHANNEL: stderr
{{- end }}
{{- if .Values.broadcastDriver }}
BROADCAST_DRIVER: {{ .Values.broadcastDriver | quote }}
{{- else if or .Values.redis.enabled .Values.externalRedis.host }}
BROADCAST_DRIVER: redis
{{- end }}
{{- if .Values.cacheDriver }}
CACHE_DRIVER: {{ .Values.cacheDriver | quote }}
{{- else if or .Values.redis.enabled .Values.externalRedis.host }}
CACHE_DRIVER: redis
{{- end }}
{{- if .Values.sessionDriver }}
SESSION_DRIVER: {{ .Values.sessionDriver | quote }}
{{- else if or .Values.redis.enabled .Values.externalRedis.host }}
SESSION_DRIVER: redis
{{- end }}
{{- if .Values.queueConnection }}
QUEUE_CONNECTION: {{ .Values.queueConnection | quote }}
{{- else if or .Values.redis.enabled .Values.externalRedis.host }}
QUEUE_CONNECTION: redis
{{- end }}
PHANTOMJS_PDF_GENERATION: {{ not .Values.snappdf | quote}}
REDIS_HOST: {{ include "invoiceninja.redisHost" . | quote }}
REDIS_PORT: {{ include "invoiceninja.redisPort" . | quote }}
REDIS_DB: {{ include "invoiceninja.redisDatabase" . | quote }}
REDIS_CACHE_DB: {{ include "invoiceninja.redisCacheDatabase" . | quote }}
REDIS_BROADCAST_CONNECTION: {{ include "invoiceninja.redisBroadcastConnection" . | quote }}
REDIS_CACHE_CONNECTION: {{ include "invoiceninja.redisCacheConnection" . | quote }}
REDIS_QUEUE_CONNECTION: {{ include "invoiceninja.redisQueueConnection" . | quote }}
SESSION_CONNECTION: {{ include "invoiceninja.redisSessionConnection" . | quote }}

View File

@@ -1,193 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "common.names.fullname" . }}
labels:
{{- include "common.labels.standard" $ | nindent 4 }}
app.kubernetes.io/component: server
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations:
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
{{- if .Values.updateStrategy }}
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
{{- end }}
selector:
matchLabels:
{{- include "common.labels.matchLabels" $ | nindent 6 }}
app.kubernetes.io/component: server
template:
metadata:
{{- if .Values.podAnnotations }}
annotations:
{{- include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) | nindent 8 }}
{{- end }}
labels:
{{- include "common.labels.standard" $ | nindent 8 }}
app.kubernetes.io/component: server
{{- if .Values.podLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }}
{{- end }}
spec:
{{- include "invoiceninja.imagePullSecrets" . | nindent 6 }}
serviceAccountName: {{ include "invoiceninja.serviceAccountName" . }}
{{- if .Values.affinity }}
affinity: {{- include "common.tplvalues.render" (dict "value" .Values.affinity "context" $) | nindent 8 }}
{{- else }}
affinity:
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "context" $) | nindent 10 }}
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "context" $) | nindent 10 }}
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.nodeAffinityPreset.type "key" .Values.nodeAffinityPreset.key "values" .Values.nodeAffinityPreset.values) | nindent 10 }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.nodeSelector "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tolerations "context" $) | nindent 8 }}
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
initContainers:
- name: wait-db
image: {{ include "invoiceninja.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
- /bin/sh
- -cx
- |
COUNTER=0;
while [ $COUNTER -lt 120 ]; do
if mysqladmin ping -h "$DB_HOST1" -P $DB_PORT1 --silent; then
exit 0;
fi;
let COUNTER=COUNTER+1;
echo "Waiting for DB ($DB_HOST1:$DB_PORT1)"
sleep 2;
done;
echo "Did NOT see a database after 240 secs!";
exit 1;
securityContext:
{{- toYaml .Values.containerSecurityContext | nindent 12 }}
{{- if .Values.resources }}
resources: {{- toYaml .Values.resources | nindent 12 }}
{{- end }}
envFrom:
- configMapRef:
name: {{ include "common.names.fullname" . }}
{{- 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 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.containerSecurityContext | nindent 12 }}
image: {{ include "invoiceninja.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: fastcgi
containerPort: {{ .Values.containerPorts.fastcgi }}
protocol: TCP
{{- if .Values.livenessProbe.enabled }}
livenessProbe:
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
timeoutSeconds: {{ $.Values.livenessProbe.timeoutSeconds }}
successThreshold: {{ $.Values.livenessProbe.successThreshold }}
failureThreshold: {{ $.Values.livenessProbe.failureThreshold }}
tcpSocket:
port: {{ .Values.livenessProbe.port }}
{{- end }}
{{- if .Values.readinessProbe.enabled }}
readinessProbe:
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
timeoutSeconds: {{ $.Values.readinessProbe.timeoutSeconds }}
successThreshold: {{ $.Values.readinessProbe.successThreshold }}
failureThreshold: {{ $.Values.readinessProbe.failureThreshold }}
tcpSocket:
port: {{ .Values.readinessProbe.port }}
{{- end }}
envFrom:
- configMapRef:
name: {{ include "common.names.fullname" . }}
- secretRef:
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:
- name: DB_PASSWORD1
valueFrom:
secretKeyRef:
name: {{ include "invoiceninja.databaseSecretName" . }}
key: mariadb-password
{{- if or (and .Values.redis.enabled .Values.redis.usePassword) (or .Values.externalRedis.password .Values.externalRedis.existingSecret) }}
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "invoiceninja.redisSecretName" . }}
key: redis-password
{{- end }}
{{- if .Values.extraEnvVars }}
{{- include "common.tplvalues.render" (dict "value" .Values.extraEnvVars "context" $) | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- mountPath: /var/www/app/public
name: public
- mountPath: /var/www/app/storage
name: storage
{{- if .Values.extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" .Values.extraVolumeMounts "context" $) | nindent 12 }}
{{- end }}
volumes:
- name: public
{{- if .Values.persistence.public.enabled }}
persistentVolumeClaim:
claimName: {{ .Values.persistence.public.existingClaim | default (include "invoiceninja.public.storageName" .) }}
{{- else }}
emptyDir: {}
{{ end }}
- name: storage
{{- if .Values.persistence.storage.enabled }}
persistentVolumeClaim:
claimName: {{ .Values.persistence.storage.existingClaim | default (include "invoiceninja.storage.storageName" .) }}
{{- else }}
emptyDir: {}
{{ end }}
{{- if .Values.extraVolumes }}
{{- include "common.tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 8 }}
{{- end }}

View File

@@ -1,35 +0,0 @@
{{- if .Values.autoscaling.enabled }}
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "common.names.fullname" . }}
labels:
{{- include "common.labels.standard" $ | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations:
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "common.names.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}

View File

@@ -1,52 +0,0 @@
{{- if and .Values.persistence.public.enabled (not .Values.persistence.public.existingClaim) }}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ include "invoiceninja.public.storageName" . }}
labels:
{{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations:
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
accessModes:
- {{ .Values.persistence.public.accessMode | quote }}
resources:
requests:
storage: {{ .Values.persistence.public.size | quote }}
{{- include "invoiceninja.public.storageClass" . | nindent 2 }}
{{- if .Values.persistence.public.dataSource }}
dataSource: {{- include "common.tplvalues.render" ( dict "value" .Values.persistence.public.dataSource "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
---
{{- if and .Values.persistence.storage.enabled (not .Values.persistence.storage.existingClaim) }}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ include "invoiceninja.storage.storageName" . }}
labels:
{{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations:
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
accessModes:
- {{ .Values.persistence.storage.accessMode | quote }}
resources:
requests:
storage: {{ .Values.persistence.storage.size | quote }}
{{- include "invoiceninja.storage.storageClass" . | nindent 2 }}
{{- if .Values.persistence.storage.dataSource }}
dataSource: {{- include "common.tplvalues.render" ( dict "value" .Values.persistence.storage.dataSource "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}

View File

@@ -1,60 +0,0 @@
{{- if not (or .Values.mariadb.enabled .Values.externalDatabase.existingSecret) }}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "invoiceninja.mariadb.fullname" . }}
labels:
{{- include "common.labels.standard" $ | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations:
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: Opaque
data:
mariadb-password: {{ .Values.externalDatabase.password | b64enc | quote }}
{{- end }}
---
{{- if not (or .Values.redis.enabled .Values.externalDatabase.existingSecret) }}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "invoiceninja.redis.fullname" . }}
labels:
{{- include "common.labels.standard" $ | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations:
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: Opaque
data:
redis-password: {{ .Values.externalRedis.password | b64enc | quote }}
{{- end }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ include "common.names.fullname" . }}
labels:
{{- include "common.labels.standard" $ | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations:
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: Opaque
data:
{{- if not (empty .Values.appKey) }}
APP_KEY: {{ .Values.appKey | b64enc | quote }}
{{- else }}
APP_KEY: {{ randAlphaNum 32 | b64enc | quote }}
{{- end }}

View File

@@ -1,47 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "common.names.fullname" . }}
labels:
{{- include "common.labels.standard" $ | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if or .Values.service.annotations .Values.commonAnnotations }}
annotations:
{{- if .Values.service.annotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.service.annotations "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
spec:
type: {{ .Values.service.type }}
{{- if and .Values.service.clusterIP (eq .Values.service.type "ClusterIP") }}
clusterIP: {{ .Values.service.clusterIP }}
{{- end }}
{{- if (or (eq .Values.service.type "LoadBalancer") (eq .Values.service.type "NodePort")) }}
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy | quote }}
{{- end }}
{{- if (and (eq .Values.service.type "LoadBalancer") .Values.service.loadBalancerSourceRanges) }}
loadBalancerSourceRanges: {{- toYaml . | nindent 4 }}
{{- end }}
{{- if (and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerIP))) }}
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
{{- end }}
ports:
{{- if not (empty .Values.service.port) }}
- name: fastcgi
port: {{ .Values.service.port }}
protocol: TCP
targetPort: fastcgi
{{- if (and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePort))) }}
nodePort: {{ .Values.service.nodePort }}
{{- else if eq .Values.service.type "ClusterIP" }}
nodePort: null
{{- end }}
{{- end }}
selector:
{{- include "common.labels.matchLabels" . | nindent 4 }}
app.kubernetes.io/component: server

View File

@@ -1,20 +0,0 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "invoiceninja.serviceAccountName" . }}
labels:
{{- include "common.labels.standard" $ | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if or .Values.serviceAccount.annotations .Values.commonAnnotations }}
annotations:
{{- if .Values.serviceAccount.annotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.serviceAccount.annotations "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -1,487 +0,0 @@
# Default values for invoiceninja.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
## Global Docker image parameters
## Please, note that this will override the image parameters, including dependencies, configured to use the global value
## Current available global Docker image parameters: imageRegistry, imagePullSecrets and storageClass
##
# global:
# imageRegistry: myRegistryName
# imagePullSecrets:
# - myRegistryKeySecretName
# storageClass: myStorageClass
## Invoice Ninja image version
## ref: https://github.com/invoiceninja/dockerfiles
##
image:
registry: docker.io
repository: invoiceninja/invoiceninja
tag: 5.1.61
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
##
pullPolicy: IfNotPresent
## 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
## String to turn on debug mode in Invoice Ninja
##
debug: false
## A 32 character long Application Key
##
appKey: ""
## Name of log channel to use
##
logChannel: ""
## Name of broadcast driver to use
##
broadcastDriver: ""
## Name of cache driver to use
##
cacheDriver: ""
## Name of session driver to use
##
sessionDriver: ""
## Name of queue connection to use
##
queueConnection: ""
## Use local or Phantom JS PDF generation
##
snappdf: true
## String to partially override fullname template (will maintain the release name)
##
# nameOverride:
## String to fully override fullname template
##
# fullnameOverride:
## Add labels to all the deployed resources
##
commonLabels: {}
## Add annotations to all the deployed resources
##
commonAnnotations: {}
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""
## Pod Labels
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
##
podLabels: {}
## Pod annotations
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
##
podAnnotations: {}
## Pod affinity preset
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
## Allowed values: soft, hard
##
podAffinityPreset: ""
## Pod anti-affinity preset
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
## Allowed values: soft, hard
##
podAntiAffinityPreset: soft
## Node affinity preset
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
## Allowed values: soft, hard
##
nodeAffinityPreset:
## Node affinity type
## Allowed values: soft, hard
##
type: ""
## Node label key to match
## E.g.
## key: "kubernetes.io/e2e-az-name"
##
key: ""
## Node label values to match
## E.g.
## values:
## - e2e-az1
## - e2e-az2
##
values: []
## Affinity for pod assignment. Evaluated as a template.
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
## Note: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set
##
affinity: {}
## Node labels for pod assignment. Evaluated as a template.
## ref: https://kubernetes.io/docs/user-guide/node-selection/
##
nodeSelector: {}
## Tolerations for pod assignment. Evaluated as a template.
## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
##
tolerations: []
## Configure Pods Security Context
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
##
podSecurityContext:
fsGroup: 1500
## Configure Container Security Context (only main container)
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
##
containerSecurityContext:
runAsNonRoot: true
runAsUser: 1500
# runAsGroup: 1500
# capabilities:
# drop:
# - 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 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:
## type: RollingUpdate
## rollingUpdate:
## maxSurge: 25%
## maxUnavailable: 25%
##
updateStrategy:
type: RollingUpdate
## Container ports
##
containerPorts:
fastcgi: 9000
## An array to add extra env vars
## Example:
## extraEnvVars:
## - name: FOO
## value: "bar"
##
extraEnvVars: []
## ConfigMap with extra environment variables
##
extraEnvVarsCM:
## Secret with extra environment variables
##
extraEnvVarsSecret:
## Extra volumes to add to the deployment
##
extraVolumes: []
## Extra volume mounts to add to the container
##
extraVolumeMounts: []
## Kubernetes service type
## ref: https://kubernetes.io/docs/concepts/services-networking/service/
## Set this to NodePort, LoadBalancer or ClusterIP
##
service:
## Service type
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
##
type: ClusterIP
## Service ports
##
port: 9000
## Specify the nodePort value for the LoadBalancer and NodePort service types.
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
##
nodePort: ""
## Service clusterIP.
##
# clusterIP: None
## Specify the loadBalancerIP value for LoadBalancer service types.
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer
##
# loadBalancerIP:
## Specify the loadBalancerSourceRanges value for LoadBalancer service types.
## ref: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
##
loadBalancerSourceRanges: []
## Enable client source IP preservation
## ref http://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip
##
externalTrafficPolicy: Cluster
## Additional service annotations (evaluate as a template)
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
##
annotations: {}
## Configure extra options for liveness and readiness probes
## 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:
enabled: true
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 6
successThreshold: 1
port: fastcgi
readinessProbe:
enabled: true
initialDelaySeconds: 15
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 6
successThreshold: 1
port: fastcgi
resources:
{}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
## Enable persistence using Persistent Volume Claims
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
##
persistence:
public:
enabled: true
## 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
## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
##
# storageClass: "-"
##
## If you want to reuse an existing claim, you can pass the name of the PVC using
## the existingClaim variable
# existingClaim: your-claim
accessMode: ReadWriteMany
size: 1Gi
## Custom dataSource
##
dataSource: {}
storage:
enabled: true
## 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
## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
##
# storageClass: "-"
##
## If you want to reuse an existing claim, you can pass the name of the PVC using
## the existingClaim variable
# existingClaim: your-claim
accessMode: ReadWriteMany
size: 10Gi
## Custom dataSource
##
dataSource: {}
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 10
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
## Redis chart configuration
## ref: https://github.com/bitnami/charts/blob/master/bitnami/redis/values.yaml
##
redis:
enabled: true
sentinel:
enabled: true
usePassword: false
## External Redis Configuration
##
## All of these values are only used when redis.enabled is set to false
##
externalRedis:
## Redis/Sentinel host
##
host: ""
## Redis/Sentinel port number
##
port: 6379
## Redis password
##
password: ""
## Use existing secret (ignores previous password)
## must contain key `redis-password`
## NOTE: When it's set, the `externalRedis.password` parameter is ignored
##
# existingSecret:
## Whether Redis Sentinel are used
sentinel: false
## Redis databases
##
databases:
default: "0"
cache: "1"
## MariaDB chart configuration
## ref: https://github.com/bitnami/charts/blob/master/bitnami/mariadb/values.yaml
##
mariadb:
## Whether to deploy a MariaDB server to satisfy the applications database requirements.
## To use an external database set this to false and configure the externaldb parameters
##
enabled: true
## MariaDB Authentication parameters
##
auth:
## MariaDB root password
##
# rootPassword: changeit
## MariaDB custom user and database
##
username: invoiceninja
database: invoiceninja
# password: changeit
## External Database Configuration
##
## All of these values are only used when mariadb.enabled is set to false
##
externalDatabase:
## Database host
##
host: ""
## non-root Username for Invoice Ninja Database
##
user: invoiceninja
## Database password
##
password: ""
## Database name
##
database: invoiceninja
## Database port number
##
port: 3306
## Use existing secret (ignores previous password)
## must contain key `mariadb-password`
## NOTE: When it's set, the `externalDatabase.password` parameter is ignored
##
# existingSecret:
## Nginx chart configuration
## ref: https://github.com/bitnami/charts/blob/master/bitnami/nginx/values.yaml
##
nginx:
service:
## Service type
## 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 Invoice Ninja
## ref: http://kubernetes.io/docs/user-guide/ingress/
##
ingress:
enabled: true
hostname: invoiceninja.local
## Configure the serverblock for Invoice Ninja
## Note: you may need to replace the fastcgi_pass value if the release name is different
##
serverBlock: |
server {
listen 8080 default_server;
server_name _;
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 invoiceninja: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;
}
}
## Configure the extraVolumes and extraVolumeMounts for Invoice Ninja
## Note: you may need to replace the claimName if the release name is different
##
extraVolumes:
- name: public
persistentVolumeClaim:
claimName: invoiceninja-public
extraVolumeMounts:
- mountPath: /var/www/app/public
name: public
readOnly: true

View File

@@ -1,6 +0,0 @@
{$APP_URL} {
root * /var/www/app/public
php_fastcgi app:9000
encode zstd gzip
file_server browse
}

View File

@@ -1,3 +0,0 @@
#!/usr/bin/env sh
cd /var/www/app; php artisan schedule:run >> /dev/null 2>&1

View File

@@ -1 +0,0 @@
192.168.0.124 in5.test

View File

@@ -1,12 +0,0 @@
FROM mysql:5
# When running on ARM64 use MariaDB instead of MySQL
#FROM mariadb:10.4
ENV force_color_prompt yes
RUN apt-get update;
RUN apt-get install -y cron;
ENTRYPOINT \
service cron start; \
printenv | grep -v "no_proxy" >> /etc/environment; \
docker-entrypoint.sh mysqld

View File

@@ -1,28 +0,0 @@
#!/bin/sh
FREQUENTY=`basename "$0"`
TIMESTAMP=$(date +"%Y-%m-%d")
case $FREQUENTY in
daily)
DAYS=6
;;
weekly)
DAYS=30
find /backups -type f -name $TIMESTAMP-daily.sql.gz -delete
;;
monthly)
DAYS=122
find /backups -type f -name $TIMESTAMP-weekly.sql.gz -delete
;;
esac
mysqldump -u ${MYSQL_USER} -p${MYSQL_PASSWORD} ${MYSQL_DATABASE} | gzip > /backups/$TIMESTAMP-$FREQUENTY.sql.gz
# Remove old backups
find /backups -mtime +${DAYS} -type f -name *-$FREQUENTY.sql.gz -delete
exit 0;

View File

@@ -1,27 +0,0 @@
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 app: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

@@ -1,86 +0,0 @@
version: '3.7'
services:
server:
image: nginx
restart: always
env_file: env
volumes:
# Vhost configuration
#- ./config/caddy/Caddyfile:/etc/caddy/Caddyfiledocker-com
- ./config/nginx/in-vhost.conf:/etc/nginx/conf.d/in-vhost.conf:ro
- ./docker/app/public:/var/www/app/public:ro
depends_on:
- app
# Run webserver nginx on port 80
# Feel free to modify depending what port is already occupied
ports:
- "80:80"
#- "443:443"
networks:
- invoiceninja
extra_hosts:
- "in5.localhost:192.168.0.124 " #host and ip
app:
image: invoiceninja/invoiceninja:5
env_file: env
restart: always
volumes:
- ./config/hosts:/etc/hosts:ro
- ./docker/app/public:/var/www/app/public:rw,delegated
- ./docker/app/storage:/var/www/app/storage:rw,delegated
depends_on:
- db
networks:
- invoiceninja
extra_hosts:
- "in5.localhost:192.168.0.124 " #host and ip
db:
image: mysql:5
# When running on ARM64 use MariaDB instead of MySQL
# image: mariadb:10.4
# For auto DB backups comment out image and use the build block below
# build:
# context: ./config/mysql
ports:
- "3305:3306"
restart: always
env_file: env
volumes:
- ./docker/mysql/data:/var/lib/mysql:rw,delegated
# remove comments for next 4 lines if you want auto sql backups
#- ./docker/mysql/bak:/backups:rw
#- ./config/mysql/backup-script:/etc/cron.daily/daily:ro
#- ./config/mysql/backup-script:/etc/cron.weekly/weekly:ro
#- ./config/mysql/backup-script:/etc/cron.monthly/monthly:ro
networks:
- invoiceninja
extra_hosts:
- "in5.localhost:192.168.0.124 " #host and ip
# THIS IS ONLY A VALID CONFIGURATION FOR IN 4. DO NOT USE FOR IN 5.
# cron:
# image: invoiceninja/invoiceninja:alpine-4
# volumes:
# - ./docker/app/public:/var/www/app/public:rw,delegated
# - ./docker/app/storage:/var/www/app/storage:rw,delegated
# - ./docker/app/public/logo:/var/www/app/public/logo:rw,delegated
# entrypoint: |
# /bin/sh -c 'sh -s <<EOF
# trap "break;exit" SIGHUP SIGINT SIGTERM
# sleep 300s
# while /bin/true; do
# ./artisan ninja:send-invoices
# ./artisan ninja:send-reminders
# sleep 1d
# done
# EOF'
# networks:
# - invoiceninja
#
networks:
invoiceninja:

View File

@@ -1 +0,0 @@

View File

@@ -1 +0,0 @@

33
env
View File

@@ -1,33 +0,0 @@
# IN application vars
APP_URL=http://in.localhost:8003
APP_KEY=<insert your generated key in here>
APP_DEBUG=true
REQUIRE_HTTPS=false
PHANTOMJS_PDF_GENERATION=false
# DB connection
DB_HOST=db
DB_PORT=3306
DB_DATABASE=ninja
DB_USERNAME=ninja
DB_PASSWORD=ninja
# 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
# V4 env vars
# DB_STRICT=false
# APP_CIPHER=AES-256-CBC

View File

@@ -1,13 +0,0 @@
FROM invoiceninja/invoiceninja:5
USER root
RUN apk add --no-cache supervisor \
&& mkdir /var/log/supervisord /var/run/supervisord \
&& chown $INVOICENINJA_USER:www-data /var/log/supervisord /var/run/supervisord
COPY supervisord.conf /
USER $INVOICENINJA_USER
CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"]

View File

@@ -1,29 +0,0 @@
[supervisord]
nodaemon=true
user=invoiceninja
pidfile=/var/run/supervisord/supervisord.pid
logfile=/dev/null ; nodaemon will cause logs to go to stdout
logfile_maxbytes=0
loglevel=error
[program:php-fpm]
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
command=php-fpm
[program:scheduler]
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
command=php artisan schedule:work
[program:queue-worker]
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
numprocs=2
command=php artisan queue:work --sleep=3 --tries=1 --memory=1024 --timeout=3600 --daemon

62
octane/.env Normal file
View File

@@ -0,0 +1,62 @@
# IN application vars
APP_URL=http://localhost
APP_KEY=base64:RR++yx2rJ9kdxbdh3+AmbHLDQu+Q76i++co9Y8ybbno=
APP_ENV=production
APP_DEBUG=true
REQUIRE_HTTPS=false
PHANTOMJS_PDF_GENERATION=false
PDF_GENERATOR=snappdf
TRUSTED_PROXIES='*'
CACHE_DRIVER=redis
QUEUE_CONNECTION=redis
SESSION_DRIVER=redis
REDIS_HOST=redis
REDIS_PASSWORD=null
REDIS_PORT=6379
FILESYSTEM_DISK=debian_docker
# DB connection
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=ninja
DB_USERNAME=ninja
DB_PASSWORD=ninja
DB_ROOT_PASSWORD=ninjaAdm1nPassword
DB_CONNECTION=mysql
# 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
# GoCardless/Nordigen API key for banking integration
NORDIGEN_SECRET_ID=
NORDIGEN_SECRET_KEY=
IS_DOCKER=true
SCOUT_DRIVER=null
#SNAPPDF_CHROMIUM_PATH=/usr/bin/google-chrome-stable

102
octane/Dockerfile Normal file
View File

@@ -0,0 +1,102 @@
ARG PHP_VERSION=8.4
ARG FRANKENPHP_VERSION=1
ARG DEBIAN_VERSION=trixie
FROM dunglas/frankenphp:${FRANKENPHP_VERSION}-php${PHP_VERSION}-${DEBIAN_VERSION} AS prepare-app
ARG URL=https://github.com/invoiceninja/invoiceninja/releases/latest/download/invoiceninja.tar.gz
ADD ${URL} /tmp/invoiceninja.tar.gz
RUN tar -xf /tmp/invoiceninja.tar.gz \
&& ln -s ./resources/views/react/index.blade.php ./public/index.html \
# Symlink
&& php artisan storage:link \
# Octane
&& php artisan octane:install --server=frankenphp
# ==================
# InvoiceNinja image
# ==================
FROM dunglas/frankenphp:${FRANKENPHP_VERSION}-php${PHP_VERSION}-${DEBIAN_VERSION}
ARG user=ninja
# PHP modules
ARG php_require="bcmath gd mbstring pdo_mysql zip"
ARG php_suggest="exif imagick intl pcntl saxon soap"
ARG php_extra="opcache"
# Create a system user UID/GID=999
RUN useradd -r ${user}
# Allow to bind to privileged ports
RUN setcap CAP_NET_BIND_SERVICE=+eip /usr/local/bin/frankenphp
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
mariadb-client \
gpg \
# Unicode support for PDF
fonts-noto-cjk-extra \
fonts-wqy-microhei \
fonts-wqy-zenhei \
xfonts-wqy \
# Install google-chrome-stable(amd64)/chromium(arm64)
&& if [ "$(dpkg --print-architecture)" = "amd64" ]; then \
mkdir -p /etc/apt/keyrings \
&& curl -fsSL https://dl.google.com/linux/linux_signing_key.pub | \
gpg --dearmor -o /etc/apt/keyrings/google.gpg \
&& echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/google.gpg] https://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends google-chrome-stable \
&& mkdir /config/google-chrome \
&& chown ${user}: /config/google-chrome; \
elif [ "$(dpkg --print-architecture)" = "arm64" ]; then \
apt-get install -y --no-install-recommends \
chromium \
&& mkdir /config/chromium \
&& chown ${user}: /config/chromium; \
fi \
# Cleanup
&& apt-get purge -y gpg \
&& apt-get autoremove -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install PHP extensions
RUN install-php-extensions \
${php_require} \
${php_suggest} \
${php_extra}
# Configure PHP
RUN ln -s "${PHP_INI_DIR}/php.ini-production" "${PHP_INI_DIR}/php.ini"
COPY php/php.ini /usr/local/etc/php/conf.d/invoiceninja.ini
# Workaround: Disable SSL for mariadb-client for compatibility with MySQL
RUN echo "skip-ssl = true" >> /etc/mysql/mariadb.conf.d/50-client.cnf
# Create directory for artisan tinker (init.sh)
RUN mkdir /config/psysh \
&& chown ${user}: /config/psysh
# Change owner for caddy directories
RUN chown -R ${user}: \
/data/caddy \
/config/caddy
# InvoiceNinja
COPY --from=prepare-app --chown=${user}:${user} /app /app
# Add initialization script
COPY --chmod=0755 scripts/init.sh /usr/local/bin/init.sh
USER ${user}
HEALTHCHECK --start-period=100s CMD curl -f http://localhost/health
ENTRYPOINT ["/usr/local/bin/init.sh"]
CMD ["frankenphp", "php-cli", "artisan", "octane:frankenphp"]

129
octane/docker-compose.yml Normal file
View File

@@ -0,0 +1,129 @@
# name: invoiceninja
x-app-volumes: &volumes
volumes:
- app_storage:/app/storage
- caddy_data:/data
services:
app:
build:
context: .
image: invoiceninja/invoiceninja-octane:${TAG:-latest}
restart: unless-stopped
# php artisan help octane:frankenphp
command: --port=80 --workers=2
# command: --host=example.com --port=443 --workers=2 --https --http-redirect --log-level=info
ports:
- "80:80" # HTTP
# - "443:443" # HTTPS
# - "443:443/udp" # HTTP/3, Works for chromium based browser, but causes H3_GENERAL_PROTOCOL_ERROR for pdf previews in Firefox
env_file:
- ./.env
environment:
LARAVEL_ROLE: app
<<: *volumes
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
# mariadb:
# condition: service_healthy
# valkey:
# condition: service_healthy
app-worker:
image: invoiceninja/invoiceninja-octane:${TAG:-latest}
restart: unless-stopped
# php artisan help queue:work
command: --verbose --sleep=3 --tries=3 --max-time=3600
deploy:
mode: replicated
replicas: 2
env_file:
- ./.env
environment:
LARAVEL_ROLE: worker
<<: *volumes
healthcheck:
test: ["CMD", "pgrep", "-f", "queue:work"]
depends_on:
app:
condition: service_healthy
app-scheduler:
image: invoiceninja/invoiceninja-octane:${TAG:-latest}
restart: unless-stopped
# php artisan help schedule:work
command: --verbose
env_file:
- ./.env
environment:
LARAVEL_ROLE: scheduler
<<: *volumes
healthcheck:
test: ["CMD", "pgrep", "-f", "schedule:work"]
depends_on:
app:
condition: service_healthy
mysql:
image: mysql:8
restart: unless-stopped
environment:
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
volumes:
- mysql_data:/var/lib/mysql
healthcheck:
test:
[
"CMD",
"mysqladmin",
"ping",
"-h",
"localhost",
"-u${MYSQL_USER}",
"-p${MYSQL_PASSWORD}",
]
redis:
image: redis:alpine
restart: unless-stopped
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
# mariadb:
# image: mariadb:11.8
# restart: unless-stopped
# environment:
# MARIADB_DATABASE: ${DB_DATABASE}
# MARIADB_USER: ${DB_USERNAME}
# MARIADB_PASSWORD: ${DB_PASSWORD}
# MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
# volumes:
# - mariadb:/var/lib/mysql
# healthcheck:
# test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
# valkey:
# image: valkey/valkey:8
# restart: unless-stopped
# volumes:
# - valkey:/data
# healthcheck:
# test: [ "CMD", "valkey-cli", "ping" ]
volumes:
app_storage:
caddy_data:
mysql_data:
redis_data:
# mariadb:
# valkey:

24
octane/php/php.ini Normal file
View File

@@ -0,0 +1,24 @@
[core]
; https://www.php.net/manual/en/ini.core.php
post_max_size=10M
upload_max_filesize=10M
memory_limit=512M
[opcache]
; https://www.php.net/manual/en/opcache.installation.php#opcache.installation.recommended
opcache.enable_cli=1
[jit]
; https://wiki.php.net/rfc/jit_config_defaults
opcache.jit=tracing
opcache.jit_buffer_size=64M
[extra]
; https://frankenphp.dev/docs/performance/#php-performance
; http://symfony.com/doc/current/performance.html
opcache.memory_consumption=256
opcache.max_accelerated_files=20000
opcache.preload=/app/preload.php
opcache.validate_timestamps=0
realpath_cache_size = 4096K
realpath_cache_ttl = 600

97
octane/scripts/init.sh Executable file
View File

@@ -0,0 +1,97 @@
#!/bin/sh -eu
# Fallback to app
role=${LARAVEL_ROLE:-app}
# Set PDF generation browser path based on architecture
export SNAPPDF_CHROMIUM_PATH=/usr/bin/google-chrome-stable
if [ "$(dpkg --print-architecture)" = "arm64" ]; then
export SNAPPDF_CHROMIUM_PATH=/usr/bin/chromium
fi
# Check for default CMD, flag(s) or empty CMD
if [ "$*" = 'frankenphp php-cli artisan octane:frankenphp' ] || [ "${1#-}" != "$1" ] || [ "$#" -eq "0" ]; then
if [ "--help" = "$1" ]; then
echo [CMD]
echo "This image will execute specific CMDs based on the environment variable LARAVEL_ROLE"
echo
echo "LARAVEL_ROLE=app: frankenphp php-cli artisan octane:frankenphp (default)"
echo "LARAVEL_ROLE=worker: frankenphp php-cli artisan queue:work"
echo "LARAVEL_ROLE=scheduler: frankenphp php-cli artisan schedule:work"
echo
echo [FLAGS]
echo To the CMD defined by LARAVEL_ROLE can be extended with flags for artisan commands
echo
echo Available flags can be displaced:
echo docker run --rm invoiceninja/invoiceninja-debian frankenphp php-cli artisan help octane:frankenphp
echo docker run --rm invoiceninja/invoiceninja-debian frankenphp php-cli artisan queue:work
echo docker run --rm invoiceninja/invoiceninja-debian frankenphp php-cli artisan schedule:work
echo
echo Example:
echo docker run -e LARAVEL_ROLE=worker invoiceninja/invoiceninja-debian --verbose --sleep=3 --tries=3 --max-time=3600
echo
echo [Deployment]
echo Docker compose is recommended
echo
echo Example:
echo https://github.com/invoiceninja/dockerfiles/blob/octane/debian/docker-compose.yml
echo
exit 0
fi
# Run app
if [ "${role}" = "app" ]; then
cmd="frankenphp php-cli artisan octane:frankenphp"
# Check for required folders and create if needed, relevant for bind mounts
# It is not possible to chown, as we are not executing this script as root
[ -d /var/www/html/storage/app/public ] || mkdir -p /var/www/html/storage/app/public
[ -d /app/storage/framework/sessions ] || mkdir -p /app/storage/framework/sessions
[ -d /app/storage/framework/views ] || mkdir -p /app/storage/framework/views
[ -d /app/storage/framework/cache ] || mkdir -p /app/storage/framework/cache
[ -d /app/storage/logs ] || mkdir -p /app/storage/logs
if [ "$APP_ENV" = "production" ]; then
frankenphp php-cli artisan migrate --force
frankenphp php-cli artisan cache:clear # Clear after the migration
frankenphp php-cli artisan ninja:design-update
frankenphp php-cli artisan optimize
# If first IN run, it needs to be initialized
if [ "$(frankenphp php-cli artisan tinker --execute='echo Schema::hasTable("accounts") && !App\Models\Account::all()->first();')" = "1" ]; then
echo "Running initialization..."
frankenphp php-cli artisan db:seed --force
if [ -n "${IN_USER_EMAIL}" ] && [ -n "${IN_PASSWORD}" ]; then
frankenphp php-cli artisan ninja:create-account --email "${IN_USER_EMAIL}" --password "${IN_PASSWORD}"
else
echo "Initialization failed - Set IN_USER_EMAIL and IN_PASSWORD in .env"
exit 1
fi
fi
fi
echo "Production setup completed"
# Run worker
elif [ "${role}" = "worker" ]; then
cmd="frankenphp php-cli artisan queue:work"
# Run scheduler
elif [ "${role}" = "scheduler" ]; then
cmd="frankenphp php-cli artisan schedule:work"
# Invalid role
else
echo "Invalid role: ${role}"
exit 1
fi
# Append flag(s) to role cmd
if [ "${1#-}" != "$1" ]; then
set -- ${cmd} "$@"
else
set -- ${cmd}
fi
fi
exec "$@"