mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2025-12-31 19:47:25 +01:00
Compare commits
615 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
47e5c41a19 | ||
|
|
89a994b12f | ||
|
|
5984339118 | ||
|
|
47dba02b27 | ||
|
|
1aca36878c | ||
|
|
cf324703a8 | ||
|
|
df2ea66cda | ||
|
|
02eed022ac | ||
|
|
738546d7b1 | ||
|
|
e31a2b77bc | ||
|
|
50debff2da | ||
|
|
492d895d06 | ||
|
|
51294f6b76 | ||
|
|
81617a3dec | ||
|
|
a874ceb7c2 | ||
|
|
4a3d8783d4 | ||
|
|
84a6637f80 | ||
|
|
821f3f5ec7 | ||
|
|
dafd4051d3 | ||
|
|
c6b44487f3 | ||
|
|
b2e03ce544 | ||
|
|
78fd70118a | ||
|
|
59616eada8 | ||
|
|
0fab60378a | ||
|
|
47db01612d | ||
|
|
1a1cea632b | ||
|
|
5609b988f3 | ||
|
|
0f9d39998f | ||
|
|
fd01abb0a0 | ||
|
|
6887e2b30a | ||
|
|
6faf1dc135 | ||
|
|
d7cd59c80f | ||
|
|
8206377870 | ||
|
|
93214291c9 | ||
|
|
f3477e6e80 | ||
|
|
d766e8284c | ||
|
|
08e24b4b01 | ||
|
|
43cc7417ba | ||
|
|
150abf1d6e | ||
|
|
31b3d309b3 | ||
|
|
cb74a1f93b | ||
|
|
f566ec5715 | ||
|
|
91cc86af6d | ||
|
|
7bac478538 | ||
|
|
f93fa6b874 | ||
|
|
d9a40ebb43 | ||
|
|
db5d0ebf50 | ||
|
|
926b3d618b | ||
|
|
85d256a435 | ||
|
|
acf9c22ff7 | ||
|
|
b0ebac9719 | ||
|
|
65c5ceb69b | ||
|
|
6aa39b4b57 | ||
|
|
c4ac430d1b | ||
|
|
87066953d3 | ||
|
|
3969a37852 | ||
|
|
bec60de1e7 | ||
|
|
c0150debbf | ||
|
|
f45261617f | ||
|
|
21b6cf1f26 | ||
|
|
d3a4948641 | ||
|
|
a9a6b72c7a | ||
|
|
4fd6ca33c8 | ||
|
|
bca8404f5f | ||
|
|
3cf7c28875 | ||
|
|
96dee55e7f | ||
|
|
ae592a8407 | ||
|
|
b72757ead0 | ||
|
|
a20fc14683 | ||
|
|
0e2934d1e3 | ||
|
|
fefc51ccf1 | ||
|
|
acdd6851ff | ||
|
|
6ff8e04aa7 | ||
|
|
86f1dd43cf | ||
|
|
cc1f569324 | ||
|
|
c78f7a7bdf | ||
|
|
7198222787 | ||
|
|
4ef4531a4e | ||
|
|
c51d113abe | ||
|
|
dddd558873 | ||
|
|
5727550983 | ||
|
|
03536efb6a | ||
|
|
e5debf03d4 | ||
|
|
33a55e362b | ||
|
|
70e1de9a95 | ||
|
|
e1b113bba1 | ||
|
|
c967aaccf4 | ||
|
|
15aefa698b | ||
|
|
c9beedc84b | ||
|
|
d409d9696a | ||
|
|
7d977a41e3 | ||
|
|
8db5c792a8 | ||
|
|
b3768cbed3 | ||
|
|
25d2d1d271 | ||
|
|
abfb5d1338 | ||
|
|
300c2d236d | ||
|
|
56e451ea8b | ||
|
|
ad3ffc227d | ||
|
|
e64db79c75 | ||
|
|
5fcad81fc2 | ||
|
|
2e383ef879 | ||
|
|
bb6b3dc1e8 | ||
|
|
4a7b28f1d0 | ||
|
|
1699ddde65 | ||
|
|
63431878b8 | ||
|
|
03cc1ff548 | ||
|
|
4aa7a7032c | ||
|
|
4fa02c2785 | ||
|
|
d25210c8b9 | ||
|
|
f97fdda827 | ||
|
|
5188c45b41 | ||
|
|
e3873bcac2 | ||
|
|
24ef742ce1 | ||
|
|
886dfe7832 | ||
|
|
0054620e55 | ||
|
|
4b82f750fc | ||
|
|
97d339df4e | ||
|
|
906cfb0c87 | ||
|
|
62a7f6d7cf | ||
|
|
1d97234b51 | ||
|
|
aab280dcc1 | ||
|
|
faffcadc45 | ||
|
|
25b3654a53 | ||
|
|
46cd35bf32 | ||
|
|
53b4e6dafd | ||
|
|
27b6c82fe4 | ||
|
|
64fdd58ba9 | ||
|
|
85519a0038 | ||
|
|
5d5f34b7e7 | ||
|
|
774b8cb6eb | ||
|
|
76a0886278 | ||
|
|
2bac5707ae | ||
|
|
c17e37c4b8 | ||
|
|
08f9493f0d | ||
|
|
40f483a32d | ||
|
|
eb58c26ebf | ||
|
|
d50bfde676 | ||
|
|
c12e985f81 | ||
|
|
8ef0df3d41 | ||
|
|
f55e9a2b49 | ||
|
|
e3f47d2932 | ||
|
|
1636faf40d | ||
|
|
ea285c41ec | ||
|
|
1537b87a3d | ||
|
|
225c0eb275 | ||
|
|
34878d0f93 | ||
|
|
8b9e69d51b | ||
|
|
7238e521e6 | ||
|
|
5a1bf5c430 | ||
|
|
7a935a0eef | ||
|
|
ff897d568f | ||
|
|
b0bb0ffd25 | ||
|
|
3902b40bc1 | ||
|
|
29e2d93e59 | ||
|
|
b7aea66e62 | ||
|
|
e2db08f207 | ||
|
|
59291d8687 | ||
|
|
6f747207ec | ||
|
|
c2aabd14ac | ||
|
|
07f1e601ab | ||
|
|
13423d38c0 | ||
|
|
e34ac95617 | ||
|
|
6c68882449 | ||
|
|
8e9e7c47da | ||
|
|
7da83b40f4 | ||
|
|
1b48ab6983 | ||
|
|
14357b93a1 | ||
|
|
8a68fda3f3 | ||
|
|
4ee20766ef | ||
|
|
5ba28528c3 | ||
|
|
9388f66a29 | ||
|
|
b445cf0402 | ||
|
|
11c8901fe4 | ||
|
|
3814e957e0 | ||
|
|
62b1d8cb94 | ||
|
|
4cd773700e | ||
|
|
9f6e086633 | ||
|
|
8df49feaf8 | ||
|
|
de856d0a88 | ||
|
|
1f7458c9f7 | ||
|
|
40e3add863 | ||
|
|
f4f8c79ce7 | ||
|
|
524e79c486 | ||
|
|
4ec70c8da6 | ||
|
|
176e2c96d6 | ||
|
|
36db897022 | ||
|
|
022cf8c1e8 | ||
|
|
517ef61313 | ||
|
|
8e75344717 | ||
|
|
e19641f754 | ||
|
|
789e49fe1b | ||
|
|
d462cd64ed | ||
|
|
51629ef283 | ||
|
|
8d37d6a4c5 | ||
|
|
a604f4e8b6 | ||
|
|
18fb27ad9f | ||
|
|
ff1dfee088 | ||
|
|
f16815e960 | ||
|
|
c0350de418 | ||
|
|
f175fa4fb0 | ||
|
|
0d93596cde | ||
|
|
10aaf3fb6e | ||
|
|
8117d0c5bd | ||
|
|
fef92891cb | ||
|
|
7f415803fb | ||
|
|
1caa8c7e70 | ||
|
|
e35653fe59 | ||
|
|
4d7cc8e464 | ||
|
|
f42fc93aa5 | ||
|
|
c6e122b81f | ||
|
|
421a1f10e6 | ||
|
|
84db77cde8 | ||
|
|
e8706de11c | ||
|
|
f9f79ceb21 | ||
|
|
960a85d8a7 | ||
|
|
6cd85f48cd | ||
|
|
eca3af3da5 | ||
|
|
b141cfe449 | ||
|
|
3104ec0be9 | ||
|
|
acd778f815 | ||
|
|
0641860c3f | ||
|
|
f6564ffb14 | ||
|
|
d751217d9a | ||
|
|
9bd40b98df | ||
|
|
54f789d5a1 | ||
|
|
a6644abaa2 | ||
|
|
d42e333248 | ||
|
|
2e4ccb920b | ||
|
|
ebe353ca52 | ||
|
|
1af91f451d | ||
|
|
386f6ed8c1 | ||
|
|
73e88f6042 | ||
|
|
758709a796 | ||
|
|
a67de32b6e | ||
|
|
49d3e562de | ||
|
|
7d4afadbb5 | ||
|
|
3709355309 | ||
|
|
4b63e1f76d | ||
|
|
5118eac0ea | ||
|
|
486d38d6e1 | ||
|
|
89ae36315d | ||
|
|
0c3237d3b9 | ||
|
|
e29f786b34 | ||
|
|
bfc5625687 | ||
|
|
4b5abbbd5e | ||
|
|
a12f18836a | ||
|
|
d59d534ac5 | ||
|
|
35d9ee80b7 | ||
|
|
115b997cab | ||
|
|
8ca8e459be | ||
|
|
15625f41f9 | ||
|
|
9dc1fec1fb | ||
|
|
2342fd8cbb | ||
|
|
ae1f8fcecb | ||
|
|
6528ef7162 | ||
|
|
2f6b5ea55e | ||
|
|
7c1ef82a09 | ||
|
|
98846729e6 | ||
|
|
f03860d8ea | ||
|
|
c624f6ed40 | ||
|
|
c94145edca | ||
|
|
ff2c813355 | ||
|
|
e0cf941736 | ||
|
|
b1d65a8ac9 | ||
|
|
e6ad0c58ee | ||
|
|
11b99e7970 | ||
|
|
5fa605cba4 | ||
|
|
388f1a75b9 | ||
|
|
253c3339cf | ||
|
|
d67fa3059a | ||
|
|
98e41ad73b | ||
|
|
14c597312e | ||
|
|
af77440555 | ||
|
|
9377777f62 | ||
|
|
ac7c520620 | ||
|
|
1ae79cde4f | ||
|
|
a58b89c55d | ||
|
|
89e6cffa90 | ||
|
|
a82d60b4f5 | ||
|
|
32c93eb4d7 | ||
|
|
9e603ba79f | ||
|
|
d9889fcfaa | ||
|
|
a89e145bf9 | ||
|
|
85d46e8968 | ||
|
|
0fb5fa73e0 | ||
|
|
de3a2e4278 | ||
|
|
bb514e8d06 | ||
|
|
2034c6ebff | ||
|
|
65e36505a3 | ||
|
|
03c1e32123 | ||
|
|
3612c87323 | ||
|
|
4e9731a23e | ||
|
|
dea442c442 | ||
|
|
a24c1b98a3 | ||
|
|
1596478724 | ||
|
|
a240fd2977 | ||
|
|
7c1ef67755 | ||
|
|
bfc1d7add8 | ||
|
|
111f5a7e4e | ||
|
|
330f3e1c0e | ||
|
|
baeb925d87 | ||
|
|
079a05bbd8 | ||
|
|
8e995aa2ef | ||
|
|
dee4d0f27d | ||
|
|
60e5a68e01 | ||
|
|
67ad43d05d | ||
|
|
35beefba60 | ||
|
|
d1309cc86f | ||
|
|
a1d9220506 | ||
|
|
386359a346 | ||
|
|
b503418904 | ||
|
|
450eaf16e3 | ||
|
|
1f65c9f7f6 | ||
|
|
c02bf7bd03 | ||
|
|
4111fa87c9 | ||
|
|
0d5a7671ba | ||
|
|
7ea6e7c48e | ||
|
|
27e1788e91 | ||
|
|
d24a69ec39 | ||
|
|
8384175465 | ||
|
|
f8c442ec5f | ||
|
|
05f89f064e | ||
|
|
902745ec5a | ||
|
|
4efba38ce5 | ||
|
|
a184cf2844 | ||
|
|
94e8be57e5 | ||
|
|
385a434833 | ||
|
|
9ddeda4c32 | ||
|
|
805e526fc9 | ||
|
|
cdc35aff2f | ||
|
|
1de16ab390 | ||
|
|
b9ab50800d | ||
|
|
d2d03b9b18 | ||
|
|
ea0f3fa981 | ||
|
|
1d9a8681b2 | ||
|
|
f98b3915bd | ||
|
|
8762276c6f | ||
|
|
afcd9389ed | ||
|
|
591c799864 | ||
|
|
4c9c5ddd95 | ||
|
|
994d75a07e | ||
|
|
3348a2beb6 | ||
|
|
c30cae4a99 | ||
|
|
1ed95cdcec | ||
|
|
94126385e2 | ||
|
|
e64dd79cfc | ||
|
|
5942c1c362 | ||
|
|
78b5e59cd5 | ||
|
|
d1a8922f7d | ||
|
|
d87e5948bf | ||
|
|
f4cade9fac | ||
|
|
49f4266418 | ||
|
|
e7f6ef4c35 | ||
|
|
1af469cf04 | ||
|
|
2d934fd703 | ||
|
|
a7668325e8 | ||
|
|
7aef08794b | ||
|
|
001c922e45 | ||
|
|
85161446e9 | ||
|
|
14c0fd89eb | ||
|
|
7b08926961 | ||
|
|
a5e41d3072 | ||
|
|
72e07679eb | ||
|
|
6d65f5e114 | ||
|
|
61cef26f80 | ||
|
|
e2d6cbd853 | ||
|
|
21cc3ddf2c | ||
|
|
8245a57117 | ||
|
|
6b25f47ba1 | ||
|
|
1168dec11b | ||
|
|
f81e0c8f11 | ||
|
|
3e2d5a4f8c | ||
|
|
42e2c2234e | ||
|
|
4e05229fed | ||
|
|
c5fb1ab64b | ||
|
|
b190c8e633 | ||
|
|
4350619c64 | ||
|
|
a38b398d5d | ||
|
|
3f8fb906b5 | ||
|
|
8962e0d0b9 | ||
|
|
fc6923ad40 | ||
|
|
3b907d6093 | ||
|
|
431f11ccd4 | ||
|
|
2de45a45ab | ||
|
|
6037ebf2c2 | ||
|
|
685801983a | ||
|
|
f1a5f6fc7b | ||
|
|
6cbdec0686 | ||
|
|
4c855161f6 | ||
|
|
1447268f94 | ||
|
|
c0c13705ae | ||
|
|
11869a23a1 | ||
|
|
39bc2f0d89 | ||
|
|
0ff6e56ed8 | ||
|
|
ac5f1bfad5 | ||
|
|
fb064cb05e | ||
|
|
a84ec51b3f | ||
|
|
e2cafb8b72 | ||
|
|
672fc41611 | ||
|
|
eeffc2191c | ||
|
|
8a6622bbbb | ||
|
|
4f3f7ca8fe | ||
|
|
9e8db1b5bd | ||
|
|
6bcfd57208 | ||
|
|
db9e0f4309 | ||
|
|
cb91ba9973 | ||
|
|
9060027999 | ||
|
|
26c91935fc | ||
|
|
7c5275e766 | ||
|
|
482b30b677 | ||
|
|
7a45036c72 | ||
|
|
a963db2b63 | ||
|
|
26a71f7f1f | ||
|
|
af98f696b9 | ||
|
|
696d3b356a | ||
|
|
0ef00831f6 | ||
|
|
6ba1f11221 | ||
|
|
933748e15b | ||
|
|
03180fc65e | ||
|
|
e0fcb50ecb | ||
|
|
5c418c474e | ||
|
|
5e59ec10e3 | ||
|
|
6b0182e712 | ||
|
|
961282a90e | ||
|
|
3a17d81cab | ||
|
|
a3bb9b9681 | ||
|
|
766b604971 | ||
|
|
005e1b9dfe | ||
|
|
8d0a39ac71 | ||
|
|
6e12296f25 | ||
|
|
dbac9305c9 | ||
|
|
3c96683d46 | ||
|
|
279a282d44 | ||
|
|
e0332086d4 | ||
|
|
63ffa18860 | ||
|
|
960c3172e9 | ||
|
|
43ff450c2d | ||
|
|
aaa6118286 | ||
|
|
1ab7bc02d6 | ||
|
|
9625d9d9d0 | ||
|
|
3bd5324136 | ||
|
|
e28c8dc07b | ||
|
|
4ab4039887 | ||
|
|
650851811a | ||
|
|
72762dc964 | ||
|
|
dc66ca0544 | ||
|
|
52992d622b | ||
|
|
9dcf825f85 | ||
|
|
350a9fad35 | ||
|
|
d8ca192f8e | ||
|
|
b6d213682d | ||
|
|
0d88a6268f | ||
|
|
c641680309 | ||
|
|
47116c7d78 | ||
|
|
41544ec1e0 | ||
|
|
f3b5a62d36 | ||
|
|
69d2f54b03 | ||
|
|
5a1c1c16d7 | ||
|
|
3ade74efc9 | ||
|
|
dc00f6a604 | ||
|
|
3ef75b29ff | ||
|
|
e6df981f06 | ||
|
|
27bdb5d95b | ||
|
|
206fe5db2d | ||
|
|
4e5022fcc4 | ||
|
|
ded7e32051 | ||
|
|
d2ae9b365b | ||
|
|
612645fad2 | ||
|
|
192f6d7648 | ||
|
|
083fe9648e | ||
|
|
6ad5e6ec48 | ||
|
|
13487557e6 | ||
|
|
16f77b069e | ||
|
|
58c4eb66d4 | ||
|
|
d044303647 | ||
|
|
09b5b84750 | ||
|
|
2932f92f4c | ||
|
|
3ad282ac29 | ||
|
|
507451d7ca | ||
|
|
2d563e4b73 | ||
|
|
991b22e121 | ||
|
|
c4e8f3ea0b | ||
|
|
ee272cd52f | ||
|
|
a60567ae16 | ||
|
|
d81542e536 | ||
|
|
19333d150a | ||
|
|
ad1c976a31 | ||
|
|
bd7153a0b7 | ||
|
|
c1fde99ad4 | ||
|
|
c7d901f8c3 | ||
|
|
e432564e48 | ||
|
|
2d42e33da0 | ||
|
|
00ae03ce24 | ||
|
|
5f4e58ba77 | ||
|
|
b822d9d53a | ||
|
|
8a935f042e | ||
|
|
ddb96915cf | ||
|
|
c90e0dd42b | ||
|
|
5d2760a47a | ||
|
|
e0f46d2034 | ||
|
|
ce4cf2118b | ||
|
|
17759c3df7 | ||
|
|
c97fd64020 | ||
|
|
467960061b | ||
|
|
2dfa7e1edd | ||
|
|
475b3e7121 | ||
|
|
7c40a5a813 | ||
|
|
b92c8d928e | ||
|
|
0ed2a1cf4c | ||
|
|
43bb842598 | ||
|
|
8c1c2488bd | ||
|
|
baf2459f72 | ||
|
|
89ad8ad2bf | ||
|
|
d80a0fa212 | ||
|
|
bce728b558 | ||
|
|
23a8241d13 | ||
|
|
302da0c895 | ||
|
|
81075f2595 | ||
|
|
fae767223f | ||
|
|
a896a49e48 | ||
|
|
4d00017b2a | ||
|
|
9601557224 | ||
|
|
5b1bb1f277 | ||
|
|
2208768dfe | ||
|
|
5690f782b8 | ||
|
|
61cd833979 | ||
|
|
546ee0b139 | ||
|
|
cde6e6ecd1 | ||
|
|
c07242eb1c | ||
|
|
c27b04b63a | ||
|
|
540d3180f1 | ||
|
|
f3811ef09b | ||
|
|
0f114b8827 | ||
|
|
bbc3e5303b | ||
|
|
554233c9ea | ||
|
|
7623fceadf | ||
|
|
375f40c710 | ||
|
|
4ca9be0a6a | ||
|
|
72c23cea15 | ||
|
|
aec8f75414 | ||
|
|
12f011d7ea | ||
|
|
1e6c272b04 | ||
|
|
771f647873 | ||
|
|
7ce608aeff | ||
|
|
77098587a3 | ||
|
|
706fb0fe2c | ||
|
|
ee1f2f6e09 | ||
|
|
27bdd0ec1a | ||
|
|
e53f60dad8 | ||
|
|
b0162488bd | ||
|
|
7caf8c9ea8 | ||
|
|
230856e526 | ||
|
|
1e2bb5744f | ||
|
|
54004f3038 | ||
|
|
9e8717d6d8 | ||
|
|
5ba03e8ccf | ||
|
|
dd9fea1a33 | ||
|
|
4f79c894e6 | ||
|
|
5820915a50 | ||
|
|
7c1a352676 | ||
|
|
ce2dd38f9d | ||
|
|
6c67e98f79 | ||
|
|
72ee5ef29e | ||
|
|
e81f46b9e0 | ||
|
|
bbf20d1390 | ||
|
|
12a6120734 | ||
|
|
2b1923ea7f | ||
|
|
5c9495cabd | ||
|
|
9b649269c7 | ||
|
|
22ea880d1a | ||
|
|
a1037c8459 | ||
|
|
64f7c71fde | ||
|
|
9c57f7ac04 | ||
|
|
5fea425fa9 | ||
|
|
746df6f8a5 | ||
|
|
f7d12106ec | ||
|
|
9e9f86b02f | ||
|
|
f53573d200 | ||
|
|
cef311c024 | ||
|
|
ee81a9d181 | ||
|
|
bd9e15fb3e | ||
|
|
7b040d5343 | ||
|
|
f9c7390138 | ||
|
|
3b801b876c | ||
|
|
56f713bcd3 | ||
|
|
17344e3d47 | ||
|
|
352059a10b | ||
|
|
fec1d175f9 | ||
|
|
8a28648b90 | ||
|
|
96266d42c6 | ||
|
|
5533d5a58a | ||
|
|
c1ffc73205 | ||
|
|
951fc81b3e | ||
|
|
63aff31222 | ||
|
|
af26a7e26c | ||
|
|
16c6e0b80b | ||
|
|
4da0796c49 | ||
|
|
28ff00d785 | ||
|
|
0ca7f61b17 | ||
|
|
d0f7f6e2f8 | ||
|
|
35067a0fd8 | ||
|
|
0cd0c4a682 | ||
|
|
157dbf5bfc | ||
|
|
6d227da89c | ||
|
|
e90c73f836 | ||
|
|
591707f27f | ||
|
|
daec9ecf7b | ||
|
|
faa178a6ad | ||
|
|
d93b57181f | ||
|
|
8bbe0d578b | ||
|
|
8a223957b4 | ||
|
|
701d9602c6 | ||
|
|
76b67d50e0 | ||
|
|
af82d26aed | ||
|
|
755af2704f |
24
.editorconfig
Normal file
24
.editorconfig
Normal 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
58
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal 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
6
.github/ct-install.yaml
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
chart-dirs:
|
||||
- charts
|
||||
chart-repos:
|
||||
- bitnami=https://charts.bitnami.com/bitnami
|
||||
check-version-increment: true
|
||||
debug: false
|
||||
9
.github/ct-lint.yaml
vendored
Normal file
9
.github/ct-lint.yaml
vendored
Normal 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
|
||||
57
.github/workflows/build-image-v4.yaml
vendored
Normal file
57
.github/workflows/build-image-v4.yaml
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
name: Build Container Image v4
|
||||
|
||||
# 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:
|
||||
pull_request:
|
||||
paths:
|
||||
- "alpine/4/**"
|
||||
push:
|
||||
paths:
|
||||
- "alpine/4/**"
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- 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-4-${{ hashFiles('alpine/5/cache_buster') }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-4-${{ hashFiles('alpine/5/cache_buster') }}-
|
||||
|
||||
- name: Build
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
builder: ${{ steps.buildx.outputs.name }}
|
||||
context: ./alpine/4/
|
||||
build-args: INVOICENINJA_VERSION=4.5.42
|
||||
target: prod
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: invoiceninja/invoiceninja:cache
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache-new
|
||||
|
||||
- name: Move cache
|
||||
run: |
|
||||
rm -rf /tmp/.buildx-cache
|
||||
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
|
||||
57
.github/workflows/build-image-v5.yaml
vendored
Normal file
57
.github/workflows/build-image-v5.yaml
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
name: Build Container Image
|
||||
|
||||
# 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:
|
||||
pull_request:
|
||||
paths:
|
||||
- "alpine/5/**"
|
||||
push:
|
||||
paths:
|
||||
- "alpine/5/**"
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- 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-5-${{ hashFiles('alpine/5/cache_buster') }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-5-${{ hashFiles('alpine/5/cache_buster') }}-
|
||||
|
||||
- name: Build
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
builder: ${{ steps.buildx.outputs.name }}
|
||||
context: ./alpine/5/
|
||||
build-args: INVOICENINJA_VERSION=5-develop
|
||||
target: prod
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: invoiceninja/invoiceninja:cache
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache-new
|
||||
|
||||
- name: Move cache
|
||||
run: |
|
||||
rm -rf /tmp/.buildx-cache
|
||||
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
|
||||
82
.github/workflows/publish-image.yaml
vendored
Normal file
82
.github/workflows/publish-image.yaml
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
name: Publish Container Image
|
||||
|
||||
# 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-${{ steps.prep.outputs.major }}-${{ hashFiles('alpine/${{ steps.prep.outputs.major }}/cache_buster') }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-${{ steps.prep.outputs.major }}-${{ hashFiles('alpine/${{ steps.prep.outputs.major }}/cache_buster') }}-
|
||||
|
||||
- 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-new
|
||||
|
||||
- name: Move cache
|
||||
run: |
|
||||
rm -rf /tmp/.buildx-cache
|
||||
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
|
||||
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
34
.github/workflows/release-chart.yaml
vendored
Normal file
34
.github/workflows/release-chart.yaml
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
name: Release Charts
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- "charts/**"
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Configure Git
|
||||
run: |
|
||||
git config user.name "$GITHUB_ACTOR"
|
||||
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
|
||||
|
||||
- name: Set up Helm
|
||||
uses: azure/setup-helm@v3
|
||||
|
||||
- name: Add Helm repos
|
||||
run: |
|
||||
helm repo add bitnami https://charts.bitnami.com/bitnami
|
||||
|
||||
- name: Run chart-releaser
|
||||
uses: helm/chart-releaser-action@v1.4.1
|
||||
env:
|
||||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||
111
.github/workflows/test-charts.yaml
vendored
Normal file
111
.github/workflows/test-charts.yaml
vendored
Normal file
@@ -0,0 +1,111 @@
|
||||
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
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Helm
|
||||
uses: azure/setup-helm@v3
|
||||
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.9"
|
||||
check-latest: true
|
||||
|
||||
- name: Set up chart-testing
|
||||
uses: helm/chart-testing-action@v2.3.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
|
||||
|
||||
kubeconform-chart:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- lint-chart
|
||||
strategy:
|
||||
matrix:
|
||||
chart: ${{ fromJson(needs.lint-chart.outputs.matrix) }}
|
||||
k8s:
|
||||
- "1.25.5"
|
||||
- "1.24.9"
|
||||
- "1.23.15"
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Update Helm depdendencies
|
||||
env:
|
||||
CHART_DIR: ${{ matrix.chart }}
|
||||
run: |
|
||||
helm dependency update "${CHART_DIR}"
|
||||
mkdir tmp
|
||||
helm template "${CHART_DIR}" > tmp/combined.yaml
|
||||
|
||||
- uses: yokawasa/action-setup-kube-tools@v0.9.2
|
||||
with:
|
||||
setup-tools: |
|
||||
kubeconform
|
||||
|
||||
- name: Run kubeconform
|
||||
if: ${{ matrix.k8s }}
|
||||
run: kubeconform -kubernetes-version ${{ matrix.k8s }} tmp/combined.yaml
|
||||
|
||||
install-chart:
|
||||
name: install-chart
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- lint-chart
|
||||
- kubeconform-chart
|
||||
strategy:
|
||||
matrix:
|
||||
k8s:
|
||||
- v1.25.3
|
||||
- v1.24.7
|
||||
- v1.23.13
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Create kind ${{ matrix.k8s }} cluster
|
||||
uses: helm/kind-action@v1.4.0
|
||||
with:
|
||||
node_image: kindest/node:${{ matrix.k8s }}
|
||||
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.9"
|
||||
check-latest: true
|
||||
|
||||
- name: Set up chart-testing
|
||||
uses: helm/chart-testing-action@v2.3.1
|
||||
|
||||
- name: Run chart-testing (install)
|
||||
run: ct install --config .github/ct-install.yaml
|
||||
15
.gitignore
vendored
15
.gitignore
vendored
@@ -1 +1,14 @@
|
||||
data
|
||||
# OS files
|
||||
.DS_Store
|
||||
.DS_Store?
|
||||
._*
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
ehthumbs.db
|
||||
Thumbs.db
|
||||
|
||||
# Helm
|
||||
charts/**/charts/
|
||||
|
||||
# Compose filesystem
|
||||
/docker
|
||||
|
||||
76
CODE_OF_CONDUCT.md
Normal file
76
CODE_OF_CONDUCT.md
Normal 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
|
||||
54
Dockerfile
54
Dockerfile
@@ -1,54 +0,0 @@
|
||||
FROM php:fpm
|
||||
|
||||
#####
|
||||
# SYSTEM REQUIREMENT
|
||||
#####
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y libmcrypt-dev zlib1g-dev git\
|
||||
&& docker-php-ext-install iconv mcrypt mbstring pdo pdo_mysql zip \
|
||||
&& 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 NONJA
|
||||
#####
|
||||
|
||||
ENV INVOICENINJA_VERSION 2.4.4
|
||||
#ENV INVOICENINJA_SHA1 3e9b63c1681b6923dc1a24399411c1abde6ef5ea
|
||||
|
||||
RUN curl -o invoiceninja.tar.gz -SL https://github.com/hillelcoren/invoice-ninja/archive/v${INVOICENINJA_VERSION}.tar.gz \
|
||||
# && echo "$INVOICENINJA_SHA1 *invoiceninja.tar.gz" | sha1sum -c - \
|
||||
&& 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
|
||||
|
||||
|
||||
######
|
||||
# DEFAULT ENV
|
||||
######
|
||||
ENV DB_HOST mysql
|
||||
ENV DB_DATABASE ninja
|
||||
ENV APP_KEY SomeRandomString
|
||||
ENV LOG errorlog
|
||||
ENV APP_DEBUG 0
|
||||
|
||||
|
||||
#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
58
Makefile
Normal 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:
|
||||
# - :4
|
||||
# - :<RELEASE VERSION>
|
||||
.PHONY: build-alpine
|
||||
build-alpine:
|
||||
ifeq ($(IS_V5),)
|
||||
$(info Make: Building "$(VERSION)" tagged images from alpine.)
|
||||
@docker build -t ${HUB_NAMESPACE}/${IMAGE}:${VERSION} --build-arg INVOICENINJA_VERSION=${VERSION} ./alpine/4/
|
||||
# Tag as 4
|
||||
@docker tag ${HUB_NAMESPACE}/${IMAGE}:alpine-${VERSION} ${HUB_NAMESPACE}/${IMAGE}: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}:${VERSION}
|
||||
@docker push ${HUB_NAMESPACE}/${IMAGE}: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
108
README.md
@@ -1,3 +1,107 @@
|
||||
DockerFile for invoice ninja (https://www.invoiceninja.com/)
|
||||

|
||||
[](https://hub.docker.com/r/invoiceninja/invoiceninja)
|
||||
[](https://hub.docker.com/r/invoiceninja/invoiceninja)
|
||||
[](https://artifacthub.io/packages/search?repo=invoiceninja)
|
||||
[](https://github.com/invoiceninja/dockerfiles/actions/workflows/publish-image.yaml) [](https://github.com/invoiceninja/dockerfiles/actions/workflows/build-image-v5.yaml)
|
||||
|
||||
To test Invoice Ninja you can copy docker-compose.yml, remove the volume linked which can cause some troubles if you use docker on Mac, and run it.
|
||||
# Docker for [Invoice Ninja](https://www.invoiceninja.com/)
|
||||
|
||||
:crown: **Features**
|
||||
|
||||
:lock: Automatic HTTPS (:heart: [Caddy](https://caddyserver.com/))
|
||||
:fire: NGINX webserver support [NGINX](https://nginx.org/)
|
||||
:hammer: Fully production-ready through Helm Chart
|
||||
:pencil: Adjustable to your needs via environment variable
|
||||
|
||||
## Get some Kubernetes + Helm with that!
|
||||
|
||||
Introducing our very own [Helm Chart](https://github.com/invoiceninja/dockerfiles/tree/master/charts/invoiceninja) that helps you launch a simple standalone app to a production-ready, highly available Invoice Ninja setup. All you need to do is initialise Kubernetes (available with Docker Desktop), install [Helm](https://helm.sh/docs/intro/install/), and spin up Invoice Ninja using the steps provided [here](https://github.com/invoiceninja/dockerfiles/tree/master/charts/invoiceninja#installing-the-chart).
|
||||
|
||||
Other resources:
|
||||
|
||||
[Helm Chart](https://github.com/Saddamus/invoiceninja-helm) by @Saddamus
|
||||
[K8s Manifest](https://github.com/invoiceninja/dockerfiles/issues/94) by @spacepluk
|
||||
[You Tube installation video by DBTech](https://www.youtube.com/watch?v=xo6a3KtLC2g&ab_channel=DBTech)
|
||||
|
||||
## Alternatively get started with Docker Compose
|
||||
|
||||
The dockerfile has been revamped to make it easier to get started, by default the base image selected is 5 which will pull in the latest v5 stable image.
|
||||
|
||||
```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`, `APP_KEY` and update the rest of the variables as required.
|
||||
|
||||
```
|
||||
APP_URL=http://in.localhost:8003/
|
||||
APP_KEY=<insert your generated key in here>
|
||||
APP_DEBUG=true
|
||||
REQUIRE_HTTPS=false
|
||||
IN_USER_EMAIL=
|
||||
IN_PASSWORD=
|
||||
```
|
||||
|
||||
If `IN_USER_EMAIL` and `IN_PASSWORD` is not set the default user email and password is "admin@example.com" and "changeme!" respectively. You will use this for the initial login, thereafter, you can delete this two environment variables.
|
||||
|
||||
The `APP_KEY` can be generated by running
|
||||
|
||||
```bash
|
||||
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
|
||||
|
||||
```bash
|
||||
chmod 755 docker/app/public
|
||||
sudo chown -R 1500:1500 docker/app
|
||||
```
|
||||
|
||||
### 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 for PDF generation using local host, your domain name MUST end in .test for your PDFs to generate correctly, this is a DNS resolver issue with chromium.
|
||||
|
||||
All that is left to do now is bring up the container
|
||||
|
||||
|
||||
``` docker-compose up -d```
|
||||
|
||||
|
||||
**Note: When performing the setup, the Database host is ```db```
|
||||
|
||||
### Running on ARM64 (Raspberry Pi 4)
|
||||
|
||||
When deploying on an ARM64 system, you need to comment out the `image: mysql:8` line and uncomment `image: mariadb:10.4` in the `docker-compose.yml` file.
|
||||
|
||||
### Updating the Image when using `docker-compose`
|
||||
|
||||
As `docker-compose` does not support any form of version control, this git provide updates to `docker-compose.yml` directly.
|
||||
|
||||
To upgrade to a newer release image, please make sure to update the `docker-compose.yml` first by running
|
||||
|
||||
```bash
|
||||
git pull
|
||||
```
|
||||
|
||||
It is recommended to perform a backup before.
|
||||
You may need to manually merge any changes that cannot be merged automatically by git.
|
||||
|
||||
### Thanks
|
||||
Massive thank you to [lwj5](https://github.com/lwj5) for the tireless work to continually improve the dockerfile and its associated tooling.
|
||||
|
||||
|
||||
## 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
73
alpine/4/Dockerfile
Normal file
@@ -0,0 +1,73 @@
|
||||
ARG PHP_VERSION=7.3
|
||||
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"]
|
||||
1
alpine/4/cache_buster
Normal file
1
alpine/4/cache_buster
Normal file
@@ -0,0 +1 @@
|
||||
Fri Jul 2 7:33:22 +00 2021
|
||||
17
alpine/4/rootfs/etc/php/conf.d/in-php.ini
Normal file
17
alpine/4/rootfs/etc/php/conf.d/in-php.ini
Normal 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
|
||||
110
alpine/4/rootfs/usr/local/bin/docker-entrypoint
Executable file
110
alpine/4/rootfs/usr/local/bin/docker-entrypoint
Executable 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":"$INVOICENINJA_USER" /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 "$@"
|
||||
5
alpine/4/rootfs/usr/local/bin/laravel-init.sh
Executable file
5
alpine/4/rootfs/usr/local/bin/laravel-init.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
php artisan config:cache
|
||||
php artisan optimize
|
||||
php artisan migrate --force
|
||||
118
alpine/5/Dockerfile
Normal file
118
alpine/5/Dockerfile
Normal file
@@ -0,0 +1,118 @@
|
||||
ARG PHP_VERSION=8.2
|
||||
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 nodebuild
|
||||
|
||||
# Download Invoice Ninja
|
||||
ARG INVOICENINJA_VERSION
|
||||
ARG REPOSITORY=invoiceninja/invoiceninja
|
||||
ARG FILENAME=react-invoiceninja.tar
|
||||
|
||||
RUN set -eux; apk add curl unzip grep
|
||||
|
||||
RUN DOWNLOAD_URL=$(curl -s "https://api.github.com/repos/invoiceninja/invoiceninja/releases/latest" | grep -o '"browser_download_url": "[^"]*react-invoiceninja.tar"' | cut -d '"' -f 4) && \
|
||||
curl -LJO "$DOWNLOAD_URL" && \
|
||||
mv react-invoiceninja.tar /tmp/ninja.tar
|
||||
|
||||
# Extract Invoice Ninja
|
||||
RUN mkdir -p /var/www/app \
|
||||
&& tar -xvf /tmp/ninja.tar -C /var/www/app/ \
|
||||
&& mkdir -p /var/www/app/public/logo /var/www/app/storage
|
||||
|
||||
WORKDIR /var/www/app
|
||||
|
||||
# Prepare php image
|
||||
FROM php:${PHP_VERSION}-fpm-alpine as phpbuild
|
||||
|
||||
LABEL maintainer="David Bomba <turbo124@gmail.com>"
|
||||
|
||||
# Adding caching_sha2_password.so
|
||||
# With this we get native support for caching_sha2_password
|
||||
RUN apk add --no-cache mariadb-connector-c
|
||||
|
||||
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/
|
||||
|
||||
# Install chromium
|
||||
RUN set -eux; \
|
||||
apk add --no-cache \
|
||||
font-isas-misc \
|
||||
supervisor \
|
||||
mysql-client \
|
||||
chromium \
|
||||
ttf-freefont \
|
||||
ttf-dejavu
|
||||
|
||||
RUN install-php-extensions \
|
||||
bcmath \
|
||||
exif \
|
||||
gd \
|
||||
gmp \
|
||||
mysqli \
|
||||
opcache \
|
||||
pdo_mysql \
|
||||
zip \
|
||||
@composer \
|
||||
&& rm /usr/local/bin/install-php-extensions
|
||||
|
||||
# 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"
|
||||
|
||||
WORKDIR /var/www/app
|
||||
|
||||
# Set up app
|
||||
ARG INVOICENINJA_VERSION
|
||||
ARG BAK_STORAGE_PATH
|
||||
ARG BAK_PUBLIC_PATH
|
||||
ENV INVOICENINJA_VERSION $INVOICENINJA_VERSION
|
||||
ENV BAK_STORAGE_PATH $BAK_STORAGE_PATH
|
||||
ENV BAK_PUBLIC_PATH $BAK_PUBLIC_PATH
|
||||
COPY --from=nodebuild --chown=$INVOICENINJA_USER:$INVOICENINJA_USER /var/www/app /var/www/app
|
||||
|
||||
RUN rm -rf /var/www/app/ui
|
||||
|
||||
USER $UID
|
||||
WORKDIR /var/www/app
|
||||
|
||||
# Do not remove this ENV
|
||||
ENV IS_DOCKER true
|
||||
FROM --platform=$BUILDPLATFORM nodebuild AS dependencybuild
|
||||
|
||||
WORKDIR /var/www/app
|
||||
COPY --from=phpbuild /var/www/app /var/www/app
|
||||
|
||||
# # Install node packages
|
||||
ARG BAK_STORAGE_PATH
|
||||
ARG BAK_PUBLIC_PATH
|
||||
|
||||
RUN mv /var/www/app/storage $BAK_STORAGE_PATH \
|
||||
&& mv /var/www/app/public $BAK_PUBLIC_PATH
|
||||
|
||||
FROM phpbuild as prod
|
||||
|
||||
COPY --from=dependencybuild --chown=$INVOICENINJA_USER:$INVOICENINJA_USER /var/www/app /var/www/app
|
||||
|
||||
# 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"]
|
||||
1
alpine/5/cache_buster
Normal file
1
alpine/5/cache_buster
Normal file
@@ -0,0 +1 @@
|
||||
Fri Jul 4 7:33:22 +00 2023
|
||||
14
alpine/5/rootfs/docker-entrypoint-init.d/10-init-in.sh
Executable file
14
alpine/5/rootfs/docker-entrypoint-init.d/10-init-in.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
php artisan db:seed --force
|
||||
|
||||
# Build up array of arguments...
|
||||
if [[ ! -z "${IN_USER_EMAIL}" ]]; then
|
||||
email="--email ${IN_USER_EMAIL}"
|
||||
fi
|
||||
|
||||
if [[ ! -z "${IN_PASSWORD}" ]]; then
|
||||
password="--password ${IN_PASSWORD}"
|
||||
fi
|
||||
|
||||
php artisan ninja:create-account $email $password
|
||||
42
alpine/5/rootfs/etc/supervisord.conf
Normal file
42
alpine/5/rootfs/etc/supervisord.conf
Normal 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
|
||||
113
alpine/5/rootfs/usr/local/bin/docker-entrypoint
Executable file
113
alpine/5/rootfs/usr/local/bin/docker-entrypoint
Executable file
@@ -0,0 +1,113 @@
|
||||
#!/usr/bin/env sh
|
||||
set -e
|
||||
|
||||
# logging functions
|
||||
in_log() {
|
||||
local type="$1"
|
||||
shift
|
||||
printf '%s [%s] [Entrypoint]: %s\n' "$(date -u '+%Y-%m-%dT%H:%M:%SZ')" "$type" "$*"
|
||||
}
|
||||
|
||||
in_error() {
|
||||
in_log ERROR "$@" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Indirect expansion (ie) is not supported in bourne shell. That's why we are using this "magic" here.
|
||||
ie_gv() {
|
||||
eval "echo \$$1"
|
||||
}
|
||||
|
||||
# usage: file_env VAR [DEFAULT]
|
||||
# ie: file_env 'XYZ_DB_PASSWORD' 'example'
|
||||
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
|
||||
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
|
||||
file_env() {
|
||||
local var="$1"
|
||||
local fileVar="${var}_FILE"
|
||||
local def="${2:-}"
|
||||
|
||||
if [ "$(ie_gv ${var})" != "" ]; then
|
||||
if [ "$(ie_gv ${fileVar})" != "" ]; then
|
||||
in_error "Both $var and $fileVar are set (but are exclusive)"
|
||||
fi
|
||||
unset "$fileVar"
|
||||
return
|
||||
fi
|
||||
|
||||
if [ "$(ie_gv ${fileVar})" != "" ] && [ -f "$(ie_gv ${fileVar})" ]; then
|
||||
export "$var"="$(cat $(ie_gv ${fileVar}))"
|
||||
elif [ ! -z "$def" ]; then
|
||||
export "$var"="$def"
|
||||
fi
|
||||
|
||||
unset "$fileVar"
|
||||
}
|
||||
|
||||
# first arg is `-f` or `--some-option`
|
||||
if [ "${1#-}" != "$1" ]; then
|
||||
set -- supervisord "$@"
|
||||
fi
|
||||
|
||||
# create storage volume
|
||||
if [ -d "$BAK_STORAGE_PATH" ]; then
|
||||
if [ ! -d /var/www/app/storage ]; then
|
||||
mv "$BAK_STORAGE_PATH" /var/www/app/storage
|
||||
else
|
||||
# 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"
|
||||
fi
|
||||
|
||||
# create public volume
|
||||
if [ -d "$BAK_PUBLIC_PATH" ]; then
|
||||
if [ ! -d /var/www/app/public ]; then
|
||||
mv "$BAK_PUBLIC_PATH" /var/www/app/public
|
||||
elif [ ! -f /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"
|
||||
fi
|
||||
|
||||
# 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 IN/Laravel stuff
|
||||
if [[ "$1" == "supervisord" ]] || [[ "$1" == "php-fpm" ]]; then
|
||||
in_log INFO "Initialising Invoice Ninja..."
|
||||
. invoiceninja-init.sh
|
||||
fi
|
||||
|
||||
exec docker-php-entrypoint "$@"
|
||||
45
alpine/5/rootfs/usr/local/bin/invoiceninja-init.sh
Executable file
45
alpine/5/rootfs/usr/local/bin/invoiceninja-init.sh
Executable file
@@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
|
||||
# usage: docker_process_init_files [file [file [...]]]
|
||||
# ie: docker_process_init_files /always-initdb.d/*
|
||||
# process initializer files, based on file extensions
|
||||
docker_process_init_files() {
|
||||
echo
|
||||
local f
|
||||
for f; do
|
||||
case "$f" in
|
||||
*.sh)
|
||||
# https://github.com/docker-library/postgres/issues/450#issuecomment-393167936
|
||||
# https://github.com/docker-library/postgres/pull/452
|
||||
if [ -x "$f" ]; then
|
||||
in_log INFO "$0: running $f"
|
||||
"$f"
|
||||
else
|
||||
in_log INFO "$0: sourcing $f"
|
||||
. "$f"
|
||||
fi
|
||||
;;
|
||||
*) in_log INFO "$0: ignoring $f" ;;
|
||||
esac
|
||||
echo
|
||||
done
|
||||
}
|
||||
|
||||
php artisan config:cache
|
||||
php artisan optimize
|
||||
php artisan package:discover
|
||||
|
||||
# Check if DB works, if not crash the app.
|
||||
DB_READY=$(php artisan tinker --execute='echo app()->call("App\Utils\SystemHealth@dbCheck")["success"];')
|
||||
if [ "$DB_READY" != "1" ]; then
|
||||
php artisan migrate:status # Print verbose error
|
||||
in_error "Error connecting to DB"
|
||||
fi
|
||||
|
||||
php artisan migrate --force
|
||||
|
||||
# If first IN run, it needs to be initialized
|
||||
IN_INIT=$(php artisan tinker --execute='echo Schema::hasTable("accounts") && !App\Models\Account::all()->first();')
|
||||
if [ "$IN_INIT" == "1" ]; then
|
||||
docker_process_init_files /docker-entrypoint-init.d/*
|
||||
fi
|
||||
8
alpine/5/rootfs/usr/local/bin/shutdown.sh
Executable file
8
alpine/5/rootfs/usr/local/bin/shutdown.sh
Executable 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
|
||||
17
alpine/5/rootfs/usr/local/etc/php/conf.d/in-php.ini
Normal file
17
alpine/5/rootfs/usr/local/etc/php/conf.d/in-php.ini
Normal 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
|
||||
@@ -1,17 +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
|
||||
|
||||
chown www-data .env
|
||||
|
||||
exec "$@"
|
||||
23
charts/invoiceninja/.helmignore
Normal file
23
charts/invoiceninja/.helmignore
Normal 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/
|
||||
15
charts/invoiceninja/Chart.lock
Normal file
15
charts/invoiceninja/Chart.lock
Normal file
@@ -0,0 +1,15 @@
|
||||
dependencies:
|
||||
- name: common
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 2.2.2
|
||||
- name: nginx
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 13.2.20
|
||||
- name: mariadb
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 11.4.2
|
||||
- name: redis
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 16.13.2
|
||||
digest: sha256:da0dca54f32ca0465f89744d6247421ad13c907f09cd40fb21985c81888aaef1
|
||||
generated: "2022-12-23T12:54:52.476889+08:00"
|
||||
47
charts/invoiceninja/Chart.yaml
Normal file
47
charts/invoiceninja/Chart.yaml
Normal file
@@ -0,0 +1,47 @@
|
||||
apiVersion: v2
|
||||
name: invoiceninja
|
||||
description: A Helm chart to install Invoice Ninja
|
||||
# A chart can be either an 'application' or a 'library' chart.
|
||||
#
|
||||
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||
# to be deployed.
|
||||
#
|
||||
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
||||
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||
type: application
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.10.2
|
||||
# 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.6.24
|
||||
keywords:
|
||||
- invoiceninja
|
||||
home: https://invoiceninja.github.io/dockerfiles
|
||||
sources:
|
||||
- https://github.com/invoiceninja/invoiceninja
|
||||
- https://github.com/invoiceninja/dockerfiles
|
||||
dependencies:
|
||||
- name: common
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
tags:
|
||||
- bitnami-common
|
||||
version: 2.x.x
|
||||
- condition: nginx.enabled
|
||||
name: nginx
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 13.x.x
|
||||
- condition: mariadb.enabled
|
||||
name: mariadb
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 11.4.x
|
||||
- condition: redis.enabled
|
||||
name: redis
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 16.x.x
|
||||
maintainers:
|
||||
- email: lwj5@hotmail.com
|
||||
name: lwj5
|
||||
388
charts/invoiceninja/README.md
Normal file
388
charts/invoiceninja/README.md
Normal file
@@ -0,0 +1,388 @@
|
||||
# Invoice Ninja Helm Chart
|
||||
|
||||
This helm chart installs Invoice Ninja (IN) and its dependencies into a running
|
||||
Kubernetes cluster.
|
||||
|
||||
The chart installs the [Invoice Ninja](https://hub.docker.com/r/invoiceninja/invoiceninja) docker image.
|
||||
|
||||
Please read [Upgrading](#upgrading) section before upgrading MAJOR versions.
|
||||
|
||||
## Dependencies
|
||||
|
||||
- The Bitnami [common](https://github.com/bitnami/charts/tree/master/bitnami/common) helm chart
|
||||
- The Bitnami [mariadb](https://github.com/bitnami/charts/tree/master/bitnami/mariadb) helm chart
|
||||
- The Bitnami [nginx](https://github.com/bitnami/charts/tree/master/bitnami/nginx) helm chart
|
||||
- The Bitnami [redis](https://github.com/bitnami/charts/tree/master/bitnami/redis) helm chart
|
||||
- Tested on Kubernetes 1.19+
|
||||
|
||||
## 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 --set appKey=changeit --set mariadb.auth.rootPassword=changeit --set mariadb.auth.password=changeit --set redis.auth.password=changeit
|
||||
```
|
||||
|
||||
The command deploys Invoice Ninja on the Kubernetes cluster in the default namespace. The [Parameters](#parameters) section lists the parameters that can be configured during installation.
|
||||
|
||||
> **Tip**: List all releases using `helm list`
|
||||
|
||||
## Uninstalling the Chart
|
||||
|
||||
To uninstall/delete the `invoiceninja` deployment:
|
||||
|
||||
```bash
|
||||
helm delete invoiceninja
|
||||
```
|
||||
|
||||
The command removes all the Kubernetes components associated with the chart and deletes the release.
|
||||
|
||||
## Parameters
|
||||
|
||||
The following table lists the configurable parameters of the Invoice Ninja chart and their default values.
|
||||
|
||||
> NOTE: You MUST set any values that default to random or risk losing access after an upgrade. See how [here](#installing-with-arguments)
|
||||
|
||||
### Global Configuration
|
||||
|
||||
The following table shows the configuration options for the Invoice Ninja helm chart:
|
||||
|
||||
### Global parameters
|
||||
|
||||
| Parameter | Description | Default |
|
||||
| ------------------------- | ----------------------------------------------- | ------------------------------------------------------- |
|
||||
| `global.imageRegistry` | Global Docker image registry | `nil` |
|
||||
| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
|
||||
| `global.storageClass` | Global storage class for dynamic provisioning | `nil` |
|
||||
|
||||
### Common parameters
|
||||
|
||||
| Parameter | Description | Default |
|
||||
| ------------------- | -------------------------------------------------------------------- | ------------------------------ |
|
||||
| `nameOverride` | String to partially override common.names.fullname | `nil` |
|
||||
| `fullnameOverride` | String to fully override common.names.fullname | `nil` |
|
||||
| `clusterDomain` | Default Kubernetes cluster domain | `cluster.local` |
|
||||
| `commonLabels` | Labels to add to all deployed objects | `{}` |
|
||||
| `commonAnnotations` | Annotations to add to all deployed objects | `{}` |
|
||||
| `kubeVersion` | Force target Kubernetes version (using Helm capabilities if not set) | `nil` |
|
||||
| `extraDeploy` | Array of extra objects to deploy with the release | `[]` (evaluated as a template) |
|
||||
|
||||
### Invoice Ninja container parameters
|
||||
|
||||
| Parameter | Description | Default |
|
||||
| ------------------------ | ----------------------------------------------------------------------------- | ------------------------------------------------------- |
|
||||
| `image.registry` | Invoice Ninja image registry | `docker.io` |
|
||||
| `image.repository` | Invoice Ninja image name | `invoiceninja/invoiceninja` |
|
||||
| `image.tag` | Invoice Ninja image tag | Check `values.yaml` file |
|
||||
| `image.pullPolicy` | Invoice Ninja image pull policy | `IfNotPresent` |
|
||||
| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
|
||||
| `image.debug` | Specify if debug logs should be enabled | `false` |
|
||||
| `debug` | Turn on debug mode on Invoice Ninja | `false` |
|
||||
| `appKey` | Laravel Application Key (ignored if existing secret is provided) | _random 32 character alphanumeric string_ |
|
||||
| `appURL` | Override Laravel Application URL (automatically set if blank) | `""` |
|
||||
| `userEmail` | Initial user email address | `admin@example.com` |
|
||||
| `userPassword` | Initial user password (ignored if existing secret is provided) | `changeme!` |
|
||||
| `logChannel` | Name of log channel to use | `nil` |
|
||||
| `broadcastDriver` | Name of broadcast driver to use | `nil` |
|
||||
| `cacheDriver` | Name of cache driver to use | `nil` |
|
||||
| `sessionDriver` | Name of session driver to use | `nil` |
|
||||
| `queueConnection` | Name of queue connection to use | `nil` |
|
||||
| `pdfGenerator` | PDF generation method (Allowed values: `snappdf` or `phantom`) | `snappdf` |
|
||||
| `mailer` | Name of the mailer to use (log, smtp, etc.) | `log` |
|
||||
| `requireHttps` | Force HTTPS for internal connections to Invoice Ninja (see #349) | `false` |
|
||||
| `existingSecret` | Use existing secret that contain the keys `APP_KEY` and `IN_PASSWORD` | `nil` |
|
||||
| `extraEnvVars` | Extra environment variables to be set on Invoice Ninja container | `{}` |
|
||||
| `extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars | `nil` |
|
||||
| `extraEnvVarsSecret` | Name of existing Secret containing extra env vars | `nil` |
|
||||
| `trustedProxy` | List of trusted proxies for Invoice Ninja to communicate with the nginx proxy | `'*'` |
|
||||
| `extraVolumeMounts` | Additional volume mounts | `[]` |
|
||||
| `resources` | The resources for the Invoice Ninja container | `{}` |
|
||||
| `livenessProbe` | Liveness probe configuration for Invoice Ninja | Check `values.yaml` file |
|
||||
| `readinessProbe` | Readiness probe configuration for Invoice Ninja | Check `values.yaml` file |
|
||||
| `containerPorts.fastcgi` | FastCGI port to expose at container level | `9000` |
|
||||
|
||||
### Inline web server container parameters (only used when `nginx.enabled` is **not** set to true)
|
||||
|
||||
| Parameter | Description | Default |
|
||||
| ------------------------ | -------------------------------------------------------- | ------------------------------------------------------- |
|
||||
| `http.image.registry` | Nginx image registry | `docker.io` |
|
||||
| `http.image.repository` | Nginx image name | `invoiceninja/invoiceninja` |
|
||||
| `http.image.tag` | Nginx image tag | Check `values.yaml` file |
|
||||
| `http.image.pullPolicy` | Nginx image pull policy | `IfNotPresent` |
|
||||
| `http.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
|
||||
| `http.image.debug` | Specify if debug logs should be enabled | `false` |
|
||||
| `extraEnvVars` | Extra environment variables to be set on Nginx container | `{}` |
|
||||
| `extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars | `nil` |
|
||||
| `extraEnvVarsSecret` | Name of existing Secret containing extra env vars | `nil` |
|
||||
| `extraVolumeMounts` | Additional volume mounts | `[]` |
|
||||
| `resources` | The resources for the Nginx container | `{}` |
|
||||
| `livenessProbe` | Liveness probe configuration for Nginx | Check `values.yaml` file |
|
||||
| `readinessProbe` | Readiness probe configuration for Nginx | Check `values.yaml` file |
|
||||
| `containerPorts.http` | HTTP port to expose at container level | `9000` |
|
||||
| `containerPorts.https` | HTTPS port to expose at container level | `9000` |
|
||||
|
||||
### Invoice Ninja deployment parameters
|
||||
|
||||
| Parameter | Description | Default |
|
||||
| --------------------------- | ----------------------------------------------------------------------------------------- | ------------------------------ |
|
||||
| `replicaCount` | Number of Invoice Ninja Pods to run | `1` |
|
||||
| `serviceAccountName` | Name of a service account for the Invoice Ninja pods | `default` |
|
||||
| `containerSecurityContext` | Invoice Ninja containers' Security Context | Check `values.yaml` file |
|
||||
| `podSecurityContext` | Invoice Ninja pods' Security Context | Check `values.yaml` file |
|
||||
| `updateStrategy` | Set up update strategy | `RollingUpdate` |
|
||||
| `podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `soft` |
|
||||
| `nodeAffinityPreset.type` | Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
|
||||
| `nodeAffinityPreset.key` | Node label key to match. Ignored if `affinity` is set. | `""` |
|
||||
| `nodeAffinityPreset.values` | Node label values to match. Ignored if `affinity` is set. | `[]` |
|
||||
| `affinity` | Affinity for pod assignment | `{}` (evaluated as a template) |
|
||||
| `nodeSelector` | Node labels for pod assignment | `{}` (evaluated as a template) |
|
||||
| `tolerations` | Tolerations for pod assignment | `[]` (evaluated as a template) |
|
||||
| `podLabels` | Extra labels for Invoice Ninja pods | `{}` |
|
||||
| `podAnnotations` | Annotations for Invoice Ninja pods | `{}` |
|
||||
| `extraVolumes` | Additional volumes | `[]` |
|
||||
|
||||
### Volume Permissions parameters
|
||||
|
||||
| Parameter | Description | Default |
|
||||
| ------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
|
||||
| `volumePermissions.enabled` | Enable init container that changes the owner and group of the persistent volume(s) mountpoint to `runAsUser:fsGroup` | `false` |
|
||||
| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` |
|
||||
| `volumePermissions.image.repository` | Init container volume-permissions image name | `bitnami/bitnami-shell` |
|
||||
| `volumePermissions.image.tag` | Init container volume-permissions image tag | `"10"` |
|
||||
| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `Always` |
|
||||
| `volumePermissions.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
|
||||
| `volumePermissions.resources` | Init container volume-permissions resource | `{}` |
|
||||
|
||||
### Exposure parameters
|
||||
|
||||
#### FastCGI
|
||||
|
||||
| Parameter | Description | Default |
|
||||
| ---------------------------------- | -------------------------------------------------------------------------- | ------------------------------ |
|
||||
| `service.type` | Kubernetes Service type | `ClusterIP` |
|
||||
| `service.port` | Service FastCGI port | `9000` |
|
||||
| `service.nodePort` | Kubernetes FastCGI node port | `""` |
|
||||
| `service.clusterIP` | Invoice Ninja service clusterIP IP | `None` |
|
||||
| `service.loadBalancerSourceRanges` | Restricts access for LoadBalancer (only with `service.type: LoadBalancer`) | `[]` |
|
||||
| `service.loadBalancerIP` | loadBalancerIP if service type is `LoadBalancer` | `nil` |
|
||||
| `service.externalTrafficPolicy` | Enable client source IP preservation | `Cluster` |
|
||||
| `service.annotations` | Service annotations | `{}` (evaluated as a template) |
|
||||
|
||||
#### Inline web server (only used when `nginx.enabled` is **not** set to true)
|
||||
|
||||
| Parameter | Description | Default |
|
||||
| --------------------------------------- | -------------------------------------------------------------------------- | ------------------------------ |
|
||||
| `service.http.type` | Kubernetes Service type | `ClusterIP` |
|
||||
| `service.http.ports.http` | Service HTTP port | `9000` |
|
||||
| `service.http.ports.https` | Service HTTPS port | `9000` |
|
||||
| `service.http.nodePorts.http` | Kubernetes HTTP node port | `""` |
|
||||
| `service.http.nodePorts.https` | Kubernetes HTTPS node port | `""` |
|
||||
| `service.http.clusterIP` | Invoice Ninja service clusterIP IP | `None` |
|
||||
| `service.http.loadBalancerSourceRanges` | Restricts access for LoadBalancer (only with `service.type: LoadBalancer`) | `[]` |
|
||||
| `service.http.loadBalancerIP` | loadBalancerIP if service type is `LoadBalancer` | `nil` |
|
||||
| `service.http.externalTrafficPolicy` | Enable client source IP preservation | `Cluster` |
|
||||
| `service.http.annotations` | Service annotations | `{}` (evaluated as a template) |
|
||||
|
||||
|
||||
### Ingress parameters
|
||||
|
||||
#### Inline web server (only used when `nginx.enabled` is **not** set to true)
|
||||
|
||||
| Parameter | Description | Default |
|
||||
| -------------------------- | ----------------------------------------------------------------------------------------------------- | ------------------------ |
|
||||
| `ingress.enabled` | Enable ingress | `true` |
|
||||
| `ingress.certManager` | Add the corresponding annotations for cert-manager integration | `false` |
|
||||
| `ingress.pathType` | Ingress path type | `ImplementationSpecific` |
|
||||
| `ingress.apiVersion` | Force Ingress API version (automatically detected if not set) | `nil` |
|
||||
| `ingress.ingressClassName` | IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+) | `nil` |
|
||||
| `ingress.hostname` | Default host for the ingress record | `invoiceninja.local` |
|
||||
| `ingress.path` | Default path for the ingress record | `/` |
|
||||
| `ingress.annotations` | Additional custom annotations for the ingress record | `{}` |
|
||||
| `ingress.tls` | Enable TLS configuration for the host defined at `ingress.hostname` parameter | `false` |
|
||||
| `ingress.extraHosts` | An array with additional hostname(s) to be covered with the ingress record | `[]` |
|
||||
| `ingress.extraPaths` | An array with additional arbitrary paths that may need to be added to the ingress under the main host | `[]` |
|
||||
| `ingress.extraTls` | TLS configuration for additional hostname(s) to be covered with this ingress record | `[]` |
|
||||
| `ingress.secrets` | Custom TLS certificates as secrets | `[]` |
|
||||
|
||||
#### Nginx sub-chart
|
||||
|
||||
| Parameter | Description | Default |
|
||||
| ------------------------------------ | ------------------------------------- | ------------------------------------------------------ |
|
||||
| `nginx.enabled` | Deploy Nginx sub-chart | `false` |
|
||||
| `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.existingServerBlockConfigmap` | Custom NGINX server block config map | `{{ include "invoiceninja.nginx.serverBlockName" . }}` |
|
||||
| `nginx.staticSitePVC` | Name of Invoice Ninja public PVC | `{{ include "invoiceninja.public.storageName" . }}` |
|
||||
|
||||
> 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 | `[ReadWriteOnce]` |
|
||||
| `persistence.public.size` | PVC Storage Request | `1Gi` |
|
||||
| `persistence.public.dataSource` | PVC data source | `{}` |
|
||||
| `persistence.storage.enabled` | Enable persistence using PVC (only for FILE driver) | `false` |
|
||||
| `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 | `{}` |
|
||||
|
||||
> See `values.yaml` for more details.
|
||||
|
||||
### Redis parameters
|
||||
|
||||
| Parameter | Description | Default |
|
||||
| --------------------------------- | -------------------------------------------- | ----------------------------------------- |
|
||||
| `redis.enabled` | If external redis is used, set it to `false` | `true` |
|
||||
| `redis.auth.password` | Redis password | _random 10 character alphanumeric string_ |
|
||||
| `redis.auth.sentinel` | Use password for sentinel containers | `false` |
|
||||
| `redis.sentinel.enabled` | Enable sentinel containers | `true` |
|
||||
| `redis.sentinel.quorum` | Sentinel Quorum | `1` |
|
||||
| `redis.replica.replicaCount` | Number of Redis replicas to deploy | `1` |
|
||||
| `externalRedis.host` | Host of the external redis | `nil` |
|
||||
| `externalRedis.port` | Port of the external redis | `6379` |
|
||||
| `externalRedis.password` | Password for the external redis | `nil` |
|
||||
| `externalRedis.sentinel` | Using sentinels | `false` |
|
||||
| `externalRedis.databases.default` | Database to use by default | `0` |
|
||||
| `externalRedis.databases.cache` | Database to use by cache | `1` |
|
||||
|
||||
> See [Dependencies](#dependencies) for more.
|
||||
|
||||
### Database parameters
|
||||
|
||||
| Parameter | Description | Default |
|
||||
| --------------------------------- | ------------------------------------------- | ----------------------------------------- |
|
||||
| `mariadb.enabled` | Deploy MariaDB container(s) | `true` |
|
||||
| `mariadb.auth.rootPassword` | Password for the MariaDB `root` user | _random 10 character alphanumeric string_ |
|
||||
| `mariadb.auth.database` | Database name to create | `invoiceninja` |
|
||||
| `mariadb.auth.username` | Database user to create | `invoiceninja` |
|
||||
| `mariadb.auth.password` | Password for the database | _random 10 character alphanumeric string_ |
|
||||
| `externalDatabase.host` | Host of the external database | `nil` |
|
||||
| `externalDatabase.user` | Existing username in the external db | `invoiceninja` |
|
||||
| `externalDatabase.password` | Password for the above username | `nil` |
|
||||
| `externalDatabase.database` | Name of the existing database | `invoiceninja` |
|
||||
| `externalDatabase.port` | Database port number | `3306` |
|
||||
| `externalDatabase.existingSecret` | Name of the database existing Secret Object | `nil` |
|
||||
|
||||
> See [Dependencies](#dependencies) for more.
|
||||
|
||||
### Other parameters
|
||||
|
||||
| Parameter | Description | Default |
|
||||
| -------------------------- | ---------------------------------------- | ------- |
|
||||
| `autoscaling.enabled` | Enable autoscaling for Invoice Ninja | `false` |
|
||||
| `autoscaling.minReplicas` | Minimum number of Invoice Ninja replicas | `1` |
|
||||
| `autoscaling.maxReplicas` | Maximum number of Invoice Ninja replicas | `11` |
|
||||
| `autoscaling.targetCPU` | Target CPU utilization percentage | `nil` |
|
||||
| `autoscaling.targetMemory` | Target Memory utilization percentage | `nil` |
|
||||
|
||||
## Installing with Arguments
|
||||
|
||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
||||
|
||||
```bash
|
||||
helm install invoiceninja \
|
||||
--set appKey=changeit \
|
||||
--set replicaCount=3 \
|
||||
--set persistence.public.accessModes[0]=ReadWriteMany
|
||||
--set redis.auth.password=changeit \
|
||||
--set redis.sentinel.quorum=2 \
|
||||
--set redis.replica.replicaCount=3 \
|
||||
--set mariadb.auth.rootPassword=changeit \
|
||||
--set mariadb.auth.password=changeit \
|
||||
invoiceninja/invoiceninja
|
||||
```
|
||||
|
||||
The above command sets the number of replicas to 3 for a highly available (HA) setup and uses a `ReadWriteMany` volume. Note that you would need to use an external DB such as MariaDB Galera for a full HA production setup. For a production environment, it is recommended that you spin up the required databases in a separate Helm Chart to decouple the upgrading process.
|
||||
|
||||
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,
|
||||
|
||||
```yaml
|
||||
# values.yaml
|
||||
appKey: changeit
|
||||
persistence:
|
||||
public:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
redis:
|
||||
auth:
|
||||
password: changeit
|
||||
mariadb:
|
||||
auth:
|
||||
rootPassword: changeit
|
||||
password: changeit
|
||||
```
|
||||
|
||||
```bash
|
||||
helm install invoiceninja -f values.yaml invoiceninja/invoiceninja
|
||||
```
|
||||
|
||||
## Setting Environment Variables
|
||||
|
||||
Should you need to inject any environment variables such as those in [here](https://github.com/invoiceninja/dockerfiles/blob/master/env) into the `invoiceninja` container, you can use the `extraEnvVars` option:
|
||||
|
||||
```yaml
|
||||
# ... values.yaml file
|
||||
# In this example, we are setting the SMTP MAIL_HOST to be 'smtp.mailtrap.io'
|
||||
extraEnvVars:
|
||||
- name: MAIL_HOST
|
||||
value: 'smtp.mailtrap.io' # all values must be strings, so other types must be surrounded in quotes
|
||||
```
|
||||
|
||||
Alternatively you can provide the name of an existing `configmap` or `secret` object:
|
||||
|
||||
```bash
|
||||
kubectl create configmap examplemap --from-literal=MAIL_HOST='smtp.mailtrap.io'
|
||||
```
|
||||
|
||||
```yaml
|
||||
# ... values.yaml file
|
||||
extraEnvVarsCM: examplemap
|
||||
```
|
||||
|
||||
## Inline webserver vs Nginx sub-chart
|
||||
|
||||
Since there are many people without access to a `ReadWriteMany` volume, the inline Nginx web server will allow you to use a `ReadWriteOnce` public volume limited to 1 IN replica.
|
||||
|
||||
If you have the ability to use `ReadWriteMany` persistent volume, you can choose between the two by setting the `nginx.enabled` parameter. Setting `nginx.enabled` to true will enable the Nginx sub-chart and will provide you with some additional features, such as:
|
||||
|
||||
- independent scaling of Nginx and IN pods
|
||||
- separate resource limits/requests
|
||||
- other features available from the sub-chart
|
||||
|
||||
## Upgrading
|
||||
|
||||
### To 0.10.0
|
||||
|
||||
The following chart dependencies have been upgraded.
|
||||
- MariaDB
|
||||
- Redis
|
||||
- Nginx
|
||||
- Bitnami common
|
||||
|
||||
Please take note that this upgrade MariaDB from 10.5 to 10.6. Please backup your database before proceeding.
|
||||
|
||||
### To 0.8.0
|
||||
|
||||
To improve the accessibility of this chart to regular users. Some of the defaults have been changed. This include:
|
||||
|
||||
- `persistence.public.accessModes` now defaults to `ReadWriteOnce`.
|
||||
- `nginx.enabled` now defaults to false.
|
||||
- `redis.replica.replicaCount` and `redis.sentinel.quorum` now defaults to `1`.
|
||||
|
||||
Other changes:
|
||||
|
||||
- `snappdf` parameter has been replaced by `pdfGenerator`.
|
||||
|
||||
### To 0.7.0
|
||||
|
||||
- Redis chart dependency has been upgraded and may not be backwards compatible with previous versions. See [here](https://github.com/bitnami/charts/tree/master/bitnami/redis) for more info.
|
||||
- Storage persitence defaults to `false`. Set to `true` if not using Redis or using FILE driver
|
||||
34
charts/invoiceninja/templates/NOTES.txt
Normal file
34
charts/invoiceninja/templates/NOTES.txt
Normal file
@@ -0,0 +1,34 @@
|
||||
|
||||
** Please be patient while the chart is being deployed **
|
||||
|
||||
Your controller can be accessed through the following DNS name from within your cluster:
|
||||
|
||||
http://{{ include "invoiceninja.nginx.fullname" . }}.{{ .Release.Namespace }}.svc
|
||||
|
||||
To access your controller from outside the cluster follow the steps below:
|
||||
|
||||
{{- if or .Values.nginx.ingress.enabled }}
|
||||
|
||||
Externally through the following DNS name:
|
||||
|
||||
http://{{ .Values.nginx.ingress.hostname }}
|
||||
|
||||
-- OR --
|
||||
{{ end }}
|
||||
|
||||
{{- if contains "NodePort" .Values.nginx.service.type }}
|
||||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "invoiceninja.nginx.fullname" . }})
|
||||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||
echo http://$NODE_IP:$NODE_PORT
|
||||
{{- else if contains "LoadBalancer" .Values.nginx.service.type }}
|
||||
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "invoiceninja.nginx.fullname" . }}'
|
||||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "invoiceninja.nginx.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
|
||||
echo http://$SERVICE_IP:{{ .Values.service.port }}
|
||||
{{- else if contains "ClusterIP" .Values.nginx.service.type }}
|
||||
export SVC_NAME=$(kubectl get svc --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name=nginx,app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||
export SVC_PORT=$(kubectl get svc --namespace {{ .Release.Namespace }} $SVC_NAME -o jsonpath="{.spec.ports[0].port}")
|
||||
echo "Add the line '127.0.0.1 {{ .Values.nginx.ingress.hostname }}' to your hosts file"
|
||||
echo "Visit http://{{ .Values.nginx.ingress.hostname }} to use your application"
|
||||
kubectl -n {{ .Release.Namespace }} port-forward svc/$SVC_NAME 80:$SVC_PORT
|
||||
{{- end }}
|
||||
309
charts/invoiceninja/templates/_helpers.tpl
Normal file
309
charts/invoiceninja/templates/_helpers.tpl
Normal file
@@ -0,0 +1,309 @@
|
||||
{{/*
|
||||
Return the proper image name
|
||||
*/}}
|
||||
{{- define "invoiceninja.image" -}}
|
||||
{{- include "common.images.image" (dict "imageRoot" .Values.image "global" .Values.global) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper image name
|
||||
*/}}
|
||||
{{- define "invoiceninja.nginx.image" -}}
|
||||
{{- include "common.images.image" (dict "imageRoot" .Values.http.image "global" .Values.global) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Docker Image Registry Secret Names
|
||||
*/}}
|
||||
{{- define "invoiceninja.imagePullSecrets" -}}
|
||||
{{- include "common.images.pullSecrets" (dict "images" (list .Values.image .Values.http.image .Values.volumePermissions.image) "global" .Values.global) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper image name (for the init container volume-permissions image)
|
||||
*/}}
|
||||
{{- define "invoiceninja.volumePermissions.image" -}}
|
||||
{{ include "common.images.image" (dict "imageRoot" .Values.volumePermissions.image "global" .Values.global) }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "invoiceninja.mariadb.fullname" -}}
|
||||
{{- printf "%s-%s" .Release.Name "mariadb" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "invoiceninja.nginx.fullname" -}}
|
||||
{{- printf "%s-%s" .Release.Name "nginx" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "invoiceninja.redis.fullname" -}}
|
||||
{{- printf "%s-%s" .Release.Name "redis" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "invoiceninja.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
{{- default (include "common.names.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else -}}
|
||||
{{- default "default" .Values.serviceAccount.name }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the Invoice Ninja Secret Name
|
||||
*/}}
|
||||
{{- define "invoiceninja.secretName" -}}
|
||||
{{- default (include "common.names.fullname" .) .Values.existingSecret }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Storage Class
|
||||
*/}}
|
||||
{{- define "invoiceninja.public.storageClass" -}}
|
||||
{{- include "common.storage.class" (dict "persistence" .Values.persistence.public "global" .Values.global) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Storage Class
|
||||
*/}}
|
||||
{{- define "invoiceninja.storage.storageClass" -}}
|
||||
{{- include "common.storage.class" (dict "persistence" .Values.persistence.storage "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 proper app URL
|
||||
*/}}
|
||||
{{- define "invoiceninja.url" -}}
|
||||
{{- if .Values.appURL }}
|
||||
{{- printf "%s" .Values.appURL -}}
|
||||
{{- else if .Values.nginx.ingress.enabled }}
|
||||
{{- if .Values.nginx.ingress.tls }}
|
||||
{{- printf "https://%s" .Values.nginx.ingress.hostname -}}
|
||||
{{- else }}
|
||||
{{- printf "http://%s" .Values.nginx.ingress.hostname -}}
|
||||
{{- end }}
|
||||
{{- else if .Values.ingress.enabled }}
|
||||
{{- if .Values.ingress.tls }}
|
||||
{{- printf "https://%s" .Values.ingress.hostname -}}
|
||||
{{- else }}
|
||||
{{- printf "http://%s" .Values.ingress.hostname -}}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- printf "http://%s" (include "common.names.fullname" .) -}}
|
||||
{{- end }}
|
||||
{{- 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 -}}
|
||||
{{- if .Values.mariadb.auth.existingSecret -}}
|
||||
{{- printf "%s" .Values.mariadb.auth.existingSecret -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s" (include "invoiceninja.mariadb.fullname" .) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the Redis Hostname
|
||||
*/}}
|
||||
{{- define "invoiceninja.redisHost" -}}
|
||||
{{- if .Values.redis.enabled }}
|
||||
{{- if .Values.redis.sentinel.enabled }}
|
||||
{{- printf "%s-%s" (include "invoiceninja.redis.fullname" .) "headless" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else }}
|
||||
{{- printf "%s-%s" (include "invoiceninja.redis.fullname" .) "master" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s" .Values.externalRedis.host -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the Redis Port
|
||||
*/}}
|
||||
{{- define "invoiceninja.redisPort" -}}
|
||||
{{- if .Values.redis.enabled }}
|
||||
{{- if .Values.redis.sentinel.enabled }}
|
||||
{{- printf "26379" -}}
|
||||
{{- else }}
|
||||
{{- printf "6379" -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- printf "%d" (.Values.externalRedis.port | int ) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the Redis Database
|
||||
*/}}
|
||||
{{- define "invoiceninja.redisDatabase" -}}
|
||||
{{- if .Values.redis.enabled }}
|
||||
{{- printf "0" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s" .Values.externalRedis.databases.default -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the Redis Database
|
||||
*/}}
|
||||
{{- define "invoiceninja.redisCacheDatabase" -}}
|
||||
{{- if .Values.redis.enabled }}
|
||||
{{- printf "1" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s" .Values.externalRedis.databases.cache -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the Redis Secret Name
|
||||
*/}}
|
||||
{{- define "invoiceninja.redisSecretName" -}}
|
||||
{{- if .Values.externalRedis.existingSecret -}}
|
||||
{{- printf "%s" .Values.externalRedis.existingSecret -}}
|
||||
{{- else -}}
|
||||
{{- if .Values.redis.auth.existingSecret -}}
|
||||
{{- printf "%s" .Values.redis.auth.existingSecret -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s" (include "invoiceninja.redis.fullname" .) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the Broadcast Connection Name
|
||||
*/}}
|
||||
{{- define "invoiceninja.redisBroadcastConnection" -}}
|
||||
{{- if or (and .Values.redis.enabled .Values.redis.sentinel.enabled) (and .Values.externalRedis.host .Values.externalRedis.sentinel) }}
|
||||
{{- printf "sentinel-default" -}}
|
||||
{{- else -}}
|
||||
{{- printf "default" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the Cache Connection Name
|
||||
*/}}
|
||||
{{- define "invoiceninja.redisCacheConnection" -}}
|
||||
{{- if or (and .Values.redis.enabled .Values.redis.sentinel.enabled) (and .Values.externalRedis.host .Values.externalRedis.sentinel) }}
|
||||
{{- printf "sentinel-cache" -}}
|
||||
{{- else -}}
|
||||
{{- printf "cache" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the Queue Connection Name
|
||||
*/}}
|
||||
{{- define "invoiceninja.redisQueueConnection" -}}
|
||||
{{- if or (and .Values.redis.enabled .Values.redis.sentinel.enabled) (and .Values.externalRedis.host .Values.externalRedis.sentinel) }}
|
||||
{{- printf "sentinel-default" -}}
|
||||
{{- else -}}
|
||||
{{- printf "default" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the Session Connection Name
|
||||
*/}}
|
||||
{{- define "invoiceninja.redisSessionConnection" -}}
|
||||
{{- if or (and .Values.redis.enabled .Values.redis.sentinel.enabled) (and .Values.externalRedis.host .Values.externalRedis.sentinel) }}
|
||||
{{- printf "sentinel-default" -}}
|
||||
{{- else -}}
|
||||
{{- printf "default" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Server block configmap name for nignx.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "invoiceninja.nginx.serverBlockName" -}}
|
||||
{{- printf "%s-%s" .Release.Name "server-block" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Name of web service for inline web server.
|
||||
*/}}
|
||||
{{- define "invoiceninja.http.serviceName" -}}
|
||||
{{- printf "%s-%s" .Release.Name "web" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
59
charts/invoiceninja/templates/configmap.yaml
Normal file
59
charts/invoiceninja/templates/configmap.yaml
Normal file
@@ -0,0 +1,59 @@
|
||||
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: {{ include "invoiceninja.url" . | quote }}
|
||||
APP_DEBUG: {{ .Values.debug | quote }}
|
||||
DB_HOST: {{ include "invoiceninja.databaseHost" . | quote }}
|
||||
DB_PORT: {{ include "invoiceninja.databasePort" . | quote }}
|
||||
DB_USERNAME: {{ include "invoiceninja.databaseUser" . | quote }}
|
||||
DB_DATABASE: {{ include "invoiceninja.databaseName" . | quote }}
|
||||
{{- if .Values.logChannel }}
|
||||
LOG_CHANNEL: {{ .Values.logChannel | quote }}
|
||||
{{- else }}
|
||||
LOG_CHANNEL: stderr
|
||||
{{- end }}
|
||||
MAIL_MAILER: {{ .Values.mailer | quote }}
|
||||
{{- if .Values.broadcastDriver }}
|
||||
BROADCAST_DRIVER: {{ .Values.broadcastDriver | quote }}
|
||||
{{- else if or .Values.redis.enabled .Values.externalRedis.host }}
|
||||
BROADCAST_DRIVER: redis
|
||||
{{- end }}
|
||||
{{- if .Values.cacheDriver }}
|
||||
CACHE_DRIVER: {{ .Values.cacheDriver | quote }}
|
||||
{{- else if or .Values.redis.enabled .Values.externalRedis.host }}
|
||||
CACHE_DRIVER: redis
|
||||
{{- end }}
|
||||
{{- if .Values.sessionDriver }}
|
||||
SESSION_DRIVER: {{ .Values.sessionDriver | quote }}
|
||||
{{- else if or .Values.redis.enabled .Values.externalRedis.host }}
|
||||
SESSION_DRIVER: redis
|
||||
{{- end }}
|
||||
{{- if .Values.queueConnection }}
|
||||
QUEUE_CONNECTION: {{ .Values.queueConnection | quote }}
|
||||
{{- else if or .Values.redis.enabled .Values.externalRedis.host }}
|
||||
QUEUE_CONNECTION: redis
|
||||
{{- end }}
|
||||
# PHANTOMJS_PDF_GENERATION is deprecated
|
||||
PHANTOMJS_PDF_GENERATION: "false"
|
||||
PDF_GENERATOR: {{ .Values.pdfGenerator | quote}}
|
||||
REDIS_HOST: {{ include "invoiceninja.redisHost" . | quote }}
|
||||
REDIS_PORT: {{ include "invoiceninja.redisPort" . | quote }}
|
||||
REDIS_DB: {{ include "invoiceninja.redisDatabase" . | quote }}
|
||||
REDIS_CACHE_DB: {{ include "invoiceninja.redisCacheDatabase" . | quote }}
|
||||
REDIS_BROADCAST_CONNECTION: {{ include "invoiceninja.redisBroadcastConnection" . | quote }}
|
||||
REDIS_CACHE_CONNECTION: {{ include "invoiceninja.redisCacheConnection" . | quote }}
|
||||
REDIS_QUEUE_CONNECTION: {{ include "invoiceninja.redisQueueConnection" . | quote }}
|
||||
SESSION_CONNECTION: {{ include "invoiceninja.redisSessionConnection" . | quote }}
|
||||
REQUIRE_HTTPS: {{ .Values.requireHttps | quote }}
|
||||
TRUSTED_PROXIES: {{ .Values.trustedProxies | quote }}
|
||||
274
charts/invoiceninja/templates/deployment.yaml
Normal file
274
charts/invoiceninja/templates/deployment.yaml
Normal file
@@ -0,0 +1,274 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "common.names.fullname" . }}
|
||||
labels:
|
||||
{{- include "common.labels.standard" $ | nindent 4 }}
|
||||
app.kubernetes.io/component: server
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations:
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if not .Values.autoscaling.enabled }}
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
{{- end }}
|
||||
{{- if .Values.updateStrategy }}
|
||||
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "common.labels.matchLabels" $ | nindent 6 }}
|
||||
app.kubernetes.io/component: server
|
||||
template:
|
||||
metadata:
|
||||
{{- if .Values.podAnnotations }}
|
||||
annotations:
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "common.labels.standard" $ | nindent 8 }}
|
||||
app.kubernetes.io/component: server
|
||||
{{- if .Values.podLabels }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- include "invoiceninja.imagePullSecrets" . | nindent 6 }}
|
||||
serviceAccountName: {{ include "invoiceninja.serviceAccountName" . }}
|
||||
{{- if .Values.affinity }}
|
||||
affinity: {{- include "common.tplvalues.render" (dict "value" .Values.affinity "context" $) | nindent 8 }}
|
||||
{{- else }}
|
||||
affinity:
|
||||
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "context" $) | nindent 10 }}
|
||||
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "context" $) | nindent 10 }}
|
||||
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.nodeAffinityPreset.type "key" .Values.nodeAffinityPreset.key "values" .Values.nodeAffinityPreset.values) | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- if .Values.nodeSelector }}
|
||||
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.nodeSelector "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.tolerations }}
|
||||
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tolerations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
initContainers:
|
||||
- name: wait-db
|
||||
image: {{ include "invoiceninja.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
command:
|
||||
- /bin/sh
|
||||
- -cx
|
||||
- |
|
||||
COUNTER=0;
|
||||
[[ -z "${DB_HOST1}" ]] || DB_HOST="${DB_HOST1}";
|
||||
[[ -z "${DB_PORT1}" ]] || DB_PORT="${DB_PORT1}";
|
||||
while [ $COUNTER -lt 120 ]; do
|
||||
if mysqladmin ping -h "$DB_HOST" -P $DB_PORT --connect-timeout=15 --silent; then
|
||||
exit 0;
|
||||
fi;
|
||||
let COUNTER=COUNTER+1;
|
||||
echo "Waiting for DB... Trying again in 2s";
|
||||
sleep 2;
|
||||
done;
|
||||
echo "Did NOT see a database after 240 secs!";
|
||||
exit 1;
|
||||
securityContext:
|
||||
{{- toYaml .Values.containerSecurityContext | nindent 12 }}
|
||||
{{- if .Values.resources }}
|
||||
resources: {{- toYaml .Values.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: {{ include "common.names.fullname" . }}
|
||||
{{- if .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:
|
||||
{{- if .Values.extraEnvVars }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.extraEnvVars "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if and .Values.podSecurityContext .Values.volumePermissions.enabled (or .Values.persistence.public.enabled .Values.persistence.storage.enabled) }}
|
||||
- name: volume-permissions
|
||||
image: {{ include "invoiceninja.volumePermissions.image" . }}
|
||||
imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }}
|
||||
command:
|
||||
- /bin/bash
|
||||
- -ec
|
||||
- |
|
||||
chown -R {{ .Values.containerSecurityContext.runAsUser }}:{{ .Values.podSecurityContext.fsGroup }} /var/www/app/{public,storage}
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
{{- if .Values.volumePermissions.resources }}
|
||||
resources: {{- toYaml .Values.volumePermissions.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- mountPath: /var/www/app/public
|
||||
name: public
|
||||
- mountPath: /var/www/app/storage
|
||||
name: storage
|
||||
{{- end }}
|
||||
{{- if .Values.initContainers }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.initContainers "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.containerSecurityContext | nindent 12 }}
|
||||
image: {{ include "invoiceninja.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
ports:
|
||||
- name: fastcgi
|
||||
containerPort: {{ .Values.containerPorts.fastcgi }}
|
||||
protocol: TCP
|
||||
{{- if .Values.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ $.Values.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ $.Values.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ $.Values.livenessProbe.failureThreshold }}
|
||||
exec:
|
||||
command:
|
||||
- pgrep
|
||||
- php-fpm
|
||||
{{- 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 "invoiceninja.secretName" . }}
|
||||
{{- if .Values.extraEnvVarsCM }}
|
||||
- configMapRef:
|
||||
name: {{ include "common.tplvalues.render" (dict "value" .Values.extraEnvVarsCM "context" $) }}
|
||||
{{- end }}
|
||||
{{- if .Values.extraEnvVarsSecret }}
|
||||
- secretRef:
|
||||
name: {{ include "common.tplvalues.render" (dict "value" .Values.extraEnvVarsSecret "context" $) }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: DB_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "invoiceninja.databaseSecretName" . }}
|
||||
key: mariadb-password
|
||||
{{- if or (and .Values.redis.enabled .Values.redis.auth.enabled) (or .Values.externalRedis.password .Values.externalRedis.existingSecret) }}
|
||||
- name: REDIS_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "invoiceninja.redisSecretName" . }}
|
||||
key: redis-password
|
||||
{{- end }}
|
||||
{{- if .Values.userEmail }}
|
||||
- name: IN_USER_EMAIL
|
||||
value: {{ .Values.userEmail | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.extraEnvVars }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.extraEnvVars "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
- mountPath: /var/www/app/public
|
||||
name: public
|
||||
- mountPath: /var/www/app/storage
|
||||
name: storage
|
||||
{{- if .Values.extraVolumeMounts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.extraVolumeMounts "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if not .Values.nginx.enabled }}
|
||||
- name: nginx
|
||||
securityContext:
|
||||
{{- toYaml .Values.containerSecurityContext | nindent 12 }}
|
||||
image: {{ include "invoiceninja.nginx.image" . }}
|
||||
imagePullPolicy: {{ .Values.http.image.pullPolicy }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.http.containerPorts.http }}
|
||||
- name: https
|
||||
containerPort: {{ .Values.http.containerPorts.https }}
|
||||
{{- if .Values.http.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
initialDelaySeconds: {{ .Values.http.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.http.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ $.Values.http.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ $.Values.http.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ $.Values.http.livenessProbe.failureThreshold }}
|
||||
tcpSocket:
|
||||
port: http
|
||||
{{- end }}
|
||||
{{- if .Values.http.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
initialDelaySeconds: {{ .Values.http.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.http.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ $.Values.http.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ $.Values.http.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ $.Values.http.readinessProbe.failureThreshold }}
|
||||
tcpSocket:
|
||||
port: http
|
||||
{{- end }}
|
||||
envFrom:
|
||||
{{- if .Values.http.extraEnvVarsCM }}
|
||||
- configMapRef:
|
||||
name: {{ include "common.tplvalues.render" (dict "value" .Values.extraEnvVarsCM "context" $) }}
|
||||
{{- end }}
|
||||
{{- if .Values.http.extraEnvVarsSecret }}
|
||||
- secretRef:
|
||||
name: {{ include "common.tplvalues.render" (dict "value" .Values.extraEnvVarsSecret "context" $) }}
|
||||
{{- end }}
|
||||
env:
|
||||
{{- if .Values.http.extraEnvVars }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.extraEnvVars "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
resources:
|
||||
{{- toYaml .Values.http.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
- mountPath: /opt/bitnami/nginx/conf/server_blocks
|
||||
name: nginx-server-block
|
||||
- mountPath: /app
|
||||
name: public
|
||||
{{- if .Values.http.extraVolumeMounts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.extraVolumeMounts "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- 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 not .Values.nginx.enabled }}
|
||||
- name: nginx-server-block
|
||||
configMap:
|
||||
defaultMode: 420
|
||||
name: {{ include "invoiceninja.nginx.serverBlockName" . }}
|
||||
{{- end }}
|
||||
{{- if .Values.extraVolumes }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
35
charts/invoiceninja/templates/hpa.yaml
Normal file
35
charts/invoiceninja/templates/hpa.yaml
Normal 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 }}
|
||||
63
charts/invoiceninja/templates/ingress.yaml
Normal file
63
charts/invoiceninja/templates/ingress.yaml
Normal file
@@ -0,0 +1,63 @@
|
||||
{{- if and ( not .Values.nginx.enabled ) .Values.ingress.enabled }}
|
||||
apiVersion: {{ include "common.capabilities.ingress.apiVersion" . }}
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ include "common.names.fullname" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
{{- if .Values.ingress.certManager }}
|
||||
kubernetes.io/tls-acme: "true"
|
||||
{{- end }}
|
||||
{{- if .Values.ingress.annotations }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.ingress.annotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if and .Values.ingress.ingressClassName (eq "true" (include "common.ingress.supportsIngressClassname" .)) }}
|
||||
ingressClassName: {{ .Values.ingress.ingressClassName | quote }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- if .Values.ingress.hostname }}
|
||||
- host: {{ .Values.ingress.hostname | quote }}
|
||||
http:
|
||||
paths:
|
||||
{{- if .Values.ingress.extraPaths }}
|
||||
{{- toYaml .Values.ingress.extraPaths | nindent 10 }}
|
||||
{{- end }}
|
||||
- path: {{ .Values.ingress.path }}
|
||||
{{- if eq "true" (include "common.ingress.supportsPathType" .) }}
|
||||
pathType: {{ .Values.ingress.pathType }}
|
||||
{{- end }}
|
||||
backend: {{- include "common.ingress.backend" ( dict "serviceName" (include "invoiceninja.http.serviceName" .) "servicePort" "http" "context" $ ) | nindent 14 }}
|
||||
{{- end }}
|
||||
{{- range .Values.ingress.extraHosts }}
|
||||
- host: {{ .name | quote }}
|
||||
http:
|
||||
paths:
|
||||
- path: {{ default "/" .path }}
|
||||
{{- if eq "true" (include "common.ingress.supportsPathType" $) }}
|
||||
pathType: {{ default "ImplementationSpecific" .pathType }}
|
||||
{{- end }}
|
||||
backend: {{- include "common.ingress.backend" ( dict "serviceName" (include "invoiceninja.http.serviceName" $) "servicePort" "http" "context" $ ) | nindent 14 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.ingress.tls .Values.ingress.extraTls }}
|
||||
tls:
|
||||
{{- if .Values.ingress.tls }}
|
||||
- hosts:
|
||||
- {{ .Values.ingress.hostname | quote }}
|
||||
{{- range .Values.ingress.extraHosts }}
|
||||
- {{ .name | quote }}
|
||||
{{- end }}
|
||||
secretName: {{ printf "%s-tls" .Values.ingress.hostname }}
|
||||
{{- end }}
|
||||
{{- if .Values.ingress.extraTls }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.ingress.extraTls "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
64
charts/invoiceninja/templates/pvc.yaml
Normal file
64
charts/invoiceninja/templates/pvc.yaml
Normal file
@@ -0,0 +1,64 @@
|
||||
{{- 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:
|
||||
{{- if not (empty .Values.persistence.public.accessModes) }}
|
||||
{{- range .Values.persistence.public.accessModes }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
- {{ .Values.persistence.public.accessMode | quote }}
|
||||
{{- end }}
|
||||
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:
|
||||
{{- if not (empty .Values.persistence.storage.accessModes) }}
|
||||
{{- range .Values.persistence.storage.accessModes }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
- {{ .Values.persistence.storage.accessMode | quote }}
|
||||
{{- end }}
|
||||
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 }}
|
||||
65
charts/invoiceninja/templates/secret.yaml
Normal file
65
charts/invoiceninja/templates/secret.yaml
Normal file
@@ -0,0 +1,65 @@
|
||||
{{- if not (or .Values.mariadb.enabled .Values.externalDatabase.existingSecret) }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "invoiceninja.mariadb.fullname" . }}
|
||||
labels:
|
||||
{{- include "common.labels.standard" $ | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations:
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
type: Opaque
|
||||
data:
|
||||
mariadb-password: {{ .Values.externalDatabase.password | b64enc | quote }}
|
||||
{{- end }}
|
||||
|
||||
---
|
||||
{{- if not (or .Values.redis.enabled .Values.externalDatabase.existingSecret) }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "invoiceninja.redis.fullname" . }}
|
||||
labels:
|
||||
{{- include "common.labels.standard" $ | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations:
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
type: Opaque
|
||||
data:
|
||||
redis-password: {{ .Values.externalRedis.password | b64enc | quote }}
|
||||
{{- end }}
|
||||
|
||||
---
|
||||
{{- if not .Values.existingSecret }}
|
||||
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 }}
|
||||
{{- if .Values.userPassword }}
|
||||
IN_PASSWORD: {{ .Values.userPassword | b64enc | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
40
charts/invoiceninja/templates/serverblock.yaml
Normal file
40
charts/invoiceninja/templates/serverblock.yaml
Normal file
@@ -0,0 +1,40 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "invoiceninja.nginx.serverBlockName" . }}
|
||||
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:
|
||||
server-block.conf: |-
|
||||
server {
|
||||
listen 8080 default_server;
|
||||
listen [::]:8080 default_server;
|
||||
server_name _;
|
||||
|
||||
root /app;
|
||||
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 {{ include "common.names.fullname" . }}:9000;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME /var/www/app/public$fastcgi_script_name;
|
||||
fastcgi_buffer_size 16k;
|
||||
fastcgi_buffers 4 16k;
|
||||
}
|
||||
}
|
||||
47
charts/invoiceninja/templates/service.yaml
Normal file
47
charts/invoiceninja/templates/service.yaml
Normal 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
|
||||
20
charts/invoiceninja/templates/serviceaccount.yaml
Normal file
20
charts/invoiceninja/templates/serviceaccount.yaml
Normal 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 }}
|
||||
60
charts/invoiceninja/templates/webservice.yaml
Normal file
60
charts/invoiceninja/templates/webservice.yaml
Normal file
@@ -0,0 +1,60 @@
|
||||
{{- if not .Values.nginx.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "invoiceninja.http.serviceName" . }}
|
||||
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.http.annotations .Values.commonAnnotations }}
|
||||
annotations:
|
||||
{{- if .Values.service.http.annotations }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.service.http.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.http.type }}
|
||||
{{- if and .Values.service.http.clusterIP (eq .Values.service.http.type "ClusterIP") }}
|
||||
clusterIP: {{ .Values.service.http.clusterIP }}
|
||||
{{- end }}
|
||||
{{- if (or (eq .Values.service.http.type "LoadBalancer") (eq .Values.service.http.type "NodePort")) }}
|
||||
externalTrafficPolicy: {{ .Values.service.http.externalTrafficPolicy | quote }}
|
||||
{{- end }}
|
||||
{{- if (and (eq .Values.service.http.type "LoadBalancer") .Values.service.http.loadBalancerSourceRanges) }}
|
||||
loadBalancerSourceRanges: {{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if (and (eq .Values.service.http.type "LoadBalancer") (not (empty .Values.service.http.loadBalancerIP))) }}
|
||||
loadBalancerIP: {{ .Values.service.http.loadBalancerIP }}
|
||||
{{- end }}
|
||||
ports:
|
||||
{{- if not (empty .Values.service.http.ports.http) }}
|
||||
- name: http
|
||||
port: {{ .Values.service.http.ports.http }}
|
||||
protocol: TCP
|
||||
targetPort: http
|
||||
{{- if (and (or (eq .Values.service.http.type "NodePort") (eq .Values.service.http.type "LoadBalancer")) (not (empty .Values.service.http.nodePorts.http))) }}
|
||||
nodePort: {{ .Values.service.http.nodePorts.http }}
|
||||
{{- else if eq .Values.service.http.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if not (empty .Values.service.http.ports.https) }}
|
||||
- name: https
|
||||
port: {{ .Values.service.http.ports.https }}
|
||||
protocol: TCP
|
||||
targetPort: https
|
||||
{{- if (and (or (eq .Values.service.http.type "NodePort") (eq .Values.service.http.type "LoadBalancer")) (not (empty .Values.service.http.nodePorts.https))) }}
|
||||
nodePort: {{ .Values.service.http.nodePorts.https }}
|
||||
{{- else if eq .Values.service.http.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
selector:
|
||||
{{- include "common.labels.matchLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: server
|
||||
{{- end }}
|
||||
692
charts/invoiceninja/values.yaml
Normal file
692
charts/invoiceninja/values.yaml
Normal file
@@ -0,0 +1,692 @@
|
||||
# Default values for invoiceninja.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
## Global Docker image parameters
|
||||
## Please, note that this will override the image parameters, including dependencies, configured to use the global value
|
||||
## Current available global Docker image parameters: imageRegistry, imagePullSecrets and storageClass
|
||||
##
|
||||
# global:
|
||||
# imageRegistry: myRegistryName
|
||||
# imagePullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
# storageClass: myStorageClass
|
||||
|
||||
## Invoice Ninja image version
|
||||
## ref: https://github.com/invoiceninja/dockerfiles
|
||||
##
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: invoiceninja/invoiceninja
|
||||
tag: 5.6.24
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
##
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
|
||||
## String to turn on debug mode in Invoice Ninja
|
||||
##
|
||||
debug: false
|
||||
|
||||
## A 32 character long Application Key
|
||||
##
|
||||
appKey: ""
|
||||
|
||||
## Override app URL
|
||||
##
|
||||
appURL: ""
|
||||
|
||||
## Email of user to create first run
|
||||
## If not specified, default user email will be "admin@example.com"
|
||||
##
|
||||
userEmail: ""
|
||||
|
||||
## Password of user to create on first run
|
||||
## If not specified, default user password will be "changeme!"
|
||||
##
|
||||
userPassword: ""
|
||||
|
||||
## Name of log channel to use
|
||||
##
|
||||
logChannel: ""
|
||||
|
||||
## Name of broadcast driver to use
|
||||
##
|
||||
broadcastDriver: ""
|
||||
|
||||
## Name of cache driver to use
|
||||
##
|
||||
cacheDriver: ""
|
||||
|
||||
## Name of session driver to use
|
||||
##
|
||||
sessionDriver: ""
|
||||
|
||||
## Name of queue connection to use
|
||||
##
|
||||
queueConnection: ""
|
||||
|
||||
## List of trusted proxies for Invoice Ninja to communicate with the nginx proxy
|
||||
##
|
||||
trustedProxies: "*"
|
||||
|
||||
## Use local or Phantom JS PDF generation
|
||||
## Options are `snappdf` or `phantom`
|
||||
##
|
||||
pdfGenerator: snappdf
|
||||
|
||||
## Name of queue connection to use (use "log" for debug)
|
||||
## Please check the ref below for any other env you may need to define
|
||||
## ref: https://github.com/invoiceninja/invoiceninja/blob/v5-stable/config/mail.php
|
||||
##
|
||||
mailer: log
|
||||
|
||||
## Force HTTPS for all connections to Invoice Ninja
|
||||
##
|
||||
requireHttps: false
|
||||
|
||||
## Name of existing secret containing IN credentials
|
||||
## NOTE: Must contain key `APP_KEY` and `IN_PASSWORD`
|
||||
## NOTE: When it's set, the `appKey` and `userPassword` parameter is ignored
|
||||
##
|
||||
existingSecret:
|
||||
|
||||
## String to partially override fullname template (will maintain the release name)
|
||||
##
|
||||
# nameOverride:
|
||||
|
||||
## String to fully override fullname template
|
||||
##
|
||||
# fullnameOverride:
|
||||
|
||||
## Add labels to all the deployed resources
|
||||
##
|
||||
commonLabels: {}
|
||||
|
||||
## Add annotations to all the deployed resources
|
||||
##
|
||||
commonAnnotations: {}
|
||||
|
||||
serviceAccount:
|
||||
# Specifies whether a service account should be created
|
||||
create: true
|
||||
# Annotations to add to the service account
|
||||
annotations: {}
|
||||
# The name of the service account to use.
|
||||
# If not set and create is true, a name is generated using the fullname template
|
||||
name: ""
|
||||
|
||||
## Pod Labels
|
||||
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
|
||||
##
|
||||
podLabels: {}
|
||||
|
||||
## Pod annotations
|
||||
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
|
||||
##
|
||||
podAnnotations: {}
|
||||
|
||||
## Pod affinity preset
|
||||
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
|
||||
## Allowed values: soft, hard
|
||||
##
|
||||
podAffinityPreset: ""
|
||||
|
||||
## Pod anti-affinity preset
|
||||
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
|
||||
## Allowed values: soft, hard
|
||||
##
|
||||
podAntiAffinityPreset: soft
|
||||
|
||||
## Node affinity preset
|
||||
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
|
||||
## Allowed values: soft, hard
|
||||
##
|
||||
nodeAffinityPreset:
|
||||
## Node affinity type
|
||||
## Allowed values: soft, hard
|
||||
##
|
||||
type: ""
|
||||
## Node label key to match
|
||||
## E.g.
|
||||
## key: "kubernetes.io/e2e-az-name"
|
||||
##
|
||||
key: ""
|
||||
## Node label values to match
|
||||
## E.g.
|
||||
## values:
|
||||
## - e2e-az1
|
||||
## - e2e-az2
|
||||
##
|
||||
values: []
|
||||
|
||||
## Affinity for pod assignment. Evaluated as a template.
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
## Note: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set
|
||||
##
|
||||
affinity: {}
|
||||
|
||||
## Node labels for pod assignment. Evaluated as a template.
|
||||
## ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
##
|
||||
nodeSelector: {}
|
||||
|
||||
## Tolerations for pod assignment. Evaluated as a template.
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
##
|
||||
tolerations: []
|
||||
|
||||
## Configure Pods Security Context
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
|
||||
##
|
||||
podSecurityContext:
|
||||
fsGroup: 1500
|
||||
|
||||
## Configure Container Security Context (only main container)
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
|
||||
##
|
||||
containerSecurityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: 1500
|
||||
# runAsGroup: 1500
|
||||
# capabilities:
|
||||
# drop:
|
||||
# - ALL
|
||||
# readOnlyRootFilesystem: true
|
||||
|
||||
## Init containers parameters:
|
||||
## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section.
|
||||
##
|
||||
volumePermissions:
|
||||
enabled: false
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/bitnami-shell
|
||||
tag: "10"
|
||||
pullPolicy: Always
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
resources: {}
|
||||
|
||||
## Number of replicas (requires ReadWriteMany PVC support)
|
||||
##
|
||||
replicaCount: 1
|
||||
|
||||
## Set up update strategy for Invoice Ninja installation. Set to Recreate if you use persistent volume that cannot be mounted by more than one pods to makesure the pods is destroyed first.
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy
|
||||
## Example:
|
||||
## updateStrategy:
|
||||
## type: RollingUpdate
|
||||
## rollingUpdate:
|
||||
## maxSurge: 25%
|
||||
## maxUnavailable: 25%
|
||||
##
|
||||
updateStrategy:
|
||||
type: RollingUpdate
|
||||
|
||||
## Container ports
|
||||
##
|
||||
containerPorts:
|
||||
fastcgi: 9000
|
||||
|
||||
## An array to add extra env vars
|
||||
## Example:
|
||||
## extraEnvVars:
|
||||
## - name: FOO
|
||||
## value: "bar"
|
||||
##
|
||||
extraEnvVars: []
|
||||
|
||||
## ConfigMap with extra environment variables
|
||||
##
|
||||
extraEnvVarsCM:
|
||||
|
||||
## Secret with extra environment variables
|
||||
##
|
||||
extraEnvVarsSecret:
|
||||
|
||||
## Extra volume mounts to add to the container
|
||||
##
|
||||
extraVolumeMounts: []
|
||||
|
||||
## Configure extra options for liveness and readiness probes
|
||||
## This applies to all the Invoice Ninja in the cluster
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
|
||||
##
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 120
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 6
|
||||
successThreshold: 1
|
||||
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
|
||||
|
||||
## Inline http server (this is enabled only if nginx sub chart is disabled).
|
||||
##
|
||||
http:
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/nginx
|
||||
tag: 1.22.1-debian-11-r21
|
||||
## 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
|
||||
|
||||
## Container ports
|
||||
##
|
||||
containerPorts:
|
||||
http: 8080
|
||||
https: 8443
|
||||
|
||||
## 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 volume mounts to add to the container
|
||||
##
|
||||
extraVolumeMounts: []
|
||||
|
||||
## Configure extra options for liveness and readiness probes
|
||||
## This applies to all the web server in the cluster
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
|
||||
##
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 6
|
||||
successThreshold: 1
|
||||
readinessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 15
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 6
|
||||
successThreshold: 1
|
||||
|
||||
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
|
||||
|
||||
## Extra volumes to add to the deployment
|
||||
##
|
||||
extraVolumes: []
|
||||
|
||||
## 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: {}
|
||||
## Service for http server
|
||||
##
|
||||
http:
|
||||
## Service type
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
|
||||
##
|
||||
type: ClusterIP
|
||||
## Service ports
|
||||
##
|
||||
ports:
|
||||
http: 8080
|
||||
https: 8443
|
||||
## Specify the nodePort value for the LoadBalancer and NodePort service types.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
|
||||
##
|
||||
nodePorts:
|
||||
http: ""
|
||||
https: ""
|
||||
## 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 the ingress resource to access IN (this is enabled only if nginx sub chart is disabled).
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/
|
||||
##
|
||||
ingress:
|
||||
## Enable ingress
|
||||
##
|
||||
enabled: true
|
||||
## Add the corresponding annotations for cert-manager integration
|
||||
##
|
||||
certManager: false
|
||||
## Ingress path type
|
||||
##
|
||||
pathType: ImplementationSpecific
|
||||
## Force Ingress API version (automatically detected if not set)
|
||||
##
|
||||
apiVersion:
|
||||
## IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+)
|
||||
## This is supported in Kubernetes 1.18+ and required if you have more than one IngressClass marked as the default for your cluster .
|
||||
## ref: https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/
|
||||
##
|
||||
ingressClassName:
|
||||
## Default host for the ingress record
|
||||
##
|
||||
hostname: invoiceninja.local
|
||||
## Default path for the ingress record
|
||||
## NOTE: You may need to set this to '/*' in order to use this with ALB ingress controllers
|
||||
##
|
||||
path: /
|
||||
## Additional custom annotations for the ingress record
|
||||
## NOTE: If `ingress.certManager=true`, annotation `kubernetes.io/tls-acme: "true"` will automatically be added
|
||||
##
|
||||
annotations: {}
|
||||
## Enable TLS configuration for the host defined at `ingress.hostname` parameter
|
||||
## TLS certificates will be retrieved from a TLS secret with name: `{{- printf "%s-tls" .Values.ingress.hostname }}`
|
||||
## You can:
|
||||
## - Use the `ingress.secrets` parameter to create this TLS secret
|
||||
## - Relay on cert-manager to create it by setting `ingress.certManager=true`
|
||||
## - Relay on Helm to create self-signed certificates by setting `ingress.tls=true` and `ingress.certManager=false`
|
||||
##
|
||||
tls: false
|
||||
## An array with additional hostname(s) to be covered with the ingress record
|
||||
## e.g:
|
||||
## extraHosts:
|
||||
## - name: invoiceninja.local
|
||||
## path: /
|
||||
##
|
||||
extraHosts: []
|
||||
## An array with additional arbitrary paths that may need to be added to the ingress under the main host
|
||||
## e.g:
|
||||
## extraPaths:
|
||||
## - path: /*
|
||||
## backend:
|
||||
## serviceName: ssl-redirect
|
||||
## servicePort: use-annotation
|
||||
##
|
||||
extraPaths: []
|
||||
## TLS configuration for additional hostname(s) to be covered with this ingress record
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/#tls
|
||||
## e.g:
|
||||
## extraTls:
|
||||
## - hosts:
|
||||
## - invoiceninja.local
|
||||
## secretName: invoiceninja.local-tls
|
||||
##
|
||||
extraTls: []
|
||||
## Custom TLS certificates as secrets
|
||||
## NOTE: 'key' and 'certificate' are expected in PEM format
|
||||
## NOTE: 'name' should line up with a 'secretName' set further up
|
||||
## If it is not set and you're using cert-manager, this is unneeded, as it will create a secret for you with valid certificates
|
||||
## If it is not set and you're NOT using cert-manager either, self-signed certificates will be created valid for 365 days
|
||||
## It is also possible to create and manage the certificates outside of this helm chart
|
||||
## Please see README.md for more information
|
||||
## e.g:
|
||||
## secrets:
|
||||
## - name: invoiceninja.local-tls
|
||||
## key: |-
|
||||
## -----BEGIN RSA PRIVATE KEY-----
|
||||
## ...
|
||||
## -----END RSA PRIVATE KEY-----
|
||||
## certificate: |-
|
||||
## -----BEGIN CERTIFICATE-----
|
||||
## ...
|
||||
## -----END CERTIFICATE-----
|
||||
##
|
||||
secrets: []
|
||||
|
||||
## Enable persistence using Persistent Volume Claims
|
||||
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
|
||||
##
|
||||
persistence:
|
||||
public:
|
||||
enabled: true
|
||||
## Invoice Ninja data Persistent Volume Storage Class
|
||||
## If defined, storageClassName: <storageClass>
|
||||
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
## If undefined (the default) or set to null, no storageClassName spec is
|
||||
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||
## GKE, AWS & OpenStack)
|
||||
##
|
||||
# storageClass: "-"
|
||||
##
|
||||
## If you want to reuse an existing claim, you can pass the name of the PVC using
|
||||
## the existingClaim variable
|
||||
# existingClaim: your-claim
|
||||
accessMode: ReadWriteOnce
|
||||
size: 1Gi
|
||||
## Custom dataSource
|
||||
##
|
||||
dataSource: {}
|
||||
storage:
|
||||
## Only required when using FILE cache or session driver
|
||||
enabled: false
|
||||
## Invoice Ninja data Persistent Volume Storage Class
|
||||
## If defined, storageClassName: <storageClass>
|
||||
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
## If undefined (the default) or set to null, no storageClassName spec is
|
||||
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||
## GKE, AWS & OpenStack)
|
||||
##
|
||||
# storageClass: "-"
|
||||
##
|
||||
## If you want to reuse an existing claim, you can pass the name of the PVC using
|
||||
## the existingClaim variable
|
||||
# existingClaim: your-claim
|
||||
accessMode: ReadWriteMany
|
||||
size: 10Gi
|
||||
## Custom dataSource
|
||||
##
|
||||
dataSource: {}
|
||||
|
||||
autoscaling:
|
||||
enabled: false
|
||||
minReplicas: 1
|
||||
maxReplicas: 10
|
||||
targetCPUUtilizationPercentage: 80
|
||||
# targetMemoryUtilizationPercentage: 80
|
||||
|
||||
## Redis chart configuration
|
||||
## ref: https://github.com/bitnami/charts/blob/master/bitnami/redis/values.yaml
|
||||
##
|
||||
redis:
|
||||
enabled: true
|
||||
auth:
|
||||
sentinel: false
|
||||
sentinel:
|
||||
enabled: true
|
||||
quorum: 1
|
||||
replica:
|
||||
replicaCount: 1
|
||||
|
||||
## External Redis Configuration
|
||||
##
|
||||
## All of these values are only used when redis.enabled is set to false
|
||||
##
|
||||
externalRedis:
|
||||
## Redis/Sentinel host
|
||||
##
|
||||
host: ""
|
||||
## Redis/Sentinel port number
|
||||
##
|
||||
port: 6379
|
||||
## Redis password
|
||||
##
|
||||
password: ""
|
||||
## Use existing secret (ignores previous password)
|
||||
## must contain key `redis-password`
|
||||
## NOTE: When it's set, the `externalRedis.password` parameter is ignored
|
||||
##
|
||||
# existingSecret:
|
||||
## Whether Redis Sentinel are used
|
||||
sentinel: false
|
||||
## Redis databases
|
||||
##
|
||||
databases:
|
||||
default: "0"
|
||||
cache: "1"
|
||||
|
||||
## MariaDB chart configuration
|
||||
## ref: https://github.com/bitnami/charts/blob/master/bitnami/mariadb/values.yaml
|
||||
##
|
||||
mariadb:
|
||||
## Whether to deploy a MariaDB server to satisfy the applications database requirements.
|
||||
## To use an external database set this to false and configure the externaldb parameters
|
||||
##
|
||||
enabled: true
|
||||
## MariaDB Authentication parameters
|
||||
##
|
||||
auth:
|
||||
## MariaDB root password
|
||||
##
|
||||
# rootPassword: changeit
|
||||
## MariaDB custom user and database
|
||||
##
|
||||
username: invoiceninja
|
||||
database: invoiceninja
|
||||
# password: changeit
|
||||
|
||||
## External Database Configuration
|
||||
##
|
||||
## All of these values are only used when mariadb.enabled is set to false
|
||||
##
|
||||
externalDatabase:
|
||||
## Database host
|
||||
##
|
||||
host: ""
|
||||
## non-root Username for Invoice Ninja Database
|
||||
##
|
||||
user: invoiceninja
|
||||
## Database password
|
||||
##
|
||||
password: ""
|
||||
## Database name
|
||||
##
|
||||
database: invoiceninja
|
||||
## Database port number
|
||||
##
|
||||
port: 3306
|
||||
## Use existing secret (ignores previous password)
|
||||
## must contain key `mariadb-password`
|
||||
## NOTE: When it's set, the `externalDatabase.password` parameter is ignored
|
||||
##
|
||||
# existingSecret:
|
||||
|
||||
## Nginx chart configuration
|
||||
## ref: https://github.com/bitnami/charts/blob/master/bitnami/nginx/values.yaml
|
||||
##
|
||||
nginx:
|
||||
enabled: false
|
||||
service:
|
||||
## Service type
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
|
||||
##
|
||||
type: ClusterIP
|
||||
## Configure the ingress resource that allows you to access the Invoice Ninja
|
||||
## ref: http://kubernetes.io/docs/user-guide/ingress/
|
||||
##
|
||||
ingress:
|
||||
enabled: true
|
||||
hostname: invoiceninja.local
|
||||
## Use the serverblock config map from Invoice Ninja
|
||||
##
|
||||
existingServerBlockConfigmap: '{{ include "invoiceninja.nginx.serverBlockName" . }}'
|
||||
## Use the public PVC created by Invoice Ninja
|
||||
##
|
||||
staticSitePVC: '{{ include "invoiceninja.public.storageName" . }}'
|
||||
6
config/caddy/Caddyfile
Normal file
6
config/caddy/Caddyfile
Normal 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
3
config/cron/cronjob_v5.sh
Executable 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
1
config/hosts
Normal file
@@ -0,0 +1 @@
|
||||
192.168.0.124 in5.test
|
||||
12
config/mysql/Dockerfile
Normal file
12
config/mysql/Dockerfile
Normal file
@@ -0,0 +1,12 @@
|
||||
FROM mysql:8
|
||||
# When running on ARM64 use MariaDB instead of MySQL
|
||||
#FROM mariadb:10.4
|
||||
ENV force_color_prompt yes
|
||||
|
||||
RUN apt-get update;
|
||||
RUN apt-get install -y cron;
|
||||
|
||||
ENTRYPOINT \
|
||||
service cron start; \
|
||||
printenv | grep -v "no_proxy" >> /etc/environment; \
|
||||
docker-entrypoint.sh mysqld
|
||||
28
config/mysql/backup-script
Normal file
28
config/mysql/backup-script
Normal 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;
|
||||
34
config/nginx/in-vhost.conf
Normal file
34
config/nginx/in-vhost.conf
Normal file
@@ -0,0 +1,34 @@
|
||||
server {
|
||||
listen 80 default_server;
|
||||
server_name _;
|
||||
|
||||
server_tokens off;
|
||||
|
||||
client_max_body_size 100M;
|
||||
|
||||
root /var/www/app/public/;
|
||||
index index.php;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
location = /robots.txt { access_log off; log_not_found off; }
|
||||
|
||||
|
||||
location ~* /storage/.*\.php$ {
|
||||
return 503;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
18
config/php/php-cli.ini
Normal file
18
config/php/php-cli.ini
Normal file
@@ -0,0 +1,18 @@
|
||||
session.auto_start = Off
|
||||
short_open_tag = Off
|
||||
|
||||
error_reporting = E_ALL & ~E_NOTICE & ~E_WARNING & ~E_STRICT & ~E_DEPRECATED
|
||||
|
||||
; opcache.enable_cli=1
|
||||
; opcache.fast_shutdown=1
|
||||
; opcache.memory_consumption=256
|
||||
; opcache.interned_strings_buffer=8
|
||||
; opcache.max_accelerated_files=4000
|
||||
; opcache.revalidate_freq=60
|
||||
; # http://symfony.com/doc/current/performance.html
|
||||
; realpath_cache_size = 4096K
|
||||
; realpath_cache_ttl = 600
|
||||
|
||||
memory_limit = 2G
|
||||
post_max_size = 60M
|
||||
upload_max_filesize = 50M
|
||||
21
config/php/php.ini
Normal file
21
config/php/php.ini
Normal file
@@ -0,0 +1,21 @@
|
||||
session.auto_start = Off
|
||||
short_open_tag = Off
|
||||
|
||||
error_reporting = E_ALL & ~E_NOTICE & ~E_WARNING & ~E_STRICT & ~E_DEPRECATED
|
||||
|
||||
; opcache.enable=1
|
||||
; opcache.preload=/var/www/app/preload.php
|
||||
; opcache.preload_user=www-data
|
||||
|
||||
; ; The OPcache shared memory storage size.
|
||||
; opcache.max_accelerated_files=300000
|
||||
; opcache.validate_timestamps=1
|
||||
; opcache.revalidate_freq=30
|
||||
; opcache.jit_buffer_size=256M
|
||||
; opcache.jit=1205
|
||||
; opcache.memory_consumption=1024M
|
||||
|
||||
|
||||
post_max_size = 60M
|
||||
upload_max_filesize = 50M
|
||||
memory_limit=512M
|
||||
@@ -1,21 +1,89 @@
|
||||
db:
|
||||
image: mysql
|
||||
environment:
|
||||
MYSQL_DATABASE: ninja
|
||||
MYSQL_ROOT_PASSWORD: mdp
|
||||
version: '3.7'
|
||||
|
||||
app:
|
||||
image: lalop/invoice-ninja:2.4.4
|
||||
links:
|
||||
- db:mysql
|
||||
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
|
||||
|
||||
web:
|
||||
image: nginx
|
||||
volumes:
|
||||
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
links:
|
||||
- app
|
||||
volumes_from:
|
||||
- app
|
||||
ports:
|
||||
- 80
|
||||
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
|
||||
- ./config/php/php.ini:/usr/local/etc/php/php.ini
|
||||
- ./config/php/php-cli.ini:/usr/local/etc/php/php-cli.ini
|
||||
|
||||
depends_on:
|
||||
- db
|
||||
networks:
|
||||
- invoiceninja
|
||||
extra_hosts:
|
||||
- "in5.localhost:192.168.0.124 " #host and ip
|
||||
|
||||
db:
|
||||
image: mysql:8
|
||||
# When running on ARM64 use MariaDB instead of MySQL
|
||||
# image: mariadb:10.4
|
||||
# For auto DB backups comment out image and use the build block below
|
||||
# build:
|
||||
# context: ./config/mysql
|
||||
ports:
|
||||
- "3305:3306"
|
||||
restart: always
|
||||
env_file: env
|
||||
volumes:
|
||||
- ./docker/mysql/data:/var/lib/mysql:rw,delegated
|
||||
|
||||
# remove comments for next 4 lines if you want auto sql backups
|
||||
#- ./docker/mysql/bak:/backups:rw
|
||||
#- ./config/mysql/backup-script:/etc/cron.daily/daily:ro
|
||||
#- ./config/mysql/backup-script:/etc/cron.weekly/weekly:ro
|
||||
#- ./config/mysql/backup-script:/etc/cron.monthly/monthly:ro
|
||||
networks:
|
||||
- invoiceninja
|
||||
extra_hosts:
|
||||
- "in5.localhost:192.168.0.124 " #host and ip
|
||||
|
||||
# THIS IS ONLY A VALID CONFIGURATION FOR IN 4. DO NOT USE FOR IN 5.
|
||||
# cron:
|
||||
# image: invoiceninja/invoiceninja:alpine-4
|
||||
# volumes:
|
||||
# - ./docker/app/public:/var/www/app/public:rw,delegated
|
||||
# - ./docker/app/storage:/var/www/app/storage:rw,delegated
|
||||
# - ./docker/app/public/logo:/var/www/app/public/logo:rw,delegated
|
||||
# entrypoint: |
|
||||
# /bin/sh -c 'sh -s <<EOF
|
||||
# trap "break;exit" SIGHUP SIGINT SIGTERM
|
||||
# sleep 300s
|
||||
# while /bin/true; do
|
||||
# ./artisan ninja:send-invoices
|
||||
# ./artisan ninja:send-reminders
|
||||
# sleep 1d
|
||||
# done
|
||||
# EOF'
|
||||
# networks:
|
||||
# - invoiceninja
|
||||
#
|
||||
|
||||
networks:
|
||||
invoiceninja:
|
||||
|
||||
1
docker/app/public/.keep
Normal file
1
docker/app/public/.keep
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
1
docker/app/storage/.keep
Normal file
1
docker/app/storage/.keep
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
49
env
Normal file
49
env
Normal file
@@ -0,0 +1,49 @@
|
||||
# IN application vars
|
||||
APP_URL=http://in.localhost:8003
|
||||
APP_KEY=<insert your generated key in here>
|
||||
APP_DEBUG=true
|
||||
REQUIRE_HTTPS=false
|
||||
PHANTOMJS_PDF_GENERATION=false
|
||||
PDF_GENERATOR=snappdf
|
||||
TRUSTED_PROXIES='*'
|
||||
|
||||
|
||||
QUEUE_CONNECTION=database
|
||||
|
||||
# DB connection
|
||||
DB_HOST=db
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=ninja
|
||||
DB_USERNAME=ninja
|
||||
DB_PASSWORD=ninja
|
||||
|
||||
# Create initial user
|
||||
# Default to these values if empty
|
||||
# IN_USER_EMAIL=admin@example.com
|
||||
# IN_PASSWORD=changeme!
|
||||
IN_USER_EMAIL=
|
||||
IN_PASSWORD=
|
||||
|
||||
# Mail options
|
||||
MAIL_MAILER=log
|
||||
MAIL_HOST=smtp.mailtrap.io
|
||||
MAIL_PORT=2525
|
||||
MAIL_USERNAME=null
|
||||
MAIL_PASSWORD=null
|
||||
MAIL_ENCRYPTION=null
|
||||
MAIL_FROM_ADDRESS='user@example.com'
|
||||
MAIL_FROM_NAME='Self Hosted User'
|
||||
|
||||
# MySQL
|
||||
MYSQL_ROOT_PASSWORD=ninjaAdm1nPassword
|
||||
MYSQL_USER=ninja
|
||||
MYSQL_PASSWORD=ninja
|
||||
MYSQL_DATABASE=ninja
|
||||
|
||||
# GoCardless/Nordigen API key for banking integration
|
||||
NORDIGEN_SECRET_ID=
|
||||
NORDIGEN_SECRET_KEY=
|
||||
|
||||
# V4 env vars
|
||||
# DB_STRICT=false
|
||||
# APP_CIPHER=AES-256-CBC
|
||||
13
examples/v5/supervisor/Dockerfile
Normal file
13
examples/v5/supervisor/Dockerfile
Normal 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"]
|
||||
29
examples/v5/supervisor/supervisord.conf
Normal file
29
examples/v5/supervisor/supervisord.conf
Normal 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
|
||||
50
nginx.conf
50
nginx.conf
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user