Compare commits

...

415 Commits

Author SHA1 Message Date
Ween Jiann
de856d0a88 Remove chmod for rootfs files 2021-03-28 23:39:37 +08:00
Ween Jiann
1f7458c9f7 Update build_push.yml 2021-03-28 23:16:04 +08:00
Ween Jiann
40e3add863 Update README.md 2021-03-28 14:47:40 +08:00
Ween Jiann
f4f8c79ce7 Split docker v4 and v5 files to different directories (#310)
* Move v4/5 files to separate folders

* Updated github build_push.yml action

* Updated docker-compose.yml
2021-03-28 14:18:54 +08:00
Ween Jiann
524e79c486 Build on ARM64 (#307)
* Updated Dockerfile for multiplatform

* Added linux/arm64 to build_push.yml
2021-03-26 09:09:37 +08:00
Ween Jiann
4ec70c8da6 Reshuffle Dockerfile to optimise caching (#306)
* Refactor alpine folder

* Rearrange Dockerfile

* Updated build_push.yml for testing

* Updated build_push.yml for production

* Added IS_DOCKER env

* Added target to build_push.yml
2021-03-25 22:05:47 +08:00
Ween Jiann
176e2c96d6 Fixed entrypoint chown statement (#304)
* Fix entrypoint

* Rescope chart actions
2021-03-25 11:18:23 +08:00
Ween Jiann
36db897022 Update bug_report.md 2021-03-24 23:58:14 +08:00
Lee Ween Jiann
022cf8c1e8 Refactor chart to charts 2021-03-24 10:12:10 +08:00
Lee Ween Jiann
517ef61313 Updated chart README.md 2021-03-24 10:08:17 +08:00
Lee Ween Jiann
8e75344717 Updated token in release.yaml 2021-03-24 09:56:29 +08:00
Ween Jiann
e19641f754 Merge Helm to Master branch (#302)
* Added chart

* Added github actions

* Fix actions

* Added README.md

Co-authored-by: David Bomba <turbo124@gmail.com>
2021-03-24 09:33:29 +08:00
David Bomba
789e49fe1b Merge pull request #301 from lwj5/actions
Rescope build_push.yaml
2021-03-24 12:28:16 +11:00
Lee Ween Jiann
d462cd64ed Rescope build_push.yaml 2021-03-24 09:18:19 +08:00
David Bomba
51629ef283 Merge pull request #300 from lwj5/docker-helm
Updated Dockerfile and supervisord.conf
2021-03-24 11:58:56 +11:00
Lee Ween Jiann
8d37d6a4c5 Added DB_PORT1 to env 2021-03-24 08:40:35 +08:00
Lee Ween Jiann
a604f4e8b6 Updated entrypoint to chown only in <4 2021-03-24 08:14:30 +08:00
Lee Ween Jiann
18fb27ad9f Merge branch 'master' into docker-helm 2021-03-24 07:59:56 +08:00
David Bomba
ff1dfee088 Merge pull request #279 from tms0/cleanup_supervisor
Cleanup supervisor conf
2021-03-24 07:51:13 +11:00
Lee Ween Jiann
f16815e960 Updated supervisor files 2021-03-23 23:18:29 +08:00
Lee Ween Jiann
c0350de418 Modified to fit k8s 2021-03-23 19:47:11 +08:00
David Bomba
f175fa4fb0 Update env 2021-03-20 16:47:37 +11:00
David Bomba
0d93596cde Update README.md 2021-03-05 20:44:54 +11:00
=
10aaf3fb6e Set auto DB backups to optin by default 2021-03-03 16:48:54 +11:00
David Bomba
8117d0c5bd Merge pull request #291 from danielgroen/master
auto db backup script
2021-03-03 16:46:13 +11:00
danielgroen
fef92891cb auto db backup script 2021-03-02 13:05:12 +01:00
David Bomba
7f415803fb Merge pull request #286 from invoiceninja/revert-284-dotenv_improvements
Revert "got all the vars onto the dotenv file"
2021-02-11 16:04:19 +11:00
David Bomba
1caa8c7e70 Revert "got all the vars onto the dotenv file" 2021-02-11 16:04:11 +11:00
David Bomba
e35653fe59 Merge pull request #284 from danielgroen/dotenv_improvements
got all the vars onto the dotenv file
2021-02-09 22:48:47 +11:00
danielgroen
4d7cc8e464 got all the vars onto the dotenv file 2021-02-09 11:35:45 +01:00
David Bomba
f42fc93aa5 Merge branch 'master' into cleanup_supervisor 2021-02-03 09:35:50 +11:00
David Bomba
c6e122b81f Merge pull request #282 from turbo124/master
Remove redis queue worker from defaults
2021-02-03 09:32:29 +11:00
David Bomba
421a1f10e6 Remove redis queue worker from defaults 2021-02-03 09:31:14 +11:00
David Bomba
84db77cde8 Merge pull request #281 from turbo124/master
Improve supervisor configuration
2021-02-01 08:31:32 +11:00
David Bomba
e8706de11c Improve supervisor configuration 2021-02-01 08:30:50 +11:00
Valentin Day
f9f79ceb21 Cleanup supervisor conf 2021-01-28 11:11:24 +01:00
David Bomba
960a85d8a7 Merge pull request #278 from turbo124/master
fix for defaults of supervisor
2021-01-28 21:03:28 +11:00
David Bomba
6cd85f48cd fix for defaults of supervisor 2021-01-28 21:03:09 +11:00
David Bomba
eca3af3da5 Merge pull request #277 from turbo124/master
Adjustments for supervisor
2021-01-28 20:38:28 +11:00
David Bomba
b141cfe449 Adjustments for supervisor 2021-01-28 20:38:03 +11:00
David Bomba
3104ec0be9 Merge pull request #276 from turbo124/master
Adjustments for supervisor
2021-01-28 20:18:21 +11:00
David Bomba
acd778f815 Adjustments for supervisor 2021-01-28 20:18:03 +11:00
David Bomba
0641860c3f Merge pull request #275 from turbo124/master
Adjustments for supervisor
2021-01-28 20:09:27 +11:00
David Bomba
f6564ffb14 Adjustments for supervisor 2021-01-28 20:09:11 +11:00
David Bomba
d751217d9a Merge pull request #274 from turbo124/master
Adjustments for supervisor
2021-01-28 19:59:24 +11:00
David Bomba
9bd40b98df Adjustments for supervisor 2021-01-28 19:59:07 +11:00
David Bomba
54f789d5a1 Merge pull request #273 from turbo124/master
Add supervisor to DockerFile
2021-01-28 19:55:39 +11:00
David Bomba
a6644abaa2 Add supervisor to DockerFile 2021-01-28 19:55:20 +11:00
David Bomba
d42e333248 Merge pull request #272 from turbo124/master
Change from queue:listen to queue:work.
2021-01-28 19:36:01 +11:00
David Bomba
2e4ccb920b Adjustments for supervisor 2021-01-28 19:35:29 +11:00
David Bomba
ebe353ca52 Adjustments for supervisor 2021-01-28 19:34:48 +11:00
David Bomba
1af91f451d Merge pull request #271 from turbo124/master
Remove cron container
2021-01-28 19:31:52 +11:00
David Bomba
386f6ed8c1 Remove cron container 2021-01-28 19:31:20 +11:00
David Bomba
73e88f6042 Merge pull request #270 from tms0/supervisor_v5
Add example to run php-fpm, scheduler and queue worker in the same container with supervisor
2021-01-28 19:30:25 +11:00
Valentin Day
758709a796 Change supervisord logging options 2021-01-28 09:05:50 +01:00
Valentin Day
a67de32b6e Move supervisor example into an examples folder 2021-01-27 15:43:45 +01:00
Valentin Day
49d3e562de Add example to run php-fpm, scheduler and queue worker in the same container with supervisor 2021-01-27 15:30:14 +01:00
David Bomba
7d4afadbb5 Merge pull request #268 from turbo124/master
Add mysql-client back in
2021-01-26 17:13:07 +11:00
David Bomba
3709355309 Add mysql-client back in 2021-01-26 17:12:52 +11:00
David Bomba
4b63e1f76d Merge pull request #265 from lwj5/php
Added install-php-extensions
2021-01-21 13:55:48 +11:00
Lee Ween Jiann
5118eac0ea Added install-php-extensions 2021-01-20 22:56:32 +08:00
David Bomba
486d38d6e1 Merge pull request #263 from turbo124/master
Remove sys_admin, add application variable
2021-01-19 07:39:15 +11:00
David Bomba
89ae36315d Remove sys_admin, add application variable 2021-01-19 07:38:54 +11:00
David Bomba
0c3237d3b9 Merge pull request #258 from lwj5/dockerfile
Enhancement and Fixes for Dockerfile
2021-01-11 16:11:52 +11:00
Lee Ween Jiann
e29f786b34 Revert 'git' dependency comment 2021-01-11 11:01:52 +08:00
Lee Ween Jiann
bfc5625687 Update entrypoint.sh to use ENV username 2021-01-10 22:34:49 +08:00
Lee Ween Jiann
4b5abbbd5e Add public missing folder condition for quick move 2021-01-10 22:16:34 +08:00
Lee Ween Jiann
a12f18836a Use uid to allow running in k8s with non-root PSP 2021-01-10 21:34:53 +08:00
Lee Ween Jiann
d59d534ac5 Update entrypoint.sh to use ENV paths + cleanup 2021-01-10 21:32:59 +08:00
Lee Ween Jiann
35d9ee80b7 Update Dockerfiles to use ENV for BAK paths 2021-01-10 21:31:05 +08:00
Lee Ween Jiann
115b997cab Move BAK to after npm run prod 2021-01-10 21:29:56 +08:00
Lee Ween Jiann
8ca8e459be Update cron to depend on app
- prevents race to copy files
2021-01-10 21:18:30 +08:00
David Bomba
15625f41f9 Merge pull request #257 from lwj5/patch-2
Remove node_modules and clean up
2021-01-10 09:17:18 +11:00
Ween Jiann
9dc1fec1fb Reinsert fonts 2021-01-08 22:13:06 +08:00
Ween Jiann
2342fd8cbb Remove node_modules and clean up 2021-01-08 21:28:43 +08:00
David Bomba
ae1f8fcecb Merge pull request #251 from turbo124/master
fixes for cron
2021-01-05 22:48:50 +11:00
David Bomba
6528ef7162 fixes for cron 2021-01-05 22:48:27 +11:00
David Bomba
2f6b5ea55e Minor fix 2021-01-05 22:45:29 +11:00
David Bomba
7c1ef82a09 Merge pull request #250 from turbo124/master
Update V4 container
2021-01-05 17:15:55 +11:00
David Bomba
98846729e6 update maintainer 2021-01-05 17:15:33 +11:00
David Bomba
f03860d8ea Fixes for V4 container 2021-01-05 17:14:49 +11:00
David Bomba
c624f6ed40 Fixes for V4 2021-01-05 16:20:27 +11:00
David Bomba
c94145edca Merge pull request #249 from turbo124/master
Fixes for Readme.
2021-01-05 12:09:01 +11:00
David Bomba
ff2c813355 Fixes for readme 2021-01-05 12:08:07 +11:00
David Bomba
e0cf941736 Typo 2021-01-05 11:56:49 +11:00
David Bomba
b1d65a8ac9 Typo 2021-01-05 11:56:21 +11:00
David Bomba
e6ad0c58ee Typo 2021-01-05 11:55:00 +11:00
David Bomba
11b99e7970 Typo 2021-01-05 11:54:19 +11:00
David Bomba
5fa605cba4 Typo 2021-01-05 11:53:36 +11:00
David Bomba
388f1a75b9 Merge pull request #248 from turbo124/master
Refactor DockerFiles
2021-01-05 11:52:28 +11:00
David Bomba
253c3339cf Fixes for ReadMe 2021-01-05 11:51:50 +11:00
David Bomba
d67fa3059a fixes for entrypoint 2021-01-05 11:09:56 +11:00
David Bomba
98e41ad73b Rework crons 2021-01-05 11:02:57 +11:00
David Bomba
14c597312e Fixes for formatting 2021-01-05 10:47:59 +11:00
David Bomba
af77440555 changes for README 2021-01-05 10:46:55 +11:00
David Bomba
9377777f62 Create .keep 2021-01-04 20:15:19 +11:00
David Bomba
ac7c520620 Create .keep 2021-01-04 20:15:03 +11:00
David Bomba
1ae79cde4f Merge pull request #247 from turbo124/master
Fixes for docker file
2021-01-04 20:12:35 +11:00
David Bomba
a58b89c55d Fixes for docker file" 2021-01-04 20:11:50 +11:00
David Bomba
89e6cffa90 Merge pull request #246 from turbo124/master
Fixes for crons and folder permissions
2021-01-03 21:34:27 +11:00
David Bomba
a82d60b4f5 Fixes for crons and folder permissions 2021-01-03 21:34:04 +11:00
David Bomba
32c93eb4d7 Merge pull request #241 from beganovich/v5-skip-snappdf-download
(v5) Add environment variable to skip downloading Chromium (snappdf)
2020-12-30 09:26:34 +11:00
=
9e603ba79f Fixes for crontab 2020-12-30 07:33:50 +11:00
Benjamin Beganović
d9889fcfaa Add variable to skip Chromium download 2020-12-28 14:25:16 +01:00
David Bomba
a89e145bf9 Merge pull request #239 from beganovich/v5-transition-to-snappdf
(v5) Support for snappdf
2020-12-24 09:25:32 +11:00
Benjamin Beganović
85d46e8968 support for snappdf 2020-12-23 18:06:31 +01:00
David Bomba
0fb5fa73e0 Merge pull request #233 from turbo124/master
fixes for docker file
2020-12-05 20:14:39 +11:00
David Bomba
de3a2e4278 fixes for docker file 2020-12-05 20:14:19 +11:00
David Bomba
bb514e8d06 Merge pull request #232 from turbo124/master
Remove storage:link from image build
2020-11-30 10:00:27 +11:00
David Bomba
2034c6ebff Remove storage:link from image build 2020-11-30 09:56:30 +11:00
David Bomba
65e36505a3 Merge pull request #231 from turbo124/master
Minor fixes
2020-11-28 18:07:34 +11:00
David Bomba
03c1e32123 Minor fixes 2020-11-28 18:07:16 +11:00
David Bomba
3612c87323 Merge pull request #230 from turbo124/master
Default to puppeteer PDF generation
2020-11-28 17:51:04 +11:00
David Bomba
4e9731a23e Default to puppeteer PDF generation 2020-11-28 17:50:46 +11:00
David Bomba
dea442c442 Merge pull request #229 from turbo124/master
Install libonig-dev with apk
2020-11-28 17:26:33 +11:00
David Bomba
a24c1b98a3 Install libonig-dev with apk 2020-11-28 17:26:13 +11:00
David Bomba
1596478724 Merge pull request #228 from turbo124/master
Install libonig-dev with apt
2020-11-28 17:20:28 +11:00
David Bomba
a240fd2977 Install libonig-dev with apt 2020-11-28 17:20:09 +11:00
David Bomba
7c1ef67755 Merge pull request #227 from turbo124/master
fixes for 7.4
2020-11-28 17:15:14 +11:00
David Bomba
bfc1d7add8 fixes for 7.4 2020-11-28 17:14:57 +11:00
David Bomba
111f5a7e4e Merge pull request #226 from turbo124/master
Add libonig to build
2020-11-28 17:12:27 +11:00
David Bomba
330f3e1c0e Add libonig to build 2020-11-28 17:12:10 +11:00
David Bomba
baeb925d87 Merge pull request #225 from turbo124/master
Add libonig to build
2020-11-28 17:05:46 +11:00
David Bomba
079a05bbd8 Add libonig to build 2020-11-28 17:05:30 +11:00
David Bomba
8e995aa2ef Merge pull request #224 from turbo124/master
Add libonig to build
2020-11-28 16:56:25 +11:00
David Bomba
dee4d0f27d Add libonig to build 2020-11-28 16:56:09 +11:00
David Bomba
60e5a68e01 Merge pull request #223 from turbo124/master
Fixes for lib jpg and freetype for php7.4
2020-11-28 16:49:45 +11:00
David Bomba
67ad43d05d Fixes for lib jpg and freetype for php7.4 2020-11-28 16:49:18 +11:00
David Bomba
35beefba60 Merge pull request #222 from turbo124/master
Fixes for lib jpg and freetype for php7.4
2020-11-28 16:45:22 +11:00
David Bomba
d1309cc86f Fixes for lib jpg and freetype for php7.4 2020-11-28 16:45:03 +11:00
David Bomba
a1d9220506 Merge pull request #221 from turbo124/master
Fix for libzip when using php7.4
2020-11-28 16:39:36 +11:00
David Bomba
386359a346 Fix for libzip when using php7.4 2020-11-28 16:38:50 +11:00
David Bomba
b503418904 Merge pull request #220 from turbo124/master
Fix for libzip when using php7.4
2020-11-28 16:28:33 +11:00
David Bomba
450eaf16e3 Fix for libzip when using php7.4 2020-11-28 16:28:13 +11:00
David Bomba
1f65c9f7f6 Merge pull request #219 from turbo124/master
Fixes for building zip on php7.4
2020-11-28 16:23:28 +11:00
David Bomba
c02bf7bd03 Fixes for building zip on php7.4 2020-11-28 16:22:58 +11:00
David Bomba
4111fa87c9 Merge pull request #218 from turbo124/master
Fix for libzip when using php7.4
2020-11-28 16:15:59 +11:00
David Bomba
0d5a7671ba Fix for libzip when using php7.4 2020-11-28 16:15:40 +11:00
David Bomba
7ea6e7c48e Merge pull request #217 from turbo124/master
Bump PHP version for spatie/browsershot
2020-11-28 16:09:14 +11:00
David Bomba
27e1788e91 Bump PHP version for spatie/browsershot 2020-11-28 16:08:54 +11:00
David Bomba
d24a69ec39 Merge pull request #216 from turbo124/master
Composer fixes
2020-11-28 15:59:17 +11:00
David Bomba
8384175465 Composer fixes 2020-11-28 15:58:56 +11:00
David Bomba
f8c442ec5f Merge pull request #215 from turbo124/master
Ensure we use composer 2
2020-11-28 15:35:01 +11:00
David Bomba
05f89f064e Ensure we use composer 2 2020-11-28 15:34:40 +11:00
David Bomba
902745ec5a Merge pull request #214 from turbo124/master
minor fixes
2020-11-28 15:31:51 +11:00
David Bomba
4efba38ce5 minor fixes 2020-11-28 15:31:21 +11:00
David Bomba
a184cf2844 Merge pull request #213 from turbo124/master
Add Git / link storage
2020-11-28 07:26:12 +11:00
David Bomba
94e8be57e5 Merge branch 'master' of https://github.com/turbo124/dockerfiles 2020-11-28 07:25:07 +11:00
David Bomba
385a434833 Add git to container to allow auto-updating from container 2020-11-28 07:24:59 +11:00
David Bomba
9ddeda4c32 storage link 2020-11-25 20:33:23 +11:00
David Bomba
805e526fc9 Update docker-compose.yml 2020-11-11 10:25:05 +11:00
David Bomba
cdc35aff2f Update Dockerfile_v5 2020-11-11 10:08:21 +11:00
David Bomba
1de16ab390 Update Dockerfile_v5 2020-11-11 09:42:08 +11:00
David Bomba
b9ab50800d Update Dockerfile_v5
remove hirak global
2020-11-11 05:06:01 +11:00
codedge
d2d03b9b18 Merge pull request #198 from beremaran/master
add puppeteer and add SYS_ADMIN cap
2020-10-15 09:53:26 +02:00
Berke Emrecan Arslan
ea0f3fa981 add puppeteer and add SYS_ADMIN cap 2020-09-18 16:12:31 +03:00
codedge
1d9a8681b2 Merge pull request #193 from codedge/master
Make env vars file support compatible with IN 5
2020-08-19 10:46:01 +02:00
Holger Lösken
f98b3915bd Make env vars file support compatible with IN 5 2020-08-19 10:45:33 +02:00
codedge
8762276c6f Merge pull request #192 from codedge/master
Fix execution of cron daemon
2020-08-19 10:42:15 +02:00
Holger Lösken
afcd9389ed Fix execution of cron daemon 2020-08-19 10:41:40 +02:00
codedge
591c799864 Merge pull request #191 from turbo124/master
Minor fix for docker composer
2020-08-19 08:52:37 +02:00
David Bomba
4c9c5ddd95 Minor fix for docker composer 2020-08-19 10:33:40 +10:00
codedge
994d75a07e Merge pull request #189 from codedge/master
Add cronjob for IN 5
2020-08-18 13:00:10 +02:00
Holger Lösken
3348a2beb6 Add cronjob for IN 5 2020-08-18 12:58:38 +02:00
codedge
c30cae4a99 Create CODE_OF_CONDUCT.md 2020-08-18 12:10:30 +02:00
codedge
1ed95cdcec Merge pull request #188 from codedge/master
Adding config for cron for IN 4
2020-08-18 09:41:15 +02:00
Holger Lösken
94126385e2 Adding config for cron for IN 4
This is just a quick fix. Cron config is not properly set up for version 4 and 5.
2020-08-18 09:40:42 +02:00
codedge
e64dd79cfc Merge pull request #187 from codedge/master
No logs for favicon and robots
2020-08-17 07:44:03 +02:00
Holger Lösken
5942c1c362 Merge branch 'master' of github.com:codedge/dockerfiles 2020-08-17 07:42:25 +02:00
Holger Lösken
78b5e59cd5 No log for favicon or robots, making this vhost the default 2020-08-17 07:42:21 +02:00
codedge
d1a8922f7d Merge pull request #185 from codedge/master
Move guidelines to wiki, add sample nginx config
2020-08-16 22:40:23 +02:00
codedge
d87e5948bf Merge branch 'master' into master 2020-08-16 22:40:15 +02:00
Holger Lösken
f4cade9fac Move guidelines to wiki, add sample nginx config 2020-08-16 22:36:24 +02:00
codedge
49f4266418 Merge pull request #179 from HashDot/master
add missing npm/nodejs
2020-08-07 09:13:51 +02:00
Lars Hampe
e7f6ef4c35 add missing npm/nodejs 2020-07-30 10:07:50 +02:00
codedge
1af469cf04 Merge pull request #169 from patski123/patch-1
Small Typo
2020-07-07 11:30:19 +02:00
PatSki123
2d934fd703 Update README.md 2020-07-06 10:03:38 -04:00
PatSki123
a7668325e8 Small Typo
Added missed word "key"
2020-07-06 08:02:47 -04:00
codedge
7aef08794b Merge pull request #165 from fwdIT/fix_caddy_config
Fixes #164 - caddy templating conflicts with php output
2020-06-23 08:22:57 +02:00
Koen Torfs
001c922e45 Fixes #164 - caddy templating conflicts with php output 2020-06-14 18:25:30 +02:00
Holger Lösken
85161446e9 Fix wrong evaluation of env vars 2020-06-08 14:53:16 +02:00
Holger Lösken
14c0fd89eb Extracting version out of tag 2020-06-08 10:01:53 +02:00
Holger Lösken
7b08926961 Remove config files for debian 2020-06-05 10:06:24 +02:00
Holger Lösken
a5e41d3072 Remov builts 2020-06-05 10:06:24 +02:00
Holger Lösken
72e07679eb Add naming to container 2020-06-02 12:33:19 +02:00
Holger Lösken
6d65f5e114 Make folder writeable by web server, update config cache 2020-06-01 23:17:46 +02:00
Holger Lösken
61cef26f80 Fix gid, add warning for v4/v5 2020-05-31 11:09:29 +02:00
codedge
e2d6cbd853 Merge pull request #155 from codedge/fix-wrong-tag
Fix wrong tag
2020-05-29 16:44:01 +02:00
Holger Lösken
21cc3ddf2c Fix wrong tag 2020-05-29 16:43:40 +02:00
Holger Lösken
8245a57117 Support docker secrets via _FILE 2020-05-29 09:23:20 +02:00
Holger Lösken
6b25f47ba1 Match db container to default env values 2020-05-29 09:23:20 +02:00
Holger Lösken
1168dec11b WIP: Implement docker secrets 2020-05-29 09:23:20 +02:00
Samuel Laulhau
f81e0c8f11 add bug report templates 2020-05-28 23:19:57 +02:00
Samuel Laulhau
3e2d5a4f8c Update issue templates 2020-05-28 23:18:33 +02:00
codedge
42e2c2234e Merge pull request #152 from codedge/docker-for-v5
Build docker images for v5
2020-05-28 10:27:32 +02:00
Holger Lösken
4e05229fed Fix missing php exts, do not run migrate and seed 2020-05-28 10:24:50 +02:00
Holger Lösken
c5fb1ab64b Remove db host 2020-05-27 19:12:58 +02:00
Holger Lösken
b190c8e633 Built multi stage image for v5 2020-05-27 19:08:42 +02:00
Holger Lösken
4350619c64 Update tags for v5 2020-05-26 23:04:49 +02:00
Holger Lösken
a38b398d5d Build docker images for v5 2020-05-26 22:55:29 +02:00
codedge
3f8fb906b5 Merge pull request #151 from codedge/fix-arg-scoping
Fix wrong argument scope, pull correct IN version
2020-05-25 21:53:55 +02:00
Holger Lösken
8962e0d0b9 Fix wrong argument scope, pull correct IN version 2020-05-25 21:51:27 +02:00
codedge
fc6923ad40 Merge pull request #148 from codedge/permissions
Add permission instructions
2020-05-23 18:07:40 +02:00
Holger Lösken
3b907d6093 Add permission instructions 2020-05-23 18:07:22 +02:00
codedge
431f11ccd4 Merge pull request #147 from codedge/fix-badge
Fix badge
2020-05-23 10:34:09 +02:00
Holger Lösken
2de45a45ab Fix badge 2020-05-23 10:33:38 +02:00
Holger Lösken
6037ebf2c2 Add some badges fix workflow 2020-05-22 21:33:38 +02:00
Holger Lösken
685801983a Remove phantomjs
PhantomJS does not work for alpine, use cloud version
2020-05-21 22:30:00 +02:00
Holger Lösken
f1a5f6fc7b Remove checks for running entrypoint 2020-05-21 22:30:00 +02:00
Holger Lösken
6cbdec0686 Remove unused env var 2020-05-21 22:30:00 +02:00
Holger Lösken
4c855161f6 Fixed missing maintainer 2020-05-21 22:30:00 +02:00
Holger Lösken
1447268f94 Fix wrong path for entrypoint 2020-05-21 22:30:00 +02:00
Holger Lösken
c0c13705ae PhantomJS works on alpine 2020-05-21 22:30:00 +02:00
Holger Lösken
11869a23a1 Adjusted makefile and workflow to build alpine and debian image 2020-05-21 22:30:00 +02:00
Holger Lösken
39bc2f0d89 Missing merged changes from PR #140 2020-05-21 22:30:00 +02:00
Holger Lösken
0ff6e56ed8 Format readme, shorten the docker command 2020-05-21 22:30:00 +02:00
Holger Lösken
ac5f1bfad5 Base setup for building images via gh actions 2020-05-21 22:30:00 +02:00
Samuel Laulhau
fb064cb05e merge improve-docker-compose 2020-05-18 12:39:18 +02:00
Holger Lösken
a84ec51b3f Restructure docker-compose
* Use alpine images
* Remove separate directory
* Give more hints in docker-compose file
2020-05-18 12:37:35 +02:00
Holger Lösken
e2cafb8b72 Fix text 2020-05-18 12:13:10 +02:00
Holger Lösken
672fc41611 Stackoverflow for getting help 2020-05-18 12:13:10 +02:00
Holger Lösken
eeffc2191c Update instructions, restore log driver 2020-05-12 10:29:07 +02:00
Holger Lösken
8a6622bbbb Explanation how view log files
Fix #137

* Better description how to find log files
* Change default log to file but can be overridden by env var
2020-05-12 10:29:07 +02:00
Holger Lösken
4f3f7ca8fe Make use of .env.example values 2020-05-11 22:43:58 +02:00
Holger Lösken
9e8db1b5bd Update docs for PhantomJS key 2020-05-11 22:43:58 +02:00
Holger Lösken
6bcfd57208 Add link to phantomjs docs 2020-05-11 22:43:58 +02:00
Holger Lösken
db9e0f4309 Update README.md
Fix #71

* Update readme with details how to generate secret keys - application key and phantomjs
* Integrated mounting persistence folder into docker command
2020-05-11 22:43:58 +02:00
Samuel Laulhau
cb91ba9973 4.5.18 2020-04-01 07:14:44 +02:00
Justin Hammond
9060027999 Update README.md 2020-01-06 17:05:09 +01:00
Samuel Laulhau
26c91935fc fix fpm port in exemple
fix #117
2019-12-22 17:51:27 +01:00
Dan Bright
7c5275e766 Update entrypoint.sh
Fix a tiny, insignificant typo in a comment.
2019-12-20 17:26:31 +01:00
Samuel Laulhau
482b30b677 4.5.17 2019-12-03 16:34:22 +01:00
Susanne Gerber
7a45036c72 fix small spelling error 2019-10-29 15:33:19 +01:00
Samuel Laulhau
a963db2b63 4.5.16 2019-10-28 09:31:53 +01:00
Robin Chan
26a71f7f1f if web starts first without app, nginx will quit 2019-10-13 21:01:40 +02:00
Sam
af98f696b9 3.5.15 2019-10-08 10:09:00 +02:00
Martin Honermeyer
696d3b356a Unzip quietly 2019-09-19 09:38:01 +02:00
Samuel Laulhau
0ef00831f6 use stretch image
this is a work around for freetype on buster
2019-07-23 09:46:07 +02:00
Sam
6ba1f11221 4.5.14 2019-07-22 09:46:45 +02:00
Geoffroy Empain
933748e15b Use the correct docker host for mysql
`mysql` is not a valid host. The container name is `db` as specified by the `docker-compose.yml`.
2019-07-05 09:53:23 +02:00
Sam
03180fc65e 4.5.13 2019-05-27 10:35:50 +02:00
Stanislav Shupilkin
e0fcb50ecb Update docker-compose.yml 2019-03-27 14:34:16 +01:00
Stanislav Shupilkin
5c418c474e Change Dockerfile, remove deprecated MAINTAINER section, separate stage on two 2019-03-27 14:34:16 +01:00
Sam
5e59ec10e3 4.5.12 2019-03-26 09:59:53 +01:00
Sam
6b0182e712 4.5.11 2019-03-04 21:04:24 +01:00
Sam
961282a90e 4.5.10 2019-02-21 10:46:35 +01:00
Sam
3a17d81cab 4.5.9 2019-01-23 10:30:24 +01:00
Sam
a3bb9b9681 4.5.8 2019-01-08 12:40:44 +01:00
Sam
766b604971 4.5.7 2018-12-11 15:49:01 +01:00
Andreas Treubert
005e1b9dfe Little bugfix for docker run example within readme 2018-11-14 10:21:20 +01:00
Sam
8d0a39ac71 4.5.6 2018-11-09 11:12:38 +01:00
Sam
6e12296f25 4.5.5 2018-09-28 09:45:22 +02:00
Sam
dbac9305c9 4.5.4 2018-09-10 15:41:27 +02:00
Anojh Thayaparan
3c96683d46 Cron should be run every day not every hour 2018-09-04 10:29:55 +02:00
Sam
279a282d44 4.5.3 2018-08-20 21:00:55 +02:00
Sam
e0332086d4 4.5.2 2018-08-08 23:06:15 +02:00
Sam
63ffa18860 chmod entrypoint in repo 2018-07-29 16:55:52 +02:00
Sam
960c3172e9 remove old env in alpine 2018-07-29 16:52:39 +02:00
Sam
43ff450c2d avoid using copy --from in alpine 2018-07-29 16:49:39 +02:00
Sam
aaa6118286 remove "ln gmp.h" command in alpine 2018-07-29 16:33:11 +02:00
Sam
1ab7bc02d6 4.5.1 2018-07-19 18:48:16 +02:00
Sam
9625d9d9d0 4.5.0 2018-07-09 11:09:25 +02:00
Sam
3bd5324136 chown mounted dir 2018-07-04 22:07:24 +02:00
Sam
e28c8dc07b 4.4.4 2018-06-11 09:12:30 +02:00
Sam
4ab4039887 4.4.3 2018-05-15 20:08:35 +02:00
Sam
650851811a chown backup 2018-05-10 10:03:25 +02:00
Sam
72762dc964 4.4.2 2018-05-03 09:41:03 +02:00
Sam
dc66ca0544 4.4.1 2018-04-30 16:21:31 +02:00
Sam
52992d622b use mysql 5 in docker-compose 2018-04-30 16:21:00 +02:00
Sam
9dcf825f85 chown .env 2018-04-25 14:15:04 +02:00
Sam
350a9fad35 4.4.0 2018-04-25 09:59:49 +02:00
Sam
d8ca192f8e use official Invoice Ninja package 2018-04-24 15:16:33 +02:00
Sam
b6d213682d composer optim 2018-04-24 10:06:13 +02:00
Sam
0d88a6268f fix nginx and mysql version in docker-compose 2018-04-24 10:05:47 +02:00
Sam
c641680309 optim dockerfile 2018-04-23 18:06:28 +02:00
Sam
47116c7d78 add DB_DATABASE in docker-compose exemple 2018-04-23 18:06:19 +02:00
Sam
41544ec1e0 4.3.1 2018-04-09 11:53:45 +02:00
Sam
f3b5a62d36 4.3.0 2018-04-08 10:13:25 +02:00
Sam
69d2f54b03 php 7.2 2018-04-05 14:29:10 +02:00
Sam
5a1c1c16d7 fix clean composer 2018-04-04 16:57:39 +02:00
Sam
3ade74efc9 fix Dockerfile 2018-04-04 12:46:21 +02:00
Sam
dc00f6a604 rm composer after build 2018-04-04 12:30:58 +02:00
Sam
3ef75b29ff 4.2.2 2018-03-12 10:05:06 +01:00
Sam
e6df981f06 4.2.1 2018-03-05 09:44:34 +01:00
Aurélien Lavorel
27bdb5d95b [add] mysql performance improvement 2018-02-28 17:46:22 +01:00
Sam
206fe5db2d 4.2.0 2018-02-22 10:03:01 +01:00
Samuel Laulhau
4e5022fcc4 remove useless and/or wrong default settings 2018-02-20 15:01:24 +01:00
Sam
ded7e32051 4.1.5 2018-02-07 22:10:59 +01:00
Sam
d2ae9b365b 4.1.4 2018-01-25 22:02:05 +01:00
Sam
612645fad2 4.1.3 2018-01-19 15:56:49 +01:00
Sam
192f6d7648 4.1.2 2018-01-16 21:45:53 +01:00
Sam
083fe9648e 4.1.1 2018-01-16 21:45:26 +01:00
Sam
6ad5e6ec48 fix readme for image base 2018-01-14 22:53:25 +01:00
Sam
13487557e6 docker-compose for production 2018-01-14 22:44:20 +01:00
Sam
16f77b069e 4.1.0 2018-01-09 19:05:50 +01:00
Sam
58c4eb66d4 4.0.1 2017-12-14 22:28:01 +01:00
Sam
d044303647 4.0.0 2017-12-12 10:42:04 +01:00
Sam
09b5b84750 3.9.2 2017-11-20 10:36:53 +01:00
Sam
2932f92f4c 3.9.1 2017-11-14 15:24:03 +01:00
Sam
3ad282ac29 re3.9.0 2017-11-09 14:01:23 +01:00
Sam
507451d7ca 3.9.0 2017-11-09 13:53:53 +01:00
Sam
2d563e4b73 3.8.1 2017-10-23 14:39:16 +02:00
Sam
991b22e121 3.8.0 2017-10-15 15:01:13 +02:00
jelle
c4e8f3ea0b Mount MySQL volume to make data persistent 2017-10-15 14:53:13 +02:00
Samuel Laulhau
ee272cd52f add cipher/key 2017-10-15 14:51:01 +02:00
Sam
a60567ae16 3.7.2 2017-10-02 10:23:24 +02:00
Sam
d81542e536 3.7.1 2017-09-18 09:48:28 +02:00
Sam
19333d150a 3.7.0 2017-09-11 08:27:02 +02:00
Sam
ad1c976a31 3.6.1 2017-08-17 10:39:37 +02:00
Sam
bd7153a0b7 3.6.0 2017-08-08 11:51:37 +02:00
Sam
c1fde99ad4 3.5.1 2017-07-23 10:35:03 +02:00
Sam
c7d901f8c3 3.5.0 2017-07-23 10:34:47 +02:00
arubacao
e432564e48 Revert "Update php:7.0-fpm to php:7.1-fpm"
This reverts commit 17759c3df7.
2017-07-20 09:14:02 +02:00
arubacao
2d42e33da0 Revert "remove mcrypt"
This reverts commit ce4cf2118b.
2017-07-20 09:14:02 +02:00
arubacao
00ae03ce24 Revert "remove rijndael-128 as default cipher"
This reverts commit e0f46d2034.
2017-07-20 09:14:02 +02:00
arubacao
5f4e58ba77 Revert "use wildcard for nginx.conf"
This reverts commit 5d2760a47a.
2017-07-20 09:14:02 +02:00
arubacao
b822d9d53a Revert "add APP_KEY for the example"
This reverts commit c90e0dd42b.
2017-07-20 09:14:02 +02:00
arubacao
8a935f042e Revert "repeat steps for alpine"
This reverts commit ddb96915cf.
2017-07-20 09:14:02 +02:00
arubacao
ddb96915cf repeat steps for alpine 2017-07-13 17:58:50 +02:00
arubacao
c90e0dd42b add APP_KEY for the example 2017-07-13 17:58:50 +02:00
arubacao
5d2760a47a use wildcard for nginx.conf 2017-07-13 17:58:50 +02:00
arubacao
e0f46d2034 remove rijndael-128 as default cipher 2017-07-13 17:58:50 +02:00
arubacao
ce4cf2118b remove mcrypt 2017-07-13 17:58:50 +02:00
arubacao
17759c3df7 Update php:7.0-fpm to php:7.1-fpm 2017-07-13 17:58:50 +02:00
Sam
c97fd64020 3.4.2 2017-06-30 14:45:02 +02:00
Sam
467960061b 3.4.1 2017-06-22 20:48:57 +02:00
Sam
2dfa7e1edd 3.4.0 2017-06-18 12:53:09 +02:00
Sam
475b3e7121 notice on phantomjs/alpine 2017-06-18 12:52:36 +02:00
Sam
7c40a5a813 alpine change phantomjs bin path 2017-06-11 16:55:34 +02:00
Sam
b92c8d928e fix phantomjs install in alpine 2017-06-11 14:25:18 +02:00
Sam
0ed2a1cf4c 3.3.3 2017-05-16 09:38:58 +02:00
Sam
43bb842598 3.3.1 2017-05-10 09:09:46 +02:00
Sam
8c1c2488bd fix alpine error 2017-05-03 16:15:34 +02:00
Sam
baf2459f72 alpine error fix 2017-05-03 14:37:55 +02:00
Sam
89ad8ad2bf fix alpine chown 2017-05-03 11:28:15 +02:00
Sam
d80a0fa212 3.3.0 2017-05-03 10:51:13 +02:00
Sam
bce728b558 dedebug exemple 2017-04-25 12:20:59 +02:00
Sam
23a8241d13 alpine 3.2.1 2017-04-25 12:02:06 +02:00
Sam
302da0c895 add opcahce 2017-04-25 11:24:33 +02:00
Sam
81075f2595 alpine working image 2017-04-25 11:17:51 +02:00
Sam
fae767223f alpine image first draft 2017-04-25 11:17:51 +02:00
Sam
a896a49e48 add opcahce 2017-04-25 11:13:50 +02:00
Sam
4d00017b2a 3.2.1 2017-04-23 19:54:06 +02:00
Sam
9601557224 3.2.0 2017-04-03 11:07:27 +02:00
Sam
5b1bb1f277 3.1.3 2017-03-23 09:14:23 +01:00
Sam
2208768dfe 3.1.2 2017-03-13 16:59:11 +01:00
Sam
5690f782b8 3.1.1 2017-03-06 16:44:44 +01:00
Sam
61cd833979 3.1.0 2017-02-28 10:37:49 +01:00
Sam
546ee0b139 lighter image 2017-02-17 10:16:29 +01:00
Sam
cde6e6ecd1 remove outdated comment 2017-02-16 22:20:57 +01:00
Sam
c07242eb1c check public directory for upgrade 2017-02-16 20:25:21 +01:00
Sam
c27b04b63a rm db test 2017-02-16 19:15:51 +01:00
Samuel Laulhau
540d3180f1 Merge pull request #47 from miend/master
Issue #45: Rename the entrypoint script to make it a bit cleaner.
2017-02-15 21:35:43 +01:00
miend
f3811ef09b Rename the entrypoint script to make it a bit cleaner. 2017-02-15 12:19:17 -06:00
Sam
0f114b8827 Merge branch 'master' of github.com:invoiceninja/dockerfiles 2017-02-10 16:06:05 +01:00
Sam
bbc3e5303b 3.0.5 2017-02-10 16:05:51 +01:00
Samuel Laulhau
554233c9ea remove phantomjs archive 2017-02-08 17:55:15 +01:00
Sam
7623fceadf 3.0.4 2017-02-08 17:37:58 +01:00
Samuel Laulhau
375f40c710 Merge pull request #43 from freskimo/patch2
removed unused exposed port
2017-02-07 19:05:56 +01:00
Natvingerwerk
4ca9be0a6a removed unused exposed port 2017-02-07 16:03:22 +01:00
Samuel Laulhau
72c23cea15 Merge pull request #40 from freskimo/patch1
Removal .env file use docker env instead
2017-02-07 14:03:47 +01:00
Natvingerwerk
aec8f75414 fix: removed creation of .env file and set this via docker env vars + added doc 2017-02-07 13:02:33 +01:00
Samuel Laulhau
12f011d7ea Merge pull request #38 from cinemast/patch-3
Remove duplicate ENV variables
2017-02-04 11:13:48 +01:00
Peter Spiess-Knafl
1e6c272b04 Remove duplicate ENV variables
Since the variables are passed through an .env file they no longer need to passed directly, right?
2017-02-04 09:00:42 +01:00
Sam
771f647873 make cron work in example 2017-02-03 17:39:33 +01:00
Sam
7ce608aeff add phantomjs 2017-02-02 15:34:19 +01:00
Sam
77098587a3 3.0.3 2017-01-30 15:41:12 +01:00
Sam
706fb0fe2c 3.0.2 2017-01-25 09:04:52 +01:00
Sam
ee1f2f6e09 3.0.1 2017-01-24 18:45:36 +01:00
Sam
27bdd0ec1a 3.0.0 2017-01-24 09:00:36 +01:00
Sam
e53f60dad8 2.9.5 2017-01-14 11:33:39 +01:00
Sam
b0162488bd 2.9.4 2017-01-12 14:52:50 +01:00
Samuel Laulhau
7caf8c9ea8 use same env inside the app then in docker command 2017-01-11 10:09:55 +01:00
Samuel Laulhau
230856e526 Merge pull request #28 from cinemast/patch-1
Enable additional SMTP env variables
2017-01-11 10:03:34 +01:00
Sam
1e2bb5744f 2.9.3 2017-01-04 12:16:52 +01:00
Sam
54004f3038 2.9.2 2017-01-03 13:53:29 +01:00
Peter Spiess-Knafl
9e8717d6d8 Enable additional SMTP env variables 2017-01-02 14:07:58 +01:00
Sam
5ba03e8ccf 2.9.1 2016-12-20 18:31:51 +01:00
Samuel Laulhau
dd9fea1a33 Merge pull request #25 from cinemast/master
Use php7.0 instead of latest. (Closes #23)
2016-12-19 09:49:18 +01:00
Samuel Laulhau
4f79c894e6 2.9.0 2016-12-15 17:42:49 +01:00
Samuel Laulhau
5820915a50 2.9 2016-12-15 17:19:29 +01:00
Peter Spiess-Knafl
7c1a352676 Use php7.0 instead of latest. (Closes #23) 2016-12-09 13:40:07 +01:00
Samuel Laulhau
ce2dd38f9d 2.8.2 2016-11-30 10:33:00 +01:00
Samuel Laulhau
6c67e98f79 2.8.1 2016-11-18 09:57:56 +01:00
Sam
72ee5ef29e rename exemple folder #22 2016-11-07 21:07:59 +01:00
Samuel Laulhau
e81f46b9e0 2.8 2016-11-07 09:39:36 +01:00
Samuel Laulhau
bbf20d1390 typo 2016-10-12 11:16:26 -04:00
Samuel Laulhau
12a6120734 avoid seed temp fix for twice seeding 2016-10-05 15:55:47 +02:00
Samuel Laulhau
2b1923ea7f avoid seed temp fix for twice seeding 2016-10-05 12:51:50 +02:00
Sam
5c9495cabd typo 2016-09-29 08:34:00 +02:00
Sam
9b649269c7 docker compose v2 2016-09-29 08:29:34 +02:00
Sam
22ea880d1a seed only once 2016-09-29 08:07:07 +02:00
Sam
a1037c8459 add migration to entrypoint 2016-09-29 07:51:33 +02:00
Samuel Laulhau
64f7c71fde 2.7.2 2016-09-21 08:47:53 +02:00
Hillel Coren
9c57f7ac04 Merge pull request #17 from Cynomys/master
fixed ’README.md(cumpose=>compose)
2016-09-20 21:37:05 +03:00
Cynomys
5fea425fa9 fixed ’README.md(cumpose=>compose) 2016-09-20 10:18:19 -04:00
Sam
746df6f8a5 chown .env 2016-09-20 12:18:26 +02:00
Sam
f7d12106ec update readme 2016-09-20 12:06:33 +02:00
Sam
9e9f86b02f add cron service into docker-compose #16 2016-09-20 12:05:12 +02:00
Samuel Laulhau
f53573d200 2.7.1 2016-09-19 08:52:16 +02:00
Sam
cef311c024 chown www-data .env 2016-09-15 15:50:50 +02:00
Sam
ee81a9d181 chown .env 2016-09-15 15:35:32 +02:00
Samuel Laulhau
bd9e15fb3e 2.7 2016-09-12 14:55:22 +02:00
Samuel Laulhau
7b040d5343 2.6.11 2016-09-06 15:33:54 +02:00
Samuel Laulhau
f9c7390138 2.6.10 2016-08-14 16:15:56 +02:00
Samuel Laulhau
3b801b876c 2.6.8 2016-08-05 22:32:33 +02:00
Sam
56f713bcd3 add docker-compose to the repos 2016-07-31 21:38:03 +02:00
Sam
17344e3d47 add APP_CIPHER rijndael-128 in env 2016-07-31 21:37:48 +02:00
Sam
352059a10b 2.6.7 2016-07-28 11:55:36 +02:00
Sam
fec1d175f9 2.6.6 2016-07-27 16:21:10 +02:00
Sam
8a28648b90 2.6 2016-07-12 08:57:47 +02:00
Sam
96266d42c6 add note about peristent data 2016-06-06 09:30:30 +02:00
Sam
5533d5a58a Merge branch 'master' of github.com:invoiceninja/dockerfiles 2016-05-24 14:57:26 +02:00
Sam
c1ffc73205 version 2.5.2.2 2016-05-24 14:57:06 +02:00
Samuel Laulhau
951fc81b3e no debug by default
fix #7
2016-05-22 23:58:18 +02:00
50 changed files with 2436 additions and 176 deletions

24
.editorconfig Normal file
View File

@@ -0,0 +1,24 @@
# 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

58
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,58 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
<!--
*** Before creating an issue ***
*** Be sure the issue isn't yet reported here or dicussed on stackoverflow ***
-->
**Setup information**
<!-- Remove accordingly -->
docker run / docker-compose / Helm
**Describe the bug**
A clear and concise description of what the bug is.
**To reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots/logs**
If applicable, add screenshots to help explain your problem.
<!-- Did you check the logs? If any Error is present there please copy/paste it below -->
```
Any Error that sucks
```
**Docker/Kubernetes/Helm**:
- Output of `docker version`:
```
(paste your output here)
```
<!-- Additional info if using helm on k8s, add the info below -->
<!-- Delete this block if not applicable -->
- Output of `helm version`:
```
(paste your output here)
```
- Output of `kubectl version`:
```
(paste your output here)
```
<!-- End Additional info if using helm on k8s -->
**Additional context**
Add any other context about the problem here.

6
.github/ct-install.yaml vendored Normal file
View File

@@ -0,0 +1,6 @@
chart-dirs:
- charts
chart-repos:
- bitnami=https://charts.bitnami.com/bitnami
check-version-increment: true
debug: true

9
.github/ct-lint.yaml vendored Normal file
View File

@@ -0,0 +1,9 @@
chart-dirs:
- charts
chart-repos:
- bitnami=https://charts.bitnami.com/bitnami
check-version-increment: true
debug: false
validate-chart-schema: true
validate-maintainers: true
validate-yaml: true

77
.github/workflows/build_push.yml vendored Normal file
View File

@@ -0,0 +1,77 @@
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: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

98
.github/workflows/charts.yaml vendored Normal file
View File

@@ -0,0 +1,98 @@
name: Lint and Test Charts
on:
pull_request:
paths:
- "charts/**"
jobs:
lint-chart:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Fetch history
run: git fetch --prune --unshallow
- name: Set up Helm
uses: azure/setup-helm@v1
- uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.0.1
- name: Run chart-testing (list-changed)
id: list-changed
run: |
echo "::set-output name=changed::[\"$(ct list-changed --config .github/ct-lint.yaml)\"]"
- name: Parse list-changed
id: set-matrix
env:
CHANGED: ${{ steps.list-changed.outputs.changed }}
run: |
echo "::set-output name=matrix::$(echo "${CHANGED//\\n/\",\"}")"
- name: Run chart-testing (lint)
run: ct lint --config .github/ct-lint.yaml
kubeval-chart:
runs-on: ubuntu-latest
needs:
- lint-chart
strategy:
matrix:
chart: ${{ fromJson(needs.lint-chart.outputs.matrix) }}
k8s:
- v1.17.11
- v1.18.8
- v1.19.4
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Update Helm depdendencies
env:
CHART_DIR: ${{ matrix.chart }}
run: |
helm dependency update "${CHART_DIR}"
mkdir kubeval
helm template "${CHART_DIR}" > kubeval/combined.yaml
- name: Run kubeval
uses: instrumenta/kubeval-action@master
with:
files: kubeval
version: ${{ matrix.k8s }}
install-chart:
name: install-chart
runs-on: ubuntu-latest
needs:
- lint-chart
- kubeval-chart
strategy:
matrix:
k8s:
- v1.17.11
- v1.18.8
- v1.19.4
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Create kind ${{ matrix.k8s }} cluster
uses: helm/kind-action@v1.1.0
with:
node_image: kindest/node:${{ matrix.k8s }}
- name: Run chart-testing (install)
uses: helm/chart-testing-action@v2.0.1
with:
command: install
config: .github/ct-install.yaml

32
.github/workflows/release.yaml vendored Normal file
View File

@@ -0,0 +1,32 @@
name: Release Charts
on:
push:
branches:
- master
paths:
- "charts/**"
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- 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: Add Helm repos
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
- name: Run chart-releaser
uses: helm/chart-releaser-action@master
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

12
.gitignore vendored
View File

@@ -1 +1,11 @@
data
# OS files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
# Helm
charts/**/charts/

76
CODE_OF_CONDUCT.md Normal file
View File

@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at contact@invoiceninja.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq

View File

@@ -1,62 +0,0 @@
FROM php:fpm
MAINTAINER Samuel Laulhau <sam@lalop.co>
#####
# SYSTEM REQUIREMENT
#####
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libmcrypt-dev zlib1g-dev git libgmp-dev \
libfreetype6-dev libjpeg62-turbo-dev libpng12-dev \
&& ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/local/include/ \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-configure gmp \
&& docker-php-ext-install iconv mcrypt mbstring pdo pdo_mysql zip gd gmp \
&& rm -rf /var/lib/apt/lists/*
#####
# INSTALL COMPOSER
#####
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
#####
# DOWNLOAD AND INSTALL INVOICE NINJA
#####
ENV INVOICENINJA_VERSION 2.5.2.1
RUN curl -o invoiceninja.tar.gz -SL https://github.com/hillelcoren/invoice-ninja/archive/v${INVOICENINJA_VERSION}.tar.gz \
&& tar -xzf invoiceninja.tar.gz -C /var/www/ \
&& rm invoiceninja.tar.gz \
&& mv /var/www/invoiceninja-${INVOICENINJA_VERSION} /var/www/app \
&& chown -R www-data:www-data /var/www/app \
&& composer install --working-dir /var/www/app -o --no-dev --no-interaction --no-progress \
&& chown -R www-data:www-data /var/www/app/bootstrap/cache \
&& mv /var/www/app/storage /var/www/app/docker-backup-storage \
&& mv /var/www/app/public/logo /var/www/app/docker-backup-public-logo
######
# DEFAULT ENV
######
ENV DB_HOST mysql
ENV DB_DATABASE ninja
ENV APP_KEY SomeRandomString
ENV LOG errorlog
ENV APP_DEBUG 1
#use to be mounted into nginx for exemple
VOLUME /var/www/app/public
WORKDIR /var/www/app
EXPOSE 80
COPY app-entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["php-fpm"]

58
Makefile Normal file
View File

@@ -0,0 +1,58 @@
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

108
README.md
View File

@@ -1,29 +1,89 @@
DockerFile for invoice ninja (https://www.invoiceninja.com/)
![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)
This image is based on `php:7` official version.
# Docker for [Invoice Ninja](https://www.invoiceninja.com/)
The easiest way to try this image is via docker compose :
:crown: **Features**
:lock: Automatic HTTPS (:heart: [Caddy](https://caddyserver.com/))
:fire: NGINX webserver support [NGINX](https://nginx.org/)
:hammer: Fully production-ready through docker-compose
:pencil: Adjustable to your needs via environment variable
## You want some Kubernetes + Helm with that?
[Helm Chat](https://github.com/Saddamus/invoiceninja-helm) by @Saddamus
[Kubernetes](https://github.com/invoiceninja/dockerfiles/issues/94) by @spacepluk
## Quickstart V5 Launch
The dockerfile has been revamped to make is easier to get started, by default the base image selected in 5 which will pull in the latest v5 stable image.
```bash
git clone https://github.com/invoiceninja/dockerfiles.git
cd dockerfiles
```
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
```
db:
image: mysql
environment:
MYSQL_DATABASE: ninja
MYSQL_ROOT_PASSWORD: mdp
app:
image: invoiceninja/invoiceninja
links:
- db:mysql
web:
image: nginx
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
links:
- app
volumes_from:
- app
ports:
- 80
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
```
The ```APP_KEY``` can be generated by running
```
docker run --rm -it invoiceninja/invoiceninja php artisan key:generate --show
```
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.
From the terminal run
```sudo chown -R 1500:1500 docker/app```
## 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
```bash
git pull
```
You may need to manually merge any changes that cannot be merged automatically by git.
### Note for people running the container locally on their PC ###
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```
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 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```
## 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/)

73
alpine/4/Dockerfile Normal file
View File

@@ -0,0 +1,73 @@
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

@@ -0,0 +1,17 @@
; 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

@@ -0,0 +1,110 @@
#!/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

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

99
alpine/5/Dockerfile Normal file
View File

@@ -0,0 +1,99 @@
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
# 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

@@ -0,0 +1,42 @@
[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

@@ -0,0 +1,107 @@
#!/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"
# 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

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

View File

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

View File

@@ -0,0 +1,17 @@
; 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,39 +0,0 @@
#!/bin/bash
set -e
# if we're linked to MySQL, and we're using the root user, and our linked
# container has a default "root" password set up and passed through... :)
: ${DB_USERNAME:=root}
if [ "$DB_USERNAME" = 'root' ]; then
: ${DB_PASSWORD:=$MYSQL_ENV_MYSQL_ROOT_PASSWORD}
fi
echo "DB_USERNAME=$DB_USERNAME" >> .env
echo "DB_PASSWORD=$DB_PASSWORD" >> .env
if [ ! -d /var/www/app/storage ]; then
cp -Rp /var/www/app/docker-backup-storage /var/www/app/storage
else
IN_STORAGE_BACKUP="$(ls /var/www/app/docker-backup-storage/)"
for path in $IN_STORAGE_BACKUP; do
if [ ! -e "/var/www/app/storage/$path" ]; then
cp -Rp "/var/www/app/docker-backup-storage/$path" "/var/www/app/storage/"
fi
done
fi
if [ ! -d /var/www/app/public/logo ]; then
cp -Rp /var/www/app/docker-backup-public-logo /var/www/app/public/logo
else
IN_LOGO_BACKUP="$(ls /var/www/app/docker-backup-public-logo/)"
for path in $IN_LOGO_BACKUP; do
if [ ! -e "/var/www/app/public/logo/$path" ]; then
cp -Rp "/var/www/app/docker-backup-public-logo/$path" "/var/www/app/public/logo/"
fi
done
fi
chown www-data .env
exec "$@"

View File

@@ -0,0 +1,23 @@
# 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

@@ -0,0 +1,12 @@
dependencies:
- name: common
repository: https://charts.bitnami.com/bitnami
version: 1.4.1
- name: nginx
repository: https://charts.bitnami.com/bitnami
version: 8.8.0
- name: mariadb
repository: https://charts.bitnami.com/bitnami
version: 9.3.5
digest: sha256:d809702ee601a8a0019defb9ee3fc5a5b5332968e1038cca8b44d5332b14a275
generated: "2021-03-23T00:33:02.690189+08:00"

View File

@@ -0,0 +1,42 @@
apiVersion: v2
name: invoiceninja
description: A Helm chart to install Invoiceninja
# 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.1.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.30
keywords:
- invoiceninja
home: https://github.com/lwj5/invoiceninja-chart
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
maintainers:
- email: lwj5@hotmail.com
name: lwj5

View File

@@ -0,0 +1,195 @@
# Invoiceninja
This helm chart installs a Invoiceninja and its dependencies into a running
Kubernetes cluster.
The chart installs the [Invoiceninja](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
- 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 Invoiceninja 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 Invoiceninja chart and their default values.
### Global Configuration
The following table shows the configuration options for the Invoiceninja 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) |
### Invoiceninja parameters
| Parameter | Description | Default |
| -------------------- | --------------------------------------------------------------- | ------------------------------------------------------- |
| `image.registry` | Invoiceninja image registry | `docker.io` |
| `image.repository` | Invoiceninja image name | `invoiceninja/invoiceninja` |
| `image.tag` | Invoiceninja image tag | Check `values.yaml` file |
| `image.pullPolicy` | Invoiceninja 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 Invoiceninja pods | `default` |
| `debug` | Turn on debug mode on Invoiceninja | `false` |
| `appKey` | Laravel Application Key | _random 32 character alphanumeric string_ |
| `extraEnvVars` | Extra environment variables to be set on Invoiceninja container | `{}` |
| `extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars | `nil` |
| `extraEnvVarsSecret` | Name of existing Secret containing extra env vars | `nil` |
### Invoiceninja deployment parameters
| Parameter | Description | Default |
| --------------------------- | ----------------------------------------------------------------------------------------- | ------------------------------ |
| `replicaCount` | Number of Invoiceninja Pods to run | `1` |
| `containerPorts.fastcgi` | FastCGI port to expose at container level | `9000` |
| `podSecurityContext` | Invoiceninja pods' Security Context | Check `values.yaml` file |
| `containerSecurityContext` | Invoiceninja containers' Security Context | Check `values.yaml` file |
| `resources` | The resources for the Invoiceninja container | `{}` |
| `livenessProbe` | Liveness probe configuration for Invoiceninja | Check `values.yaml` file |
| `readinessProbe` | Readiness probe configuration for Invoiceninja | 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 Invoiceninja pods | `{}` |
| `podAnnotations` | Annotations for Invoiceninja pods | `{}` |
| `extraVolumeMounts` | Additional volume mounts | `[]` |
| `extraVolumes` | Additional volumes | `[]` |
### 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` | Invoiceninja 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 Invoiceninja 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 | `{}` |
### 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_ |
> See [Dependencies](#dependencies) for more.
### Other parameters
| Parameter | Description | Default |
| -------------------------- | --------------------------------------- | ------- |
| `autoscaling.enabled` | Enable autoscaling for Invoiceninja | `false` |
| `autoscaling.minReplicas` | Minimum number of Invoiceninja replicas | `1` |
| `autoscaling.maxReplicas` | Maximum number of Invoiceninja 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 replicaCount=3,livenessProbe.initialDelaySeconds=90 \
invoiceninja/invoiceninja
```
The above command sets the number of replicas to 4, and the liveness probe delay to 90 seconds.
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

@@ -0,0 +1,33 @@
** 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.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.names.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.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 "common.names.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "common.names.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "common.names.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl -n {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
{{- end }}

View File

@@ -0,0 +1,127 @@
{{/*
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 ) "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 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 -}}

View File

@@ -0,0 +1,21 @@
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:
APP_URL: "http://{{ include "common.names.fullname" . }}/"
APP_DEBUG: {{ .Values.debug | quote }}
MULTI_DB_ENABLED: "false"
DB_HOST1: {{ include "invoiceninja.databaseHost" . | quote }}
DB_PORT1: {{ include "invoiceninja.databasePort" . | quote }}
DB_USERNAME1: {{ include "invoiceninja.databaseUser" . | quote }}
DB_DATABASE1: {{ include "invoiceninja.databaseName" . | quote }}

View File

@@ -0,0 +1,138 @@
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 }}
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: IS_DOCKER
value: "true"
- name: DB_PASSWORD1
valueFrom:
secretKeyRef:
name: {{ include "invoiceninja.databaseSecretName" . }}
key: mariadb-password
{{- 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

@@ -0,0 +1,35 @@
{{- 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

@@ -0,0 +1,52 @@
{{- 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

@@ -0,0 +1,39 @@
{{- 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 }}
---
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

@@ -0,0 +1,47 @@
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

@@ -0,0 +1,20 @@
{{- 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

@@ -0,0 +1,409 @@
# 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
## Invoiceninja image version
## ref: https://github.com/invoiceninja/dockerfiles
##
image:
registry: docker.io
repository: invoiceninja/invoiceninja
tag: 5.1.31
## 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 Invoiceninja
##
debug: false
## A 32 character long Application Key
##
appKey: ""
## 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
## Number of replicas (requires ReadWriteMany PVC support)
##
replicaCount: 1
## Set up update strategy for Invoiceninja 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 Invoiceninja 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
## Invoiceninja 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
## Invoiceninja 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
## 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: localhost
## non-root Username for Invoiceninja 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 Invoiceninja
## ref: http://kubernetes.io/docs/user-guide/ingress/
##
ingress:
enabled: true
hostname: invoiceninja.local
## Configure the serverblock for Invoiceninja
## 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 Invoiceninja
## 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

6
config/caddy/Caddyfile Normal file
View File

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

3
config/cron/cronjob_v5.sh Executable file
View File

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

1
config/hosts Normal file
View File

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

10
config/mysql/Dockerfile Normal file
View File

@@ -0,0 +1,10 @@
FROM mysql:5
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

@@ -0,0 +1,28 @@
#!/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

@@ -0,0 +1,25 @@
server {
listen 80 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 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;
}
}

88
docker-compose.yml Normal file
View File

@@ -0,0 +1,88 @@
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
# For auto DB backups comment out image and use the build block below
# build:
# context: ./config/mysql
ports:
- "3305:3306"
restart: always
environment:
- MYSQL_ROOT_PASSWORD=ninjaAdm1nPassword
- MYSQL_USER=ninja
- MYSQL_PASSWORD=ninja
- MYSQL_DATABASE=ninja
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:

1
docker/app/public/.keep Normal file
View File

@@ -0,0 +1 @@

1
docker/app/storage/.keep Normal file
View File

@@ -0,0 +1 @@

22
env Normal file
View File

@@ -0,0 +1,22 @@
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
#this is a system variable please do not remove
IS_DOCKER=true
PHANTOMJS_PDF_GENERATION=false
#V4 env vars
DB_STRICT=false
DB_HOST=db
DB_DATABASE=ninja
DB_USERNAME=ninja
DB_PASSWORD=ninja
APP_CIPHER=AES-256-CBC

View File

@@ -0,0 +1,13 @@
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

@@ -0,0 +1,29 @@
[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

View File

@@ -1,50 +0,0 @@
user www-data;
events {
worker_connections 768;
}
http {
upstream backend {
server app:9000;
}
include /etc/nginx/mime.types;
default_type application/octet-stream;
gzip on;
gzip_disable "msie6";
server {
listen 80 default;
server_name your_ininja_site;
root /var/www/app/public;
index index.php;
charset utf-8;
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; }
sendfile off;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass backend;
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;
}
location ~ /\.ht {
deny all;
}
}
}