mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-17 15:13:55 +00:00
Compare commits
623 Commits
2021.11.0-
...
feat/user-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cb3fb3c9e8 | ||
|
|
d4692d2d07 | ||
|
|
a1e4657e62 | ||
|
|
fabe14db49 | ||
|
|
4d3464f3f1 | ||
|
|
d6de14123b | ||
|
|
247855c2cf | ||
|
|
364f73c9d9 | ||
|
|
7723cb0a41 | ||
|
|
0e0bb09533 | ||
|
|
417a65a3af | ||
|
|
3c131f853d | ||
|
|
cca9b3e21d | ||
|
|
e81cddd108 | ||
|
|
1bc566c69a | ||
|
|
4f8104737e | ||
|
|
de43778eb9 | ||
|
|
3310f0a069 | ||
|
|
05b8899de6 | ||
|
|
7a85cb5f39 | ||
|
|
380ea202dc | ||
|
|
83d99f35f9 | ||
|
|
0f85646c69 | ||
|
|
75afcc2fce | ||
|
|
94b2d8996d | ||
|
|
72b6eeba75 | ||
|
|
68a514e589 | ||
|
|
2df678e96a | ||
|
|
8dbfff1873 | ||
|
|
c83705157c | ||
|
|
c5d4e4d8ca | ||
|
|
e70525b2ff | ||
|
|
c5e91ff823 | ||
|
|
5cec41319d | ||
|
|
eb22d4cadc | ||
|
|
a0a046f9f6 | ||
|
|
9210044b8d | ||
|
|
df203d4b4b | ||
|
|
16a958d129 | ||
|
|
76628e8ccc | ||
|
|
e8f3fd2d71 | ||
|
|
fac72eac9d | ||
|
|
f4eac20ff8 | ||
|
|
e3a29180fd | ||
|
|
51f1a08f6e | ||
|
|
5a507f800f | ||
|
|
ab47b06ba9 | ||
|
|
7001f2bcba | ||
|
|
8d7a5275a8 | ||
|
|
30fa6d02c7 | ||
|
|
a18cf3348a | ||
|
|
a84cdaf355 | ||
|
|
23c8fc65a4 | ||
|
|
f8acb832f1 | ||
|
|
b6dbcbde02 | ||
|
|
f5f09302b2 | ||
|
|
512fa7fbd4 | ||
|
|
9458005b5b | ||
|
|
b1be888dd4 | ||
|
|
4f9de809f8 | ||
|
|
1fb04c069c | ||
|
|
fd2431046c | ||
|
|
19ee3f58f8 | ||
|
|
8d0bdb60f0 | ||
|
|
0f23414198 | ||
|
|
40ebddadff | ||
|
|
08556a63b8 | ||
|
|
ea7046f93d | ||
|
|
6768795594 | ||
|
|
e7236212d8 | ||
|
|
3e3abda71e | ||
|
|
f67d3948d2 | ||
|
|
bc3c3db080 | ||
|
|
691be801d8 | ||
|
|
56b9326c09 | ||
|
|
b6ea33dce1 | ||
|
|
367876e8b8 | ||
|
|
eb096142d6 | ||
|
|
9ccd5bdee7 | ||
|
|
dc05029ef5 | ||
|
|
926a3a5688 | ||
|
|
b27556e1eb | ||
|
|
64521f7a39 | ||
|
|
b4ca00bd3b | ||
|
|
bca7b79f77 | ||
|
|
2e0c8901a1 | ||
|
|
3e6ef1a605 | ||
|
|
d9a55ae938 | ||
|
|
7e843ea100 | ||
|
|
b241f74615 | ||
|
|
c5460941c4 | ||
|
|
890425a8b6 | ||
|
|
8c5c4664ea | ||
|
|
901b889f2d | ||
|
|
cf1dd9f9e1 | ||
|
|
8ef3fe199f | ||
|
|
97fe6b1f14 | ||
|
|
4af80debe2 | ||
|
|
513492192b | ||
|
|
e0b4a819b1 | ||
|
|
5c0cf11bfe | ||
|
|
63a884ea75 | ||
|
|
7c7090a582 | ||
|
|
fc70a976bd | ||
|
|
0de90b134c | ||
|
|
6eca74698b | ||
|
|
7c85f0926c | ||
|
|
4ff158266a | ||
|
|
fda8981028 | ||
|
|
7f44a04490 | ||
|
|
818ab46b73 | ||
|
|
5ae5733741 | ||
|
|
2042450f9b | ||
|
|
676b0f88cf | ||
|
|
65d6c5bb32 | ||
|
|
5168698498 | ||
|
|
f512b9510c | ||
|
|
ba71a7f5a2 | ||
|
|
1ebe9d3f47 | ||
|
|
d9bddabbf8 | ||
|
|
3c3aea9c86 | ||
|
|
3806364197 | ||
|
|
e9d3512383 | ||
|
|
09cc5003cd | ||
|
|
1781ca282a | ||
|
|
ba08a5d8f1 | ||
|
|
b1e00b43be | ||
|
|
a2499a8713 | ||
|
|
07665d7571 | ||
|
|
4587b32480 | ||
|
|
15869fd774 | ||
|
|
2e24bdfff8 | ||
|
|
1f8a3d85d1 | ||
|
|
f359324bea | ||
|
|
e0ff1365cf | ||
|
|
b347a7d0bf | ||
|
|
977ac22df9 | ||
|
|
323d41603c | ||
|
|
8dadfecf28 | ||
|
|
5f1d7c6d31 | ||
|
|
7ba6ef9ad8 | ||
|
|
eb1170408f | ||
|
|
c50c9988fc | ||
|
|
d46384f68a | ||
|
|
b7f8239235 | ||
|
|
f31c57b897 | ||
|
|
5d68a57910 | ||
|
|
3886bca93f | ||
|
|
48f79f54bf | ||
|
|
179bb267fb | ||
|
|
1458329e97 | ||
|
|
fdddece984 | ||
|
|
700703fe8c | ||
|
|
3131a340d4 | ||
|
|
a57adc04ff | ||
|
|
4cb227629f | ||
|
|
932cd8f89e | ||
|
|
f2f8d58d3b | ||
|
|
b7bbe1b0a6 | ||
|
|
1dd9a2e6e0 | ||
|
|
aa7b997697 | ||
|
|
eb6c7c98f0 | ||
|
|
3472c67ca8 | ||
|
|
8995e63b72 | ||
|
|
b65f108917 | ||
|
|
2b374a2073 | ||
|
|
b5b164d5d3 | ||
|
|
0cde40604e | ||
|
|
22f2eb7308 | ||
|
|
4a1d2d2b80 | ||
|
|
10922b261b | ||
|
|
de0188de3d | ||
|
|
2b093ad421 | ||
|
|
0ec73b141f | ||
|
|
de0bb14abd | ||
|
|
26809ef1f0 | ||
|
|
dca4f86fa6 | ||
|
|
eb0c30d134 | ||
|
|
c55cce628d | ||
|
|
240238013b | ||
|
|
18f0f0ceee | ||
|
|
c424fe1c7b | ||
|
|
eb694463c5 | ||
|
|
469afb3200 | ||
|
|
8f8acc40f5 | ||
|
|
7dbd8256ea | ||
|
|
66468975e0 | ||
|
|
6d27ce8461 | ||
|
|
b0817f2a83 | ||
|
|
21602a79e7 | ||
|
|
8a42dfe232 | ||
|
|
d02bbb798e | ||
|
|
cbbc817279 | ||
|
|
18d8aba20f | ||
|
|
09834c289a | ||
|
|
880dca1ae5 | ||
|
|
b1e33d4049 | ||
|
|
284c260886 | ||
|
|
05bbb45046 | ||
|
|
d11fe229df | ||
|
|
b7801565c2 | ||
|
|
bd4760e504 | ||
|
|
edc25b216f | ||
|
|
5499867ae8 | ||
|
|
e4c575c130 | ||
|
|
f29f098b26 | ||
|
|
1d751ab2bc | ||
|
|
4f87662664 | ||
|
|
7e2937aa8d | ||
|
|
529781adda | ||
|
|
977d082638 | ||
|
|
c506cf11ac | ||
|
|
967d5159ea | ||
|
|
79f978359c | ||
|
|
4c7bb313be | ||
|
|
83d3555eab | ||
|
|
e93cc569c6 | ||
|
|
5c0cf03548 | ||
|
|
00cae995a7 | ||
|
|
4ba0a9c98c | ||
|
|
6520655d6c | ||
|
|
6bd722b11b | ||
|
|
4576882f07 | ||
|
|
224553f695 | ||
|
|
cc100fd8bb | ||
|
|
a7a0e54cb9 | ||
|
|
ce32eb8d4f | ||
|
|
39519427bb | ||
|
|
2f1fed822c | ||
|
|
bf5824b6e5 | ||
|
|
52bf2ae094 | ||
|
|
fa4a0e92ce | ||
|
|
c15e231d7e | ||
|
|
cc885276f5 | ||
|
|
9dee47cb6d | ||
|
|
39611fa9cb | ||
|
|
bb56de694a | ||
|
|
c4d4d2bcc1 | ||
|
|
4e44f33db9 | ||
|
|
58c085527f | ||
|
|
79fa4b95c3 | ||
|
|
d5f1660c77 | ||
|
|
3a3b5fc002 | ||
|
|
eccc989887 | ||
|
|
c4aa105042 | ||
|
|
ffcb76f73f | ||
|
|
bee39343a6 | ||
|
|
e9326db933 | ||
|
|
dd1cc82fcd | ||
|
|
93825895b9 | ||
|
|
492aebc718 | ||
|
|
e66b2eda60 | ||
|
|
3bb21d8581 | ||
|
|
fb6fa9b7d7 | ||
|
|
0718a62007 | ||
|
|
529d92fa63 | ||
|
|
f7836abc06 | ||
|
|
cd09a932f9 | ||
|
|
46d21f58cf | ||
|
|
3e63be9988 | ||
|
|
aaaf7796b0 | ||
|
|
aba10c1d99 | ||
|
|
c4dd0d2bae | ||
|
|
6c636c3d9c | ||
|
|
9098b198c3 | ||
|
|
927ec2a2c3 | ||
|
|
07a251b544 | ||
|
|
b8e163d8b1 | ||
|
|
cd72acb6c6 | ||
|
|
24942a6f04 | ||
|
|
75dcc746f8 | ||
|
|
263a10848a | ||
|
|
ff4d46d509 | ||
|
|
66ead9128a | ||
|
|
55ff76a85d | ||
|
|
dca29dcbb5 | ||
|
|
84c577cc96 | ||
|
|
5e8fc43857 | ||
|
|
66a17c8d58 | ||
|
|
57f7ee50a6 | ||
|
|
f8ac58e200 | ||
|
|
71954edf75 | ||
|
|
597faa102a | ||
|
|
442fccfc41 | ||
|
|
784ec6104c | ||
|
|
817a01bbc3 | ||
|
|
66c0558174 | ||
|
|
9116be11ae | ||
|
|
969f4c8db6 | ||
|
|
e6916e91e7 | ||
|
|
9544aeaf7a | ||
|
|
babeac1693 | ||
|
|
130b067955 | ||
|
|
df7d6c298a | ||
|
|
a8a60264e9 | ||
|
|
721df8d32b | ||
|
|
2375a6796c | ||
|
|
e04e943e1c | ||
|
|
1bf75671f6 | ||
|
|
7d56de9d15 | ||
|
|
a8de790b57 | ||
|
|
cafddd3b12 | ||
|
|
fc958faf7b | ||
|
|
402894cd8d | ||
|
|
f97cea4b06 | ||
|
|
0198c15b8c | ||
|
|
e813007f49 | ||
|
|
df2962bdb3 | ||
|
|
367f07b784 | ||
|
|
9de9ec2e34 | ||
|
|
6ad7773e2b | ||
|
|
8177dd9a5a | ||
|
|
81994ec3b3 | ||
|
|
ecee4069f1 | ||
|
|
3713d9c4e8 | ||
|
|
c7f1d13f9b | ||
|
|
cc8d18d41f | ||
|
|
afd863ab89 | ||
|
|
46f6653b13 | ||
|
|
3237d1a996 | ||
|
|
386e34e05b | ||
|
|
4fd234e482 | ||
|
|
38fd0dac8b | ||
|
|
11ac111036 | ||
|
|
9803547967 | ||
|
|
1a0c7c4f85 | ||
|
|
7b7d5db796 | ||
|
|
34baf8a354 | ||
|
|
cc9e0fe1ef | ||
|
|
9c354d5775 | ||
|
|
2dce24c1bd | ||
|
|
6f80ce5584 | ||
|
|
c8df2d8e31 | ||
|
|
2e8f27a8ef | ||
|
|
e20dd63f76 | ||
|
|
3e62389325 | ||
|
|
f3c880f96a | ||
|
|
2c7796ea0b | ||
|
|
0daeeb70f7 | ||
|
|
86782865c4 | ||
|
|
ddcabb175a | ||
|
|
7b09e525e8 | ||
|
|
2eefb12e6b | ||
|
|
5777a248d4 | ||
|
|
97a6a4ba85 | ||
|
|
531d33af1c | ||
|
|
0618d690fa | ||
|
|
6aa3b1066f | ||
|
|
393544a194 | ||
|
|
4aea1753bd | ||
|
|
c42d8971ca | ||
|
|
ee7f2ee739 | ||
|
|
6008660a81 | ||
|
|
043d9778b8 | ||
|
|
8bf7c6cccd | ||
|
|
80d7efb365 | ||
|
|
32ed58692c | ||
|
|
63b919f1a9 | ||
|
|
57d9da96a1 | ||
|
|
ec97c67aca | ||
|
|
e5e9b0d928 | ||
|
|
2e37c16b2c | ||
|
|
bcdab80f41 | ||
|
|
c3cf892e40 | ||
|
|
1d41593a84 | ||
|
|
52452020dd | ||
|
|
65f2562d52 | ||
|
|
3482944ac8 | ||
|
|
9d03a1dc13 | ||
|
|
012d3e7b65 | ||
|
|
10d254bbbc | ||
|
|
8acb3f8a90 | ||
|
|
1b00a8692b | ||
|
|
814559bef8 | ||
|
|
8bac02bbcf | ||
|
|
7ef031e244 | ||
|
|
250d32e3dc | ||
|
|
bdeab5bb9c | ||
|
|
764e1e9363 | ||
|
|
72461546b8 | ||
|
|
98ad3b0f4a | ||
|
|
7afd2adacf | ||
|
|
4c52d0ec42 | ||
|
|
9f66622472 | ||
|
|
1f2f33d6c0 | ||
|
|
1a3c454d7f | ||
|
|
fa11d313fb | ||
|
|
20bc2a97d9 | ||
|
|
0cd49c4c81 | ||
|
|
6c1cd2537d | ||
|
|
cf31f24752 | ||
|
|
27523a1c45 | ||
|
|
e1d0fe6b92 | ||
|
|
d3f4a4991e | ||
|
|
296ddbdec5 | ||
|
|
f7cd34b8d8 | ||
|
|
7bafffbd06 | ||
|
|
201ec3be5a | ||
|
|
7d1d5af097 | ||
|
|
f9ce5bce4d | ||
|
|
748768c771 | ||
|
|
f307077636 | ||
|
|
179cd878a9 | ||
|
|
788548d1f4 | ||
|
|
0ae15c2b3c | ||
|
|
b5b4257032 | ||
|
|
657db124b2 | ||
|
|
f5ea43b3d3 | ||
|
|
01747510d5 | ||
|
|
ff8b160a2b | ||
|
|
28b7afda15 | ||
|
|
ecd253dd3e | ||
|
|
8d0dbcd50e | ||
|
|
327f21f1bb | ||
|
|
c96d6b2958 | ||
|
|
da8fb37317 | ||
|
|
4d7e29cb3a | ||
|
|
17099320e9 | ||
|
|
f3dbb4dd2d | ||
|
|
b3b3cdde08 | ||
|
|
b8cd510a0e | ||
|
|
0d5eb2ea9e | ||
|
|
2b0fd2e5c0 | ||
|
|
4168821ec4 | ||
|
|
6353488db7 | ||
|
|
b446d4cc3f | ||
|
|
16b2762025 | ||
|
|
c5a3e2e376 | ||
|
|
5018298c81 | ||
|
|
37b81aa0be | ||
|
|
6a3a0465a4 | ||
|
|
34d67d6018 | ||
|
|
9c4403d7ff | ||
|
|
3c0566cb87 | ||
|
|
4357066cdf | ||
|
|
67ca9a7fc4 | ||
|
|
9c9c295a79 | ||
|
|
daa3292000 | ||
|
|
2da5e2b2ec | ||
|
|
c5119ad27b | ||
|
|
4808507da8 | ||
|
|
11a286fe26 | ||
|
|
ca80b4730f | ||
|
|
80a8ce8a46 | ||
|
|
d804323cab | ||
|
|
cbaef446ac | ||
|
|
8aa1312ae2 | ||
|
|
7ec09fcfe9 | ||
|
|
c090095e08 | ||
|
|
f24bc00eb9 | ||
|
|
f91ee5d245 | ||
|
|
dd6700e659 | ||
|
|
ca8a27babe | ||
|
|
19cc894662 | ||
|
|
15320f0eb2 | ||
|
|
af758af51a | ||
|
|
9d231801da | ||
|
|
33c2154a98 | ||
|
|
f890b316da | ||
|
|
2e4cf0b731 | ||
|
|
f5a319b0b3 | ||
|
|
2533d2c694 | ||
|
|
b1fed81821 | ||
|
|
0064c0357f | ||
|
|
20cd8cce1d | ||
|
|
bc8af2784f | ||
|
|
e300810a16 | ||
|
|
33b48a8a4b | ||
|
|
6f2f1174e6 | ||
|
|
adbe75ae7e | ||
|
|
dae2add713 | ||
|
|
38946fd294 | ||
|
|
047ef107ae | ||
|
|
1bb2f92f5b | ||
|
|
727a1f29d1 | ||
|
|
012bd3a307 | ||
|
|
ae5b19b0aa | ||
|
|
81d9c55eee | ||
|
|
90cfe0e151 | ||
|
|
491800280c | ||
|
|
d60c2e0815 | ||
|
|
fb0babe261 | ||
|
|
e6bc8abdc1 | ||
|
|
fbee644b4e | ||
|
|
aaf327b308 | ||
|
|
d404e0f50e | ||
|
|
c5bb83c6d0 | ||
|
|
8bf3b64831 | ||
|
|
9ff04f8637 | ||
|
|
dd7953ab4c | ||
|
|
23fde3387a | ||
|
|
ecbdb2b18d | ||
|
|
373921777a | ||
|
|
2f489b04ae | ||
|
|
a2c393ccc5 | ||
|
|
73a11c91d2 | ||
|
|
8673f919fd | ||
|
|
1e32161652 | ||
|
|
38eb769c1b | ||
|
|
5e372ed9f4 | ||
|
|
e027a81317 | ||
|
|
0a51713bd7 | ||
|
|
d5cde03db1 | ||
|
|
449f2bfa09 | ||
|
|
c9815e2ccb | ||
|
|
9bd6bc64b0 | ||
|
|
a5fe016854 | ||
|
|
93cd299c77 | ||
|
|
e8f8d8b4d4 | ||
|
|
b806ea6871 | ||
|
|
cb17180dea | ||
|
|
78ec4ba2a7 | ||
|
|
317104de30 | ||
|
|
63412975c3 | ||
|
|
9c87f8749d | ||
|
|
5fc36516f4 | ||
|
|
c608c8a57e | ||
|
|
853a9884d7 | ||
|
|
ecafaf4ea1 | ||
|
|
eb490e92c3 | ||
|
|
98c7e43927 | ||
|
|
d8786d4785 | ||
|
|
02181021ce | ||
|
|
fa60f8c16e | ||
|
|
3084a2f409 | ||
|
|
f473cfc6f2 | ||
|
|
8a34aa5c45 | ||
|
|
cc204c297f | ||
|
|
bb210ff59e | ||
|
|
671e84bec9 | ||
|
|
fc2ba2df32 | ||
|
|
e5bee8e79b | ||
|
|
1b13ddcf32 | ||
|
|
de707049d4 | ||
|
|
e95ae2dbbb | ||
|
|
4606c27cdc | ||
|
|
ba88bf72ce | ||
|
|
75967cec02 | ||
|
|
0a35f661bd | ||
|
|
f141806fb4 | ||
|
|
d80f40075c | ||
|
|
44dbe80096 | ||
|
|
c7546ef08a | ||
|
|
6fe5bb4aa8 | ||
|
|
589a9aa3db | ||
|
|
2c8d1a9255 | ||
|
|
a8c11c0cdb | ||
|
|
34ae93f379 | ||
|
|
bd57d291c1 | ||
|
|
7310daf51d | ||
|
|
78d9d888db | ||
|
|
bccdc7f5e8 | ||
|
|
3854526389 | ||
|
|
74072847ca | ||
|
|
c5857bfc0b | ||
|
|
8b380894f9 | ||
|
|
b090737162 | ||
|
|
476abc9dad | ||
|
|
a2cbf07b6d | ||
|
|
2a67344b93 | ||
|
|
9ecb617d2e | ||
|
|
9381776345 | ||
|
|
5a47bb11ba | ||
|
|
4be4fc4808 | ||
|
|
d939be28e6 | ||
|
|
bb8c7756c7 | ||
|
|
185fccf712 | ||
|
|
0c860ade12 | ||
|
|
0f0017b02d | ||
|
|
a99f7a494b | ||
|
|
5e8f947ce5 | ||
|
|
3e9308d315 | ||
|
|
e593ca4bda | ||
|
|
b731eaaffb | ||
|
|
a3039eea12 | ||
|
|
cbf9577a24 | ||
|
|
10a3037ab3 | ||
|
|
9ccfca5061 | ||
|
|
6fab527eed | ||
|
|
9690832247 | ||
|
|
60a68963a8 | ||
|
|
e5948081a7 | ||
|
|
298bf5fb0a | ||
|
|
6ae431b2f0 | ||
|
|
44769b6001 | ||
|
|
ebabfeb669 | ||
|
|
4186cfd91c | ||
|
|
457e9b53c7 | ||
|
|
21572d3547 | ||
|
|
89afba7437 | ||
|
|
f397dd71a9 | ||
|
|
02e0a47a52 | ||
|
|
b176be942d | ||
|
|
60809fe5ad | ||
|
|
51c5902db0 | ||
|
|
4a8e416fe1 | ||
|
|
090e624ebc | ||
|
|
ce4efd0b70 | ||
|
|
c8dc751b82 | ||
|
|
7c862df92a | ||
|
|
e49c1c2f01 | ||
|
|
57390b02ca | ||
|
|
a698248dff | ||
|
|
b8ef6eba3f | ||
|
|
cc5fe0859a | ||
|
|
8f15aac6fc | ||
|
|
84ce3b4b47 | ||
|
|
b07c43a32f | ||
|
|
ce1b337f7f | ||
|
|
ee8e1b9322 | ||
|
|
20bd5c4c36 | ||
|
|
de082d0fb2 | ||
|
|
3cc5cdbc06 | ||
|
|
b69ec47b18 | ||
|
|
51fc8e824d | ||
|
|
aff9031284 | ||
|
|
397d080da2 | ||
|
|
cb5d052829 | ||
|
|
0908d21bed | ||
|
|
4d878985d4 | ||
|
|
72d7d4a65e | ||
|
|
cb0add3b90 | ||
|
|
71a48ce10f |
19
.gitattributes
vendored
19
.gitattributes
vendored
@@ -1,17 +1,2 @@
|
||||
# Auto detect text files and perform LF normalization
|
||||
* text=auto
|
||||
|
||||
# Custom for Visual Studio
|
||||
*.cs diff=csharp
|
||||
|
||||
# Standard to msysgit
|
||||
*.doc diff=astextplain
|
||||
*.DOC diff=astextplain
|
||||
*.docx diff=astextplain
|
||||
*.DOCX diff=astextplain
|
||||
*.dot diff=astextplain
|
||||
*.DOT diff=astextplain
|
||||
*.pdf diff=astextplain
|
||||
*.PDF diff=astextplain
|
||||
*.rtf diff=astextplain
|
||||
*.RTF diff=astextplain
|
||||
# Auto detect text files and perform LF normalization
|
||||
* text=lf
|
||||
|
||||
4
.github/FUNDING.yml
vendored
Normal file
4
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
github: itzg
|
||||
custom:
|
||||
- https://www.buymeacoffee.com/itzg
|
||||
- https://paypal.me/itzg
|
||||
40
.github/ISSUE_TEMPLATE/bug.yml
vendored
Normal file
40
.github/ISSUE_TEMPLATE/bug.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
name: Bug Report
|
||||
description: File a bug report
|
||||
labels:
|
||||
- bug
|
||||
- status/needs triage
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to report a bug.
|
||||
|
||||
Please double check some things first:
|
||||
- Do you just have a question about something? If so, asking in the [Q&A Discussions](https://github.com/itzg/docker-minecraft-server/discussions/categories/q-a) or asking on [the Discord server](https://discord.gg/DXfKpjB) would be best.
|
||||
- Is this bug happening after the `[init]` prefixed logs and after the log that says "Starting the Minecraft server"? If so, please report the bug with Mojang or the respective server provider.
|
||||
- Are you seeing a performance problem? If so, that is typically outside the scope of the image setup mechanims. Ask a question as above or contact the respective server provider.
|
||||
- type: textarea
|
||||
id: problem
|
||||
attributes:
|
||||
label: Describe the problem
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: container
|
||||
attributes:
|
||||
label: Container definition
|
||||
description: Please provide the compose file or run command used to create the container
|
||||
value: |
|
||||
```
|
||||
Paste run command or compose file here
|
||||
```
|
||||
- type: textarea
|
||||
id: logs
|
||||
attributes:
|
||||
label: Container logs
|
||||
description: |
|
||||
Please provide container logs from the start of the container, which will be the ones prefixed with `[init]`. It is even better if you can set the variable `DEBUG` to "true" and provide those debug container logs.
|
||||
value: |
|
||||
```
|
||||
Paste logs here
|
||||
```
|
||||
7
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
7
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
contact_links:
|
||||
- name: Ask a question in discussions
|
||||
url: https://github.com/itzg/docker-minecraft-server/discussions
|
||||
about: Please ask questions here
|
||||
- name: Ask a question on Discord
|
||||
url: https://discord.gg/DXfKpjB
|
||||
about: Please ask questions here
|
||||
29
.github/ISSUE_TEMPLATE/enhancement.yml
vendored
Normal file
29
.github/ISSUE_TEMPLATE/enhancement.yml
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
name: Enhancement Request
|
||||
description: Request an enhancement
|
||||
labels:
|
||||
- enhancement
|
||||
- status/needs triage
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to request an enhancement.
|
||||
|
||||
Even if you plan on submitting a pull request with a contributed enhancement it is best to describe the enhancement here first. Somebody might already be working on a similar thing and could use your help.
|
||||
- type: dropdown
|
||||
id: type
|
||||
attributes:
|
||||
label: Enhancement Type
|
||||
options:
|
||||
- Improve an existing feature
|
||||
- A completely new feature
|
||||
- New server type
|
||||
- Not sure
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Describe the enhancement
|
||||
validations:
|
||||
required: true
|
||||
7
.github/dependabot.yml
vendored
Normal file
7
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
version: 2
|
||||
updates:
|
||||
# Maintain dependencies for GitHub Actions
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
6
.github/no-response.yml
vendored
6
.github/no-response.yml
vendored
@@ -1,6 +0,0 @@
|
||||
daysUntilClose: 14
|
||||
responseRequiredLabel: "status/waiting on feedback"
|
||||
closeComment: >
|
||||
This issue has been automatically closed because there has been no response
|
||||
after requesting feedback. Please feel free to re-open this issue if the
|
||||
scenario still exists and provide a comment with more information.
|
||||
4
.github/release.yml
vendored
Normal file
4
.github/release.yml
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
changelog:
|
||||
exclude:
|
||||
authors:
|
||||
- dependabot
|
||||
211
.github/workflows/build-multiarch.yml
vendored
211
.github/workflows/build-multiarch.yml
vendored
@@ -1,83 +1,176 @@
|
||||
name: Build and publish multiarch
|
||||
name: Test and Build multi-architecture
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- multiarch
|
||||
- java8-multiarch
|
||||
- multiarch-latest
|
||||
- java15
|
||||
- java15-openj9
|
||||
- test/multiarch/*
|
||||
- master
|
||||
- test/**
|
||||
tags:
|
||||
- "[0-9]+.[0-9]+.[0-9]+-multiarch"
|
||||
- "[0-9]+.[0-9]+.[0-9]+-multiarch-latest"
|
||||
- "[0-9]+.[0-9]+.[0-9]+-java15"
|
||||
- "[0-9]+.[0-9]+.[0-9]+"
|
||||
paths-ignore:
|
||||
- "*.md"
|
||||
- "docs/**"
|
||||
- "examples/**"
|
||||
|
||||
jobs:
|
||||
docker-buildx:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
variant:
|
||||
- java17
|
||||
- java17-graalvm-ce
|
||||
- java17-jdk
|
||||
- java17-openj9
|
||||
- java17-alpine
|
||||
- java8
|
||||
- java8-graalvm-ce
|
||||
- java8-multiarch
|
||||
- java8-openj9
|
||||
- java8-jdk
|
||||
- java11
|
||||
- java11-openj9
|
||||
- java11-jdk
|
||||
include:
|
||||
# JAVA 17:
|
||||
- variant: java17
|
||||
# jammy doesn't work until minecraft updates to https://github.com/netty/netty/issues/12343
|
||||
baseImage: eclipse-temurin:17-jre-focal
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
mcVersion: 1.18.2
|
||||
- variant: java17-graalvm-ce
|
||||
baseImage: ghcr.io/graalvm/graalvm-ce:ol8-java17
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: 1.18.2
|
||||
- variant: java17-jdk
|
||||
baseImage: eclipse-temurin:17-focal
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
mcVersion: 1.18.2
|
||||
- variant: java17-openj9
|
||||
baseImage: ibm-semeru-runtimes:open-17-jre
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: 1.18.2
|
||||
- variant: java17-alpine
|
||||
baseImage: eclipse-temurin:17-jre-alpine
|
||||
platforms: linux/amd64
|
||||
mcVersion: 1.18.2
|
||||
# JAVA 11:
|
||||
- variant: java11
|
||||
baseImage: adoptopenjdk:11-jre-hotspot
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
mcVersion: 1.16.5
|
||||
- variant: java11-jdk
|
||||
baseImage: adoptopenjdk:11-jdk-hotspot
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
mcVersion: 1.16.5
|
||||
- variant: java11-openj9
|
||||
baseImage: ibm-semeru-runtimes:open-11-jre
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: 1.16.5
|
||||
# JAVA 8: NOTE: Unable to go past 8u312 because of Forge dependencies
|
||||
- variant: java8
|
||||
baseImage: openjdk:8-jre-alpine3.9
|
||||
platforms: linux/amd64
|
||||
mcVersion: 1.12.2
|
||||
- variant: java8-graalvm-ce
|
||||
baseImage: ghcr.io/graalvm/graalvm-ce:java8
|
||||
platforms: linux/amd64
|
||||
mcVersion: 1.12.2
|
||||
- variant: java8-multiarch
|
||||
baseImage: eclipse-temurin:8u312-b07-jre-focal
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: 1.12.2
|
||||
- variant: java8-jdk
|
||||
baseImage: eclipse-temurin:8u312-b07-jdk-focal
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: 1.12.2
|
||||
- variant: java8-openj9
|
||||
baseImage: ibm-semeru-runtimes:open-8u312-b07-jre
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: 1.12.2
|
||||
env:
|
||||
IMAGE_TO_TEST: ${{ github.repository_owner }}/minecraft-server:test-${{ matrix.variant }}-${{ github.run_id }}
|
||||
HAS_IMAGE_REPO_ACCESS: ${{ secrets.DOCKER_USER != '' && secrets.DOCKER_PASSWORD != '' }}
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2.2.0
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
# for build-files step
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Prepare
|
||||
id: prep
|
||||
run: |
|
||||
DOCKER_IMAGE=itzg/minecraft-server
|
||||
VERSION=edge
|
||||
if [[ $GITHUB_REF == refs/tags/* ]]; then
|
||||
VERSION=${GITHUB_REF#refs/tags/}
|
||||
fi
|
||||
if [[ $GITHUB_REF == refs/heads/* ]]; then
|
||||
VERSION=${GITHUB_REF#refs/heads/}
|
||||
if [[ $VERSION == master ]]; then
|
||||
VERSION=latest
|
||||
fi
|
||||
fi
|
||||
TAGS="${DOCKER_IMAGE}:${VERSION//\//-}"
|
||||
echo ::set-output name=tags::${TAGS}
|
||||
echo ::set-output name=cache_from::${TAGS}
|
||||
echo ::set-output name=version::${VERSION//\//-}
|
||||
echo ::set-output name=cache_version::${VERSION//\//-}
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
# NOTE for forks: if your Docker Hub organization doesn't match your Github repo's,
|
||||
# then the use of ${{ github.repository_owner }} will need to be replaced.
|
||||
images: |
|
||||
${{ github.repository_owner }}/minecraft-server
|
||||
tags: |
|
||||
type=ref,event=tag,enable=${{ matrix.variant == 'java17' }}
|
||||
type=ref,event=tag,suffix=-${{ matrix.variant }}
|
||||
type=raw,value=${{ matrix.variant }}
|
||||
flavor: |
|
||||
latest=${{ matrix.variant == 'java17' }}
|
||||
labels: |
|
||||
org.opencontainers.image.authors=Geoff Bourne <itzgeoff@gmail.com>
|
||||
|
||||
- name: Setup Docker 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.cache_version }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-${{ steps.prep.outputs.cache_version }}-
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
uses: docker/setup-qemu-action@v2.0.0
|
||||
|
||||
- name: Build for test
|
||||
uses: docker/build-push-action@v3.1.1
|
||||
with:
|
||||
platforms: linux/amd64
|
||||
tags: ${{ env.IMAGE_TO_TEST }}
|
||||
# ensure latest base image is used
|
||||
pull: true
|
||||
# load into daemon for test usage in next step
|
||||
load: true
|
||||
push: false
|
||||
build-args: |
|
||||
BASE_IMAGE=${{ matrix.baseImage }}
|
||||
cache-from: type=gha,scope=${{ matrix.variant }}
|
||||
# no cache-to to avoid cross-cache update from next build step
|
||||
|
||||
- name: Run tests
|
||||
env:
|
||||
MINECRAFT_VERSION: ${{ matrix.mcVersion }}
|
||||
VARIANT: ${{ matrix.variant }}
|
||||
MODS_FORGEAPI_KEY: ${{ secrets.MODS_FORGEAPI_KEY }}
|
||||
run: |
|
||||
tests/test.sh
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
uses: docker/login-action@v2
|
||||
if: env.HAS_IMAGE_REPO_ACCESS
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build and push
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2
|
||||
uses: docker/build-push-action@v3.1.1
|
||||
if: github.actor == github.repository_owner
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.prep.outputs.tags }}
|
||||
platforms: ${{ matrix.platforms }}
|
||||
push: >
|
||||
${{
|
||||
github.ref_type == 'tag'
|
||||
|| github.ref_name == 'master'
|
||||
|| ( github.event_name == 'pull_request'
|
||||
&& env.HAS_IMAGE_REPO_ACCESS
|
||||
&& contains(github.event.pull_request.labels.*.name, 'ci/push-image')
|
||||
)
|
||||
}}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
# ensure latest base image is used
|
||||
pull: true
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
labels: |
|
||||
org.opencontainers.image.documentation=https://github.com/itzg/docker-minecraft-server
|
||||
org.opencontainers.image.source=https://github.com/itzg/docker-minecraft-server
|
||||
org.opencontainers.image.version=${{ steps.prep.outputs.version }}
|
||||
org.opencontainers.image.revision=${{ github.sha }}
|
||||
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
build-args: |
|
||||
BASE_IMAGE=${{ matrix.baseImage }}
|
||||
BUILD_FILES_REV=${{ steps.build-files-rev.outputs.REV }}
|
||||
cache-from: type=gha,scope=${{ matrix.variant }}
|
||||
cache-to: type=gha,mode=max,scope=${{ matrix.variant }}
|
||||
|
||||
26
.github/workflows/discord.yml
vendored
Normal file
26
.github/workflows/discord.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
name: Discord notifications
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["ContinuousIntegration", "Build and Publish", "Build and publish multiarch" ]
|
||||
types:
|
||||
- completed
|
||||
|
||||
env:
|
||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
|
||||
jobs:
|
||||
discord:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: on-success
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
uses: Ilshidur/action-discord@master
|
||||
with:
|
||||
args: "Github repo: ${{ github.repository }}\n- Branch: ${{ github.event.workflow_run.head_branch }}\n- [Link: to Actions](<${{ github.event.workflow_run.html_url }}>)\n- Status: 🎉 ${{ github.event.workflow_run.conclusion }} 🍏"
|
||||
- name: on-failure
|
||||
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
|
||||
uses: Ilshidur/action-discord@master
|
||||
with:
|
||||
args: "Github repo: ${{ github.repository }}\n- Branch: ${{ github.event.workflow_run.head_branch }}\n- [Link: to Actions](<${{ github.event.workflow_run.html_url }}>)\n- Status: 🤔 ${{ github.event.workflow_run.conclusion }} 💣💥"
|
||||
33
.github/workflows/issue-label.yml
vendored
Normal file
33
.github/workflows/issue-label.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
name: Issue labels
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [labeled, reopened, closed, deleted]
|
||||
|
||||
env:
|
||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_ISSUES_WEBHOOK }}
|
||||
|
||||
jobs:
|
||||
labelNotify:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: notify on label
|
||||
if: >
|
||||
github.event.label.name == 'enhancement'
|
||||
|| github.event.label.name == 'bug'
|
||||
|| github.event.label.name == 'help wanted'
|
||||
|| github.event.label.name == 'priority/high'
|
||||
|| github.event.label.name == 'question'
|
||||
|| github.event.label.name == 'status/waiting on upstream'
|
||||
uses: Ilshidur/action-discord@master
|
||||
with:
|
||||
args: "[${{ github.event.issue.title }} (#${{ github.event.issue.number }})](<${{ github.event.issue.html_url }}>) added `${{ github.event.label.name }}` label"
|
||||
- name: notify on action change
|
||||
if: >
|
||||
github.event.action == 'closed'
|
||||
|| github.event.action == 'reopened'
|
||||
|| github.event.action == 'deleted'
|
||||
uses: Ilshidur/action-discord@master
|
||||
with:
|
||||
args: "[${{ github.event.issue.title }} (#${{ github.event.issue.number }})](<${{ github.event.issue.html_url }}>) has been `${{ github.event.action }}` by `${{ github.event.sender.login }}`"
|
||||
97
.github/workflows/main.yml
vendored
97
.github/workflows/main.yml
vendored
@@ -1,97 +0,0 @@
|
||||
name: Build and Publish
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- java8
|
||||
- openj9
|
||||
- openj9-11
|
||||
- adopt11
|
||||
- test/*
|
||||
tags:
|
||||
- "[0-9]+.[0-9]+.[0-9]+"
|
||||
- "[0-9]+.[0-9]+.[0-9]+-java8"
|
||||
- "[0-9]+.[0-9]+.[0-9]+-openj9"
|
||||
- "[0-9]+.[0-9]+.[0-9]+-openj9-11"
|
||||
- "[0-9]+.[0-9]+.[0-9]+-openj9-nightly"
|
||||
- "[0-9]+.[0-9]+.[0-9]+-adopt11"
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
tests/test.sh
|
||||
build:
|
||||
needs:
|
||||
- test
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Prepare
|
||||
id: prep
|
||||
run: |
|
||||
DOCKER_IMAGE=itzg/minecraft-server
|
||||
VERSION=edge
|
||||
if [[ $GITHUB_REF == refs/tags/* ]]; then
|
||||
VERSION=${GITHUB_REF#refs/tags/}
|
||||
fi
|
||||
if [[ $GITHUB_REF == refs/heads/* ]]; then
|
||||
VERSION=${GITHUB_REF#refs/heads/}
|
||||
if [[ $VERSION == master ]]; then
|
||||
VERSION=latest
|
||||
fi
|
||||
fi
|
||||
TAGS="${DOCKER_IMAGE}:${VERSION//\//-}"
|
||||
echo ::set-output name=tags::${TAGS}
|
||||
echo ::set-output name=cache_from::${TAGS}
|
||||
echo ::set-output name=version::${VERSION//\//-}
|
||||
echo ::set-output name=cache_version::${VERSION//\//-}
|
||||
|
||||
- name: Setup Docker 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.cache_version }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-${{ steps.prep.outputs.cache_version }}-
|
||||
${{ runner.os }}-buildx-
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build and push
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
# ensure latest base image is used
|
||||
pull: true
|
||||
# publish
|
||||
push: true
|
||||
# tags determined by prep step
|
||||
tags: ${{ steps.prep.outputs.tags }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
labels: |
|
||||
org.opencontainers.image.documentation=https://github.com/itzg/docker-minecraft-server
|
||||
org.opencontainers.image.version=${{ steps.prep.outputs.version }}
|
||||
org.opencontainers.image.source=https://github.com/itzg/docker-minecraft-server
|
||||
org.opencontainers.image.revision=${{ github.sha }}
|
||||
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
16
.github/workflows/pr.yml
vendored
16
.github/workflows/pr.yml
vendored
@@ -1,16 +0,0 @@
|
||||
name: Validate PR
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
tests/test.sh
|
||||
25
.github/workflows/stale-check.yml
vendored
Normal file
25
.github/workflows/stale-check.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
name: Stale Check
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: 0 2 * * *
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-20.04
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- name: Process Stale Issues
|
||||
uses: actions/stale@v5
|
||||
with:
|
||||
stale-issue-label: status/stale
|
||||
stale-pr-label: status/stale
|
||||
stale-issue-message: >
|
||||
This issue is stale because it has been open 30 days with no activity.
|
||||
Please add a comment describing the reason to keep this issue open.
|
||||
days-before-stale: 30
|
||||
days-before-close: 5
|
||||
exempt-issue-labels: 'enhancement,keep,status/needs triage,priority/high'
|
||||
|
||||
69
.github/workflows/verify-pr.yml
vendored
Normal file
69
.github/workflows/verify-pr.yml
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
name: Verify PR
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
types: [assigned, opened, synchronize, labeled]
|
||||
paths-ignore:
|
||||
- "*.md"
|
||||
- "docs/**"
|
||||
- "examples/**"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
variant:
|
||||
- java17
|
||||
- java17-alpine
|
||||
- java8-multiarch
|
||||
include:
|
||||
# JAVA 17:
|
||||
- variant: java17
|
||||
# jammy doesn't work until minecraft updates to https://github.com/netty/netty/issues/12343
|
||||
baseImage: eclipse-temurin:17-jre-focal
|
||||
platforms: linux/amd64
|
||||
mcVersion: 1.18.2
|
||||
- variant: java17-alpine
|
||||
baseImage: eclipse-temurin:17-jre-alpine
|
||||
platforms: linux/amd64
|
||||
mcVersion: 1.18.2
|
||||
- variant: java8-multiarch
|
||||
baseImage: eclipse-temurin:8u312-b07-jre-focal
|
||||
platforms: linux/amd64
|
||||
mcVersion: 1.12.2
|
||||
env:
|
||||
IMAGE_TO_TEST: ${{ github.repository_owner }}/minecraft-server:test-${{ matrix.variant }}-${{ github.run_id }}
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
# for build-files step
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Build for test
|
||||
uses: docker/build-push-action@v3.1.1
|
||||
with:
|
||||
platforms: linux/amd64
|
||||
tags: ${{ env.IMAGE_TO_TEST }}
|
||||
# ensure latest base image is used
|
||||
pull: true
|
||||
# load into daemon for test usage in next step
|
||||
load: true
|
||||
push: false
|
||||
build-args: |
|
||||
BASE_IMAGE=${{ matrix.baseImage }}
|
||||
cache-from: type=gha,scope=${{ matrix.variant }}
|
||||
|
||||
- name: Run tests
|
||||
env:
|
||||
MINECRAFT_VERSION: ${{ matrix.mcVersion }}
|
||||
VARIANT: ${{ matrix.variant }}
|
||||
MODS_FORGEAPI_KEY: ${{ secrets.MODS_FORGEAPI_KEY }}
|
||||
DEBUG: ${{ runner.debug }}
|
||||
run: |
|
||||
tests/test.sh
|
||||
5
.gitignore
vendored
5
.gitignore
vendored
@@ -1,3 +1,6 @@
|
||||
.vscode
|
||||
/data/
|
||||
/.idea/
|
||||
*.iml
|
||||
*.iml
|
||||
/gh-md-toc
|
||||
personal-build-and-develop.*
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
Adding a new server `TYPE` can vary due to the complexity of obtaining and configuring each type; however, the addition of any server type includes at least the following steps:
|
||||
|
||||
1. Copy an existing "start-deploy*" script, such as [start-deployMohist](start-deployMohist) and rename it accordingly making sure to retain the "start-deploy" prefix
|
||||
2. Modify the type-specific behavior between the "start-utils" preamble and the hand-off to `start-finalSetupWorld` at the end of the script
|
||||
1. Copy an existing "start-deploy*" script, such as [start-deployMohist](scripts/start-deployMohist) and rename it accordingly making sure to retain the "start-deploy" prefix
|
||||
2. Modify the type-specific behavior between the "start-utils" preamble and the hand-off to `start-setupWorld` at the end of the script
|
||||
3. Develop and test the changes using the [iterative process described below](#iterative-script-development)
|
||||
4. Add a case-entry to the `case "${TYPE^^}"` in [start-configuration](start-configuration)
|
||||
4. Add a case-entry to the `case "${TYPE^^}"` in [start-configuration](scripts/start-configuration)
|
||||
5. Add a section to the [README](README.md). It is recommended to copy-modify an existing section to retain a similar wording and level of detail
|
||||
6. [Submit a pull request](https://github.com/itzg/docker-minecraft-server/pulls)
|
||||
|
||||
@@ -15,8 +15,35 @@ Individual scripts can be iteratively developed, debugged, and tested using the
|
||||
|
||||
First, build a baseline of the image to include the packages needed by existing or new scripts:
|
||||
|
||||
```shell script
|
||||
docker build -t mc-dev .
|
||||
PowerShell: (Example of building and testing ForgeAPI)
|
||||
```powershell
|
||||
$env:MODS_FORGEAPI_KEY='$2a$...'
|
||||
$env:FOLDER_TO_TEST="forgeapimods_projectids"
|
||||
$env:IMAGE_TO_TEST="mc-dev"
|
||||
docker build -t $env:IMAGE_TO_TEST .
|
||||
pushd "tests/setuponlytests/$env:FOLDER_TO_TEST/"
|
||||
docker-compose run mc
|
||||
docker-compose down -v --remove-orphans
|
||||
popd
|
||||
```
|
||||
|
||||
PowerShell: Building different images of Java for testing
|
||||
```powershell
|
||||
$env:BASE_IMAGE='eclipse-temurin:8u312-b07-jre'
|
||||
$env:IMAGE_TO_TEST="mc-dev"
|
||||
docker build --build-arg BASE_IMAGE=$env:BASE_IMAGE -t $env:IMAGE_TO_TEST .
|
||||
```
|
||||
|
||||
Bash: (Example of building and testing ForgeAPI)
|
||||
```bash
|
||||
export MODS_FORGEAPI_KEY='$2a$...'
|
||||
export FOLDER_TO_TEST="forgeapimods_file"
|
||||
export IMAGE_TO_TEST="mc-dev"
|
||||
docker build -t $IMAGE_TO_TEST .
|
||||
pushd tests/setuponlytests/$FOLDER_TO_TEST/
|
||||
docker-compose run mc
|
||||
docker-compose down -v --remove-orphans
|
||||
popd
|
||||
```
|
||||
|
||||
Using the baseline image, an interactive container can be started to iteratively run the scripts to be developed. By attaching the current workspace directory, you can use the local editor of your choice to iteratively modify scripts while using the container to run them.
|
||||
@@ -40,35 +67,33 @@ VANILLA_VERSION=1.12.2 /scripts/start-magma
|
||||
|
||||
> NOTE: You may want to temporarily add an `exit` statement near the end of your script to isolate execution to just the script you're developing.
|
||||
|
||||
## Multi-base-image variants
|
||||
## Using development copy of mc-image-helper
|
||||
|
||||
Several base-image variants are maintained in order to offer choices in JDK provider and version. The variants are maintained in their respective branches:
|
||||
- openj9
|
||||
- openj9-nightly
|
||||
- adopt11
|
||||
- adopt13
|
||||
- multiarch
|
||||
In the cloned copy of [`mc-image-helper`](https://github.com/itzg/mc-image-helper), create an up-to-date snapshot build of the tgz distribution using:
|
||||
|
||||
The [docker-versions-create.sh](docker-versions-create.sh) script is configured with the branches to maintain and is used to merge changes from the master branch into the mulit-base variant branches. The script also manages git tagging the master branch along with the merged branches. So a typical use of the script would be like:
|
||||
|
||||
```shell script
|
||||
./docker-versions-create.sh -s -t 1.2.0
|
||||
```shell
|
||||
./gradlew distTar
|
||||
```
|
||||
|
||||
> Most often the major version will be bumped unless a bug or hotfix needs to be published in which case the patch version should be incremented.
|
||||
Assuming [http-server](https://www.npmjs.com/package/http-server) is installed globally, start a static web server using:
|
||||
|
||||
> The build and publishing of those branches and their tags is currently performed within Docker Hub.
|
||||
```shell
|
||||
http-server ./build/distributions -p 8080
|
||||
```
|
||||
|
||||
## multiarch support
|
||||
Note the port that was selected by http-server and pass the build arguments, such as:
|
||||
|
||||
The [multiarch branch](https://github.com/itzg/docker-minecraft-server/tree/multiarch) supports running the image on amd64, arm64, and armv7 (aka RaspberryPi). Unlike the mainline branches, it is based on Ubuntu 18.04 since the openjdk package provided by Ubuntu includes full JIT support on all of the processor types.
|
||||
```shell
|
||||
--build-arg MC_HELPER_VERSION=1.8.1-SNAPSHOT \
|
||||
--build-arg MC_HELPER_BASE_URL=http://host.docker.internal:8080
|
||||
```
|
||||
|
||||
The multiarch images are built and published by [a Github action](https://github.com/itzg/docker-minecraft-server/actions?query=workflow%3A%22Build+and+publish+multiarch%22), which [is configured in that branch](https://github.com/itzg/docker-minecraft-server/blob/multiarch/.github/workflows/build-multiarch.yml).
|
||||
Now the image can be built like normal, and it will install mc-image-helper from the locally built copy.
|
||||
|
||||
## Generating release notes
|
||||
|
||||
The following git command can be used to provide the bulk of release notes content:
|
||||
|
||||
```shell script
|
||||
git log --invert-grep --grep "^ci:" --grep "^misc:" --grep "^docs:" --pretty="- %s" 1.1.0..1.2.0
|
||||
git log --invert-grep --grep "^ci:" --grep "^misc:" --grep "^docs:" --pretty="* %s" 1.1.0..1.2.0
|
||||
```
|
||||
|
||||
161
Dockerfile
161
Dockerfile
@@ -1,88 +1,73 @@
|
||||
FROM adoptopenjdk:8-jre-hotspot
|
||||
|
||||
LABEL org.opencontainers.image.authors="Geoff Bourne <itzgeoff@gmail.com>"
|
||||
|
||||
RUN apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive \
|
||||
apt-get install -y \
|
||||
imagemagick \
|
||||
gosu \
|
||||
sudo \
|
||||
net-tools \
|
||||
curl wget \
|
||||
git \
|
||||
jq \
|
||||
dos2unix \
|
||||
mysql-client \
|
||||
tzdata \
|
||||
rsync \
|
||||
nano \
|
||||
unzip \
|
||||
knockd \
|
||||
ttf-dejavu \
|
||||
&& apt-get clean
|
||||
|
||||
RUN addgroup --gid 1000 minecraft \
|
||||
&& adduser --system --shell /bin/false --uid 1000 --ingroup minecraft --home /data minecraft
|
||||
|
||||
COPY files/sudoers* /etc/sudoers.d
|
||||
|
||||
EXPOSE 25565 25575
|
||||
|
||||
# hook into docker BuildKit --platform support
|
||||
# see https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope
|
||||
ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
ARG TARGETVARIANT
|
||||
|
||||
ARG EASY_ADD_VER=0.7.1
|
||||
ADD https://github.com/itzg/easy-add/releases/download/${EASY_ADD_VER}/easy-add_${TARGETOS}_${TARGETARCH}${TARGETVARIANT} /usr/bin/easy-add
|
||||
RUN chmod +x /usr/bin/easy-add
|
||||
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=1.2.0 --var app=restify --file {{.app}} \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=1.4.7 --var app=rcon-cli --file {{.app}} \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=0.7.1 --var app=mc-monitor --file {{.app}} \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=1.5.0 --var app=mc-server-runner --file {{.app}} \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=0.1.1 --var app=maven-metadata-release --file {{.app}} \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
COPY mcstatus /usr/local/bin
|
||||
|
||||
VOLUME ["/data"]
|
||||
COPY server.properties /tmp/server.properties
|
||||
COPY log4j2.xml /tmp/log4j2.xml
|
||||
WORKDIR /data
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
ENV UID=1000 GID=1000 \
|
||||
MEMORY="1G" \
|
||||
TYPE=VANILLA VERSION=LATEST \
|
||||
ENABLE_RCON=true RCON_PORT=25575 RCON_PASSWORD=minecraft \
|
||||
SERVER_PORT=25565 ONLINE_MODE=TRUE SERVER_NAME="Dedicated Server" \
|
||||
ENABLE_AUTOPAUSE=false AUTOPAUSE_TIMEOUT_EST=3600 AUTOPAUSE_TIMEOUT_KN=120 AUTOPAUSE_TIMEOUT_INIT=600 \
|
||||
AUTOPAUSE_PERIOD=10 AUTOPAUSE_KNOCK_INTERFACE=eth0
|
||||
|
||||
COPY start* /
|
||||
COPY health.sh /
|
||||
ADD files/autopause /autopause
|
||||
|
||||
RUN dos2unix /start* && chmod +x /start*
|
||||
RUN dos2unix /health.sh && chmod +x /health.sh
|
||||
RUN dos2unix /autopause/* && chmod +x /autopause/*.sh
|
||||
|
||||
ENTRYPOINT [ "/start" ]
|
||||
HEALTHCHECK --start-period=1m CMD /health.sh
|
||||
# syntax = docker/dockerfile:1.3
|
||||
|
||||
ARG BASE_IMAGE=eclipse-temurin:17-jre-focal
|
||||
FROM ${BASE_IMAGE}
|
||||
|
||||
# CI system should set this to a hash or git revision of the build directory and it's contents to
|
||||
# ensure consistent cache updates.
|
||||
ARG BUILD_FILES_REV=1
|
||||
RUN --mount=target=/build,source=build \
|
||||
REV=${BUILD_FILES_REV} /build/run.sh install-packages
|
||||
|
||||
RUN --mount=target=/build,source=build \
|
||||
REV=${BUILD_FILES_REV} /build/run.sh setup-user
|
||||
|
||||
COPY --chmod=644 files/sudoers* /etc/sudoers.d
|
||||
|
||||
EXPOSE 25565 25575
|
||||
|
||||
# hook into docker BuildKit --platform support
|
||||
# see https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope
|
||||
ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
ARG TARGETVARIANT
|
||||
|
||||
ARG EASY_ADD_VER=0.7.1
|
||||
ADD https://github.com/itzg/easy-add/releases/download/${EASY_ADD_VER}/easy-add_${TARGETOS}_${TARGETARCH}${TARGETVARIANT} /usr/bin/easy-add
|
||||
RUN chmod +x /usr/bin/easy-add
|
||||
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=1.2.0 --var app=restify --file {{.app}} \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=1.6.0 --var app=rcon-cli --file {{.app}} \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=0.10.3 --var app=mc-monitor --file {{.app}} \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=1.8.1 --var app=mc-server-runner --file {{.app}} \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=0.1.1 --var app=maven-metadata-release --file {{.app}} \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
ARG MC_HELPER_VERSION=1.22.7
|
||||
ARG MC_HELPER_RELEASE=v${MC_HELPER_VERSION}
|
||||
ARG MC_HELPER_BASE_URL=https://github.com/itzg/mc-image-helper/releases/download/${MC_HELPER_RELEASE}
|
||||
RUN curl -fsSL ${MC_HELPER_BASE_URL}/mc-image-helper-${MC_HELPER_VERSION}.tgz \
|
||||
| tar -C /usr/share -zxf - \
|
||||
&& ln -s /usr/share/mc-image-helper-${MC_HELPER_VERSION}/bin/mc-image-helper /usr/bin
|
||||
|
||||
VOLUME ["/data"]
|
||||
WORKDIR /data
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
# End user MUST set EULA and change RCON_PASSWORD
|
||||
ENV TYPE=VANILLA VERSION=LATEST EULA="" UID=1000 GID=1000 RCON_PASSWORD=minecraft
|
||||
|
||||
COPY --chmod=755 scripts/start* /
|
||||
COPY --chmod=755 bin/ /usr/local/bin/
|
||||
COPY --chmod=755 bin/mc-health /health.sh
|
||||
COPY --chmod=644 files/log4j2.xml /image/log4j2.xml
|
||||
COPY --chmod=755 files/auto /auto
|
||||
|
||||
RUN dos2unix /start* /auto/*
|
||||
|
||||
ENTRYPOINT [ "/start" ]
|
||||
HEALTHCHECK --start-period=1m --interval=5s --retries=24 CMD mc-health
|
||||
|
||||
8
health.sh → bin/mc-health
Normal file → Executable file
8
health.sh → bin/mc-health
Normal file → Executable file
@@ -1,6 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
. ${SCRIPTS:-/}start-utils
|
||||
# shellcheck source=../scripts/start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
if [ -f /data/.mc-health.env ]; then
|
||||
. /data/.mc-health.env
|
||||
fi
|
||||
|
||||
if isTrue "${DISABLE_HEALTHCHECK}"; then
|
||||
echo "Healthcheck disabled"
|
||||
@@ -9,6 +13,6 @@ elif isTrue "${ENABLE_AUTOPAUSE}" && [[ "$( ps -ax -o stat,comm | grep 'java' |
|
||||
echo "Java process suspended by Autopause function"
|
||||
exit 0
|
||||
else
|
||||
mc-monitor status --host localhost --port $SERVER_PORT
|
||||
mc-monitor status "${MC_HEALTH_EXTRA_ARGS[@]}" --host localhost --port "${SERVER_PORT:-25565}"
|
||||
exit $?
|
||||
fi
|
||||
23
bin/mc-send-to-console
Executable file
23
bin/mc-send-to-console
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
. "/start-utils"
|
||||
: "${CONSOLE_IN_NAMED_PIPE:=/tmp/minecraft-console-in}"
|
||||
|
||||
if [ $# = 0 ]; then
|
||||
echo "ERROR: pass console commands as arguments"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -p "${CONSOLE_IN_NAMED_PIPE}" ]; then
|
||||
echo "ERROR: named pipe ${CONSOLE_IN_NAMED_PIPE} is missing"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$(id -u)" = 0 ]; then
|
||||
if [[ $(getDistro) == alpine ]]; then
|
||||
exec su-exec minecraft bash -c "echo $* > '${CONSOLE_IN_NAMED_PIPE:-/tmp/minecraft-console-in}'"
|
||||
else
|
||||
exec gosu minecraft bash -c "echo $* > '${CONSOLE_IN_NAMED_PIPE:-/tmp/minecraft-console-in}'"
|
||||
fi
|
||||
else
|
||||
echo "$@" >"${CONSOLE_IN_NAMED_PIPE:-/tmp/minecraft-console-in}"
|
||||
fi
|
||||
101
bin/rcon-cmds-daemon.sh
Normal file
101
bin/rcon-cmds-daemon.sh
Normal file
@@ -0,0 +1,101 @@
|
||||
#!/bin/bash
|
||||
|
||||
: "${RCON_CMDS_STARTUP:=}"
|
||||
: "${RCON_CMDS_ON_CONNECT:=}"
|
||||
: "${RCON_CMDS_ON_DISCONNECT:=}"
|
||||
: "${RCON_CMDS_FIRST_CONNECT:=}"
|
||||
: "${RCON_CMDS_LAST_DISCONNECT:=}"
|
||||
: "${RCON_CMDS_PERIOD:=10}"
|
||||
|
||||
# needed for the clients connected function residing in autopause
|
||||
# shellcheck source=../auto/autopause-fcns.sh
|
||||
. /auto/autopause-fcns.sh
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. ${SCRIPTS:-/}start-utils
|
||||
|
||||
run_command(){
|
||||
rcon_cmd="$1"
|
||||
logRcon "running - $rcon_cmd"
|
||||
output=$(rcon-cli "$rcon_cmd")
|
||||
logRcon "$output"
|
||||
}
|
||||
|
||||
|
||||
# wait for java process to be started
|
||||
while :
|
||||
do
|
||||
if java_process_exists ; then
|
||||
break
|
||||
fi
|
||||
sleep 0.1
|
||||
done
|
||||
|
||||
CLIENTCONNECTIONS=0
|
||||
STATE=INIT
|
||||
|
||||
while :
|
||||
do
|
||||
case X$STATE in
|
||||
XINIT)
|
||||
# Server startup
|
||||
if mc_server_listening ; then
|
||||
logRcon "MCServer is listening, running startup"
|
||||
if [[ "$RCON_CMDS_STARTUP" ]]; then
|
||||
while read -r cmd; do
|
||||
run_command "$cmd"
|
||||
done <<< "$RCON_CMDS_STARTUP"
|
||||
fi
|
||||
if
|
||||
[[ -z "$RCON_CMDS_ON_CONNECT" ]] &&
|
||||
[[ -z "$RCON_CMDS_ON_DISCONNECT" ]] &&
|
||||
[[ -z "$RCON_CMDS_FIRST_CONNECT" ]] &&
|
||||
[[ -z "$RCON_CMDS_LAST_DISCONNECT" ]]
|
||||
then
|
||||
logRcon "No addition rcon commands are given, stopping rcon cmd service"
|
||||
exit 0
|
||||
fi
|
||||
STATE=II
|
||||
fi
|
||||
;;
|
||||
XII)
|
||||
CURR_CLIENTCONNECTIONS=$(java_clients_connections)
|
||||
# First client connection
|
||||
# Setting priority run order: on first client connection is usually to STOP maintence, aka DO THIS FIRST
|
||||
if (( CURR_CLIENTCONNECTIONS > 0 )) && (( CLIENTCONNECTIONS == 0 )) && [[ "$RCON_CMDS_FIRST_CONNECT" ]]; then
|
||||
logRcon "First Clients has Connected, running first connect cmds"
|
||||
while read -r cmd; do
|
||||
run_command "$cmd"
|
||||
done <<< "$RCON_CMDS_FIRST_CONNECT"
|
||||
fi
|
||||
|
||||
# When a client joins
|
||||
if (( CURR_CLIENTCONNECTIONS > CLIENTCONNECTIONS )) && [[ "$RCON_CMDS_ON_CONNECT" ]]; then
|
||||
logRcon "Clients have Connected, running connect cmds"
|
||||
while read -r cmd; do
|
||||
run_command "$cmd"
|
||||
done <<< "$RCON_CMDS_ON_CONNECT"
|
||||
# When a client leaves
|
||||
elif (( CURR_CLIENTCONNECTIONS < CLIENTCONNECTIONS )) && [[ "$RCON_CMDS_ON_DISCONNECT" ]]; then
|
||||
logRcon "Clients have Disconnected, running disconnect cmds"
|
||||
while read -r cmd; do
|
||||
run_command "$cmd"
|
||||
done <<< "$RCON_CMDS_ON_DISCONNECT"
|
||||
fi
|
||||
|
||||
# Last client connection
|
||||
# Setting priority run order: on last client connection is usually to START maintence, aka DO THIS LAST
|
||||
if (( CURR_CLIENTCONNECTIONS == 0 )) && (( CLIENTCONNECTIONS > 0 )) && [[ "$RCON_CMDS_LAST_DISCONNECT" ]]; then
|
||||
logRcon "ALL Clients have Disconnected, running last disconnect cmds"
|
||||
while read -r cmd; do
|
||||
run_command "$cmd"
|
||||
done <<< "$RCON_CMDS_LAST_DISCONNECT"
|
||||
fi
|
||||
CLIENTCONNECTIONS=$CURR_CLIENTCONNECTIONS
|
||||
;;
|
||||
*)
|
||||
logRcon "Error: invalid state: $STATE"
|
||||
;;
|
||||
esac
|
||||
sleep "$RCON_CMDS_PERIOD"
|
||||
done
|
||||
26
build/alpine/install-packages.sh
Executable file
26
build/alpine/install-packages.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
apk add --no-cache -U \
|
||||
openssl \
|
||||
imagemagick \
|
||||
file \
|
||||
lsof \
|
||||
su-exec \
|
||||
coreutils \
|
||||
findutils \
|
||||
procps \
|
||||
shadow \
|
||||
bash \
|
||||
curl iputils \
|
||||
git \
|
||||
jq \
|
||||
mysql-client \
|
||||
tzdata \
|
||||
rsync \
|
||||
nano \
|
||||
sudo \
|
||||
knock \
|
||||
tar \
|
||||
zstd
|
||||
6
build/alpine/setup-user.sh
Executable file
6
build/alpine/setup-user.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
addgroup -g 1000 minecraft
|
||||
adduser -Ss /bin/false -u 1000 -G minecraft -h /home/minecraft minecraft
|
||||
12
build/ol/install-gosu.sh
Executable file
12
build/ol/install-gosu.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ $(uname -m) == "aarch64" ]]; then
|
||||
curl -sL -o /bin/gosu https://github.com/tianon/gosu/releases/download/1.14/gosu-arm64
|
||||
chmod +x /bin/gosu
|
||||
elif [[ $(uname -m) == "x86_64" ]]; then
|
||||
curl -sL -o /bin/gosu https://github.com/tianon/gosu/releases/download/1.14/gosu-amd64
|
||||
chmod +x /bin/gosu
|
||||
else
|
||||
echo "Not supported!"
|
||||
exit 1
|
||||
fi
|
||||
38
build/ol/install-packages.sh
Executable file
38
build/ol/install-packages.sh
Executable file
@@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
microdnf install dnf -y
|
||||
|
||||
dnf install 'dnf-command(config-manager)' -y
|
||||
dnf config-manager --set-enabled ol8_codeready_builder
|
||||
tee /etc/yum.repos.d/ol8-epel.repo<<EOF
|
||||
[ol8_developer_EPEL]
|
||||
name= Oracle Linux \$releasever EPEL (\$basearch)
|
||||
baseurl=https://yum.oracle.com/repo/OracleLinux/OL8/developer/EPEL/\$basearch/
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
|
||||
gpgcheck=1
|
||||
enabled=1
|
||||
EOF
|
||||
dnf update -y
|
||||
|
||||
dnf install -y ImageMagick \
|
||||
file \
|
||||
sudo \
|
||||
net-tools \
|
||||
iputils \
|
||||
curl \
|
||||
git \
|
||||
jq \
|
||||
dos2unix \
|
||||
mysql \
|
||||
procps-ng \
|
||||
tzdata \
|
||||
rsync \
|
||||
nano \
|
||||
unzip \
|
||||
zstd \
|
||||
lbzip2 \
|
||||
knock
|
||||
|
||||
bash /build/ol/install-gosu.sh
|
||||
2
build/ol/setup-user.sh
Executable file
2
build/ol/setup-user.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
groupadd --gid 1000 minecraft
|
||||
useradd --system --shell /bin/false --uid 1000 -g minecraft --home /data minecraft
|
||||
7
build/run.sh
Executable file
7
build/run.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
distro=$(cat /etc/os-release | grep -E "^ID=" | cut -d= -f2 | sed -e 's/"//g')
|
||||
|
||||
"$(dirname "$0")/${distro}/$1".sh
|
||||
28
build/ubuntu/install-packages.sh
Executable file
28
build/ubuntu/install-packages.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
apt-get update
|
||||
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
apt-get install -y \
|
||||
imagemagick \
|
||||
file \
|
||||
gosu \
|
||||
sudo \
|
||||
net-tools \
|
||||
iputils-ping \
|
||||
curl \
|
||||
git \
|
||||
jq \
|
||||
dos2unix \
|
||||
mysql-client \
|
||||
tzdata \
|
||||
rsync \
|
||||
nano \
|
||||
unzip \
|
||||
zstd \
|
||||
lbzip2 \
|
||||
knockd
|
||||
|
||||
apt-get clean
|
||||
6
build/ubuntu/setup-user.sh
Executable file
6
build/ubuntu/setup-user.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
addgroup --gid 1000 minecraft
|
||||
adduser --system --shell /bin/false --uid 1000 --ingroup minecraft --home /data minecraft
|
||||
@@ -1,16 +1,16 @@
|
||||
version: '3'
|
||||
# Other docker-compose examples in /examples
|
||||
|
||||
services:
|
||||
minecraft:
|
||||
image: itzg/minecraft-server
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- "mc:/data"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
restart: always
|
||||
|
||||
volumes:
|
||||
mc: {}
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: "true"
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- data:/data
|
||||
stdin_open: true
|
||||
tty: true
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
data: {}
|
||||
@@ -1,134 +0,0 @@
|
||||
#!/bin/bash
|
||||
#set -x
|
||||
# Use this variable to indicate a list of branches that docker hub is watching
|
||||
branches_list=(
|
||||
'java8'
|
||||
'java8-multiarch'
|
||||
'openj9'
|
||||
'openj9-11'
|
||||
'adopt11'
|
||||
'java15'
|
||||
'java15-openj9'
|
||||
'multiarch'
|
||||
'multiarch-latest'
|
||||
)
|
||||
|
||||
function TrapExit {
|
||||
echo "Checking out back in master"
|
||||
git checkout master
|
||||
}
|
||||
|
||||
batchMode=false
|
||||
|
||||
while getopts "hbt:s" arg
|
||||
do
|
||||
case $arg in
|
||||
b)
|
||||
batchMode=true
|
||||
;;
|
||||
t)
|
||||
tag=${OPTARG}
|
||||
;;
|
||||
s)
|
||||
tagArgs="-s -m 'Signed during docker-versions-create"
|
||||
;;
|
||||
h)
|
||||
echo "
|
||||
Usage $0 [options]
|
||||
|
||||
Options:
|
||||
-b enable batch mode, which avoids interactive prompts and causes script to fail immediately
|
||||
when any merge fails
|
||||
-t TAG tag and push the current revision on master with the given tag
|
||||
and apply respective tags to each branch
|
||||
-s enable signed tags
|
||||
-h display this help and exit
|
||||
"
|
||||
exit
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported arg $arg"
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
${batchMode} && echo "Using batch mode"
|
||||
|
||||
trap TrapExit EXIT SIGTERM
|
||||
|
||||
test -d ./.git || { echo ".git folder was not found. Please start this script from root directory of the project!";
|
||||
exit 1; }
|
||||
|
||||
# Making sure we are in master
|
||||
git checkout master
|
||||
git pull --all || { echo "Can't pull the repo!"; \
|
||||
exit 1; }
|
||||
if [[ $tag ]]; then
|
||||
git tag $tag
|
||||
git push origin $tag
|
||||
fi
|
||||
|
||||
git_branches=$(git branch -a)
|
||||
|
||||
for branch in "${branches_list[@]}"; do
|
||||
if [[ "$git_branches" != *"$branch"* ]]; then
|
||||
echo "Can't update $branch because I can't find it in the list of branches."
|
||||
exit 1
|
||||
else
|
||||
echo "Branch $branch found. Working with it."
|
||||
git checkout "$branch" || { echo "Can't checkout into the branch. Don't know the cause."; \
|
||||
exit 1; }
|
||||
proceed='False'
|
||||
while [[ "$proceed" == "False" ]]; do
|
||||
# Ensure local branch is aligned with remote since docker-versions-create may have been run elsewhere
|
||||
git pull
|
||||
|
||||
if git merge -m 'Auto-merging via docker-versions-create' master; then
|
||||
proceed="True"
|
||||
echo "Branch $branch updated to current master successfully"
|
||||
# pushing changes to remote for this branch
|
||||
git commit -m "Auto merge branch with master" -a
|
||||
# push may fail if remote doesn't have this branch yet. In this case - sending branch
|
||||
git push || git push -u origin "$branch" || { echo "Can't push changes to the origin."; exit 1; }
|
||||
if [[ $tag ]]; then
|
||||
git tag "$tag-$branch"
|
||||
git push origin "$tag-$branch"
|
||||
fi
|
||||
elif ${batchMode}; then
|
||||
status=$?
|
||||
echo "Git merge failed in batch mode"
|
||||
exit ${status}
|
||||
# and trap exit gets us back to master
|
||||
else
|
||||
cat<<EOL
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
Master merge in the branch $branch encountered an error!
|
||||
You may try to fix the error and merge again. (Commit changes)
|
||||
Or skip this branch merge completely.
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
EOL
|
||||
printf "Should we try again? (y):"
|
||||
read -r answer
|
||||
if [[ "$answer" == '' ]] || [[ "$answer" == 'y' ]] || [[ "$answer" == 'Y' ]]; then
|
||||
# If you use non-local editor or files are changed in repo
|
||||
cat <<EOL
|
||||
|
||||
The following commands may encounter an error!
|
||||
This is completely fine if the changes were made locally and remote branch doesn't know about them.
|
||||
|
||||
EOL
|
||||
# Updating branch from remote before trying again
|
||||
git checkout master
|
||||
git fetch --all
|
||||
git pull -a
|
||||
git checkout "$branch"
|
||||
continue
|
||||
else
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
done
|
||||
BIN
docs/ftba-identifier-popup.png
Normal file
BIN
docs/ftba-identifier-popup.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 83 KiB |
BIN
docs/ftba-version-id-popup.png
Normal file
BIN
docs/ftba-version-id-popup.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 85 KiB |
BIN
docs/motd-example.png
Normal file
BIN
docs/motd-example.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 985 B |
BIN
docs/world-copy-compose-project.drawio.png
Normal file
BIN
docs/world-copy-compose-project.drawio.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 65 KiB |
2
examples/.gitignore
vendored
Normal file
2
examples/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/data/
|
||||
modpacks/
|
||||
@@ -12,7 +12,10 @@ services:
|
||||
ENABLE_AUTOPAUSE: "TRUE"
|
||||
OVERRIDE_SERVER_PROPERTIES: "TRUE"
|
||||
MAX_TICK_TIME: "-1"
|
||||
restart: always
|
||||
# More aggressive settings for demo purposes
|
||||
AUTOPAUSE_TIMEOUT_INIT: "30"
|
||||
AUTOPAUSE_TIMEOUT_EST: "10"
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
mc: {}
|
||||
|
||||
20
examples/docker-compose-autostop.yml
Normal file
20
examples/docker-compose-autostop.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
minecraft:
|
||||
image: itzg/minecraft-server
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- "mc:/data"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
ENABLE_AUTOSTOP: "TRUE"
|
||||
# More aggressive settings for demo purposes
|
||||
AUTOSTOP_TIMEOUT_INIT: "30"
|
||||
AUTOSTOP_TIMEOUT_EST: "20"
|
||||
# Important not to auto-restart the server!!!
|
||||
restart: "no"
|
||||
|
||||
volumes:
|
||||
mc: {}
|
||||
@@ -1,4 +1,4 @@
|
||||
version: '3'
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
minecraft:
|
||||
|
||||
@@ -1,13 +1,21 @@
|
||||
version: '3.2'
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java8
|
||||
image: itzg/minecraft-server:${IMAGE_TAG:-java8}
|
||||
volumes:
|
||||
- ./modpacks:/modpacks:ro
|
||||
- data:/data
|
||||
environment:
|
||||
EULA: "true"
|
||||
TYPE: CURSEFORGE
|
||||
CF_SERVER_MOD: /modpacks/SkyFactory_4_Server_4.1.0.zip
|
||||
CF_SERVER_MOD: /modpacks/SIMPLE-SERVER-FILES-0.3.20.zip
|
||||
# CF_SERVER_MOD: /modpacks/createlive3serverfiles+1.4.2.zip
|
||||
# CF_SERVER_MOD: /modpacks/Valhelsia+3-3.5.1-SERVER.zip
|
||||
# CF_SERVER_MOD: https://media.forgecdn.net/files/3012/800/SkyFactory-4_Server_4.2.2.zip
|
||||
# CF_SERVER_MOD: /modpacks/${MODPACK:-SkyFactory_4_Server_4.1.0.zip}
|
||||
ports:
|
||||
- 25565:25565
|
||||
- "25565:25565"
|
||||
|
||||
volumes:
|
||||
data: {}
|
||||
15
examples/docker-compose-fabric.yml
Normal file
15
examples/docker-compose-fabric.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: ${IMAGE:-itzg/minecraft-server}
|
||||
environment:
|
||||
EULA: "true"
|
||||
TYPE: FABRIC
|
||||
ports:
|
||||
- 25565:25565
|
||||
volumes:
|
||||
- fabric:/data
|
||||
|
||||
volumes:
|
||||
fabric: {}
|
||||
@@ -1,16 +1,17 @@
|
||||
version: "3.7"
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java8
|
||||
image: itzg/minecraft-server
|
||||
ports:
|
||||
# expose the Minecraft server port outside of container
|
||||
- 25565:25565
|
||||
- "25565:25565"
|
||||
environment:
|
||||
# REQUIRED for all types
|
||||
EULA: "TRUE"
|
||||
# Set server type (vs the default of vanilla)
|
||||
TYPE: FORGE
|
||||
DEBUG: "true"
|
||||
volumes:
|
||||
# use a named, managed volume for data volume
|
||||
- mc_forge:/data
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
version: "3.7"
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
# FTBA support is only available in non-Alpine images
|
||||
image: itzg/minecraft-server:java8-multiarch
|
||||
image: itzg/minecraft-server:${IMAGE_TAG:-java8-multiarch}
|
||||
ports:
|
||||
# expose the Minecraft server port outside of container
|
||||
- 25565:25565
|
||||
@@ -14,10 +14,11 @@ services:
|
||||
TYPE: FTBA
|
||||
# Use Pack ID from https://ftb.neptunepowered.org/pack/ftb-presents-direwolf20-1-12/
|
||||
FTB_MODPACK_ID: "31"
|
||||
FTB_MODPACK_VERSION_ID: ""
|
||||
volumes:
|
||||
# use a named, managed volume for data volume
|
||||
- mc_ftb:/data
|
||||
- ftba:/data
|
||||
|
||||
volumes:
|
||||
# declared the named volume, but use default/local storage engine
|
||||
mc_ftb: {}
|
||||
ftba: {}
|
||||
|
||||
19
examples/docker-compose-generic-pack-atm7.yml
Normal file
19
examples/docker-compose-generic-pack-atm7.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
volumes:
|
||||
- ./data:/data
|
||||
- ./modpacks:/modpacks:ro
|
||||
environment:
|
||||
EULA: "true"
|
||||
MEMORY: 2G
|
||||
TYPE: FORGE
|
||||
VERSION: 1.18.2
|
||||
FORGEVERSION: 40.1.30
|
||||
# Need to download Server-Files-0.4.13.zip and
|
||||
# put it in modpacks directory next to this compose file
|
||||
GENERIC_PACK: /modpacks/Server-Files-0.4.13.zip
|
||||
ports:
|
||||
- "25565:25565"
|
||||
160
examples/docker-compose-generic-pack-tnp5.yml
Normal file
160
examples/docker-compose-generic-pack-tnp5.yml
Normal file
@@ -0,0 +1,160 @@
|
||||
version: '3.8'
|
||||
|
||||
####################################################################
|
||||
# FORGE GENERIC_PACK #
|
||||
# #
|
||||
# Date: 20220828 #
|
||||
# #
|
||||
# Mod: TNP Limitless 5 v2.19.0 #
|
||||
# #
|
||||
# Notes: Verify that there is no EULA file in the modpack.zip #
|
||||
# if you do not delete it the EULA flag below will be #
|
||||
# overwritten when the modpack is copied and the server #
|
||||
# will not start. #
|
||||
# #
|
||||
####################################################################
|
||||
services:
|
||||
|
||||
####################################################################
|
||||
# Service Name #
|
||||
# #
|
||||
# Define Service Name here. If using RCON this name will be #
|
||||
# referenced again as RWA_RCON_HOST below. #
|
||||
# #
|
||||
# Example: 'name:' or 'mc_atm6:' #
|
||||
####################################################################
|
||||
mc_tnp5:
|
||||
|
||||
####################################################################
|
||||
# Image & Container Name #
|
||||
# #
|
||||
# Specify Image Name and Java Version. The 'image' will always be #
|
||||
# 'itzg/minecraft-server' however the tag added to the end is #
|
||||
# where you can specify the java version or container architecture.#
|
||||
# See readme.md for a full list. #
|
||||
# #
|
||||
# 'container_name:' This can be anything you like. This is the name#
|
||||
# that will show when you run 'docker ps' commands. #
|
||||
####################################################################
|
||||
image: itzg/minecraft-server
|
||||
container_name: mc_tnp5
|
||||
|
||||
####################################################################
|
||||
# Server Ports #
|
||||
# #
|
||||
# Specify external port. #
|
||||
####################################################################
|
||||
ports:
|
||||
- 25565:25565
|
||||
|
||||
####################################################################
|
||||
# Automatic Server Restart #
|
||||
# #
|
||||
# Define a restart policy here. #
|
||||
# - 'no' = Do not restart. #
|
||||
# - 'on-failure' = Restart if container exits because an error. #
|
||||
# - 'always' = Regardless of stop reason. #
|
||||
# - 'unless-stopped' = Similar to always except if stopped. #
|
||||
####################################################################
|
||||
restart: unless-stopped
|
||||
|
||||
####################################################################
|
||||
# Volume and Folder Access #
|
||||
# #
|
||||
# This section defines what folders and volumes you want to give #
|
||||
# this container access to. It is recommended to leaves these set #
|
||||
# to the default values unless you know what you are doing. #
|
||||
# #
|
||||
# Place your mod zip file in a folder called 'modpacks' in the #
|
||||
# same directory you place this docker-compose file. #
|
||||
# #
|
||||
# Specify the data volume name or directory here as well. #
|
||||
# In this example the volume name is 'data'. When docker creates #
|
||||
# the volume it will add what ever name you give it here to the #
|
||||
# end of the container name specified above. In this example it #
|
||||
# would be named 'mc_atm6_data'. If you change this be sure to #
|
||||
# update the volume name at the bottom of this config. #
|
||||
####################################################################
|
||||
volumes:
|
||||
- ./modpacks:/modpacks:ro
|
||||
- data:/data
|
||||
|
||||
####################################################################
|
||||
# EULA #
|
||||
# #
|
||||
# Accept EULA by setting to "true" #
|
||||
####################################################################
|
||||
environment:
|
||||
EULA: "true"
|
||||
|
||||
####################################################################
|
||||
# FORGE INSTALL #
|
||||
# #
|
||||
# Sets install type to FORGE and specifys the zip folder name #
|
||||
# and location of your mod pack. #
|
||||
# #
|
||||
# TYPE: Defines the install type as FORGE #
|
||||
# #
|
||||
# VERSION: Defines the version of MC the modpack is based on. #
|
||||
# #
|
||||
# FORGEVERSION: Defines the version of FORGE the modpack uses. #
|
||||
# This can usually be found in the modpack.zip as #
|
||||
# installer.jar #
|
||||
# #
|
||||
# GENERIC_PACK: Define where the modpack.zip is located. #
|
||||
# #
|
||||
# Place your mod zip file in a folder called 'modpacks' in the #
|
||||
# same directory you place this docker-compose file. #
|
||||
####################################################################
|
||||
TYPE: FORGE
|
||||
VERSION: 1.18.2
|
||||
FORGEVERSION: 40.1.73
|
||||
GENERIC_PACK: /modpacks/tnp5.zip
|
||||
|
||||
####################################################################
|
||||
# Server Memory #
|
||||
# #
|
||||
# Set Maximum amount of memory allowed for your server. #
|
||||
####################################################################
|
||||
MEMORY: "8G"
|
||||
|
||||
####################################################################
|
||||
# Logging Options #
|
||||
# #
|
||||
# Set to "true" to delete old logs #
|
||||
####################################################################
|
||||
ENABLE_ROLLING_LOGS: "true"
|
||||
|
||||
####################################################################
|
||||
# Server Timezone #
|
||||
# #
|
||||
# Specify server Timezone #
|
||||
####################################################################
|
||||
TZ: "America/New_York"
|
||||
|
||||
####################################################################
|
||||
# Minecraft Game Options #
|
||||
# #
|
||||
# List any game options you want to define here. A full list can #
|
||||
# be found on the readme.md page on github. #
|
||||
####################################################################
|
||||
OVERRIDE_SERVER_PROPERTIES: "true"
|
||||
DIFFICULTY: "easy"
|
||||
MAX_TICK_TIME: "-1"
|
||||
VIEW_DISTANCE: "6"
|
||||
ALLOW_FLIGHT: "true"
|
||||
OPS: ""
|
||||
VIEW_DISTANCE: 10
|
||||
MAX_PLAYERS: 10
|
||||
PVP: "false"
|
||||
LEVEL_TYPE: "biomesoplenty"
|
||||
MOTD: "Welcome Home"
|
||||
|
||||
####################################################################
|
||||
# Volumes #
|
||||
# #
|
||||
# Define data volume name here. You should leave this set to the #
|
||||
# default. #
|
||||
####################################################################
|
||||
volumes:
|
||||
data:
|
||||
21
examples/docker-compose-generic-pack.yml
Normal file
21
examples/docker-compose-generic-pack.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:${IMAGE_TAG:-latest}
|
||||
volumes:
|
||||
- data:/data
|
||||
- ./modpacks:/modpacks:ro
|
||||
environment:
|
||||
EULA: "true"
|
||||
TYPE: FORGE
|
||||
DEBUG: "${DEBUG:-false}"
|
||||
VERSION: ${VERSION:-1.17.1}
|
||||
FORGEVERSION: ${FORGEVERSION:-37.0.90}
|
||||
GENERIC_PACK: /modpacks/${MODPACK:-Server-Files-0.0.21.zip}
|
||||
REMOVE_OLD_MODS: "${REMOVE_OLD_MODS:-false}"
|
||||
ports:
|
||||
- "25565:25565"
|
||||
|
||||
volumes:
|
||||
data: {}
|
||||
17
examples/docker-compose-magma.yml
Normal file
17
examples/docker-compose-magma.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java8
|
||||
tty: true
|
||||
stdin_open: true
|
||||
ports:
|
||||
- "25565:25565"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: MAGMA
|
||||
VERSION: 1.16.5
|
||||
volumes:
|
||||
- data:/data
|
||||
volumes:
|
||||
data: {}
|
||||
18
examples/docker-compose-modrinth.yml
Normal file
18
examples/docker-compose-modrinth.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
tty: true
|
||||
stdin_open: true
|
||||
ports:
|
||||
- "25565:25565"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: FABRIC
|
||||
MODRINTH_PROJECTS: fallingtree
|
||||
volumes:
|
||||
- data:/data
|
||||
|
||||
volumes:
|
||||
data: {}
|
||||
19
examples/docker-compose-mods-file.yml
Normal file
19
examples/docker-compose-mods-file.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: "true"
|
||||
TYPE: FORGE
|
||||
VERSION: 1.15.2
|
||||
MODS_FILE: /extras/mods.txt
|
||||
REMOVE_OLD_MODS: "true"
|
||||
ports:
|
||||
- 25565:25565
|
||||
volumes:
|
||||
- data:/data
|
||||
- ./mods.txt:/extras/mods.txt:ro
|
||||
|
||||
volumes:
|
||||
data:
|
||||
21
examples/docker-compose-mods-mount.yml
Normal file
21
examples/docker-compose-mods-mount.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
minecraft:
|
||||
image: itzg/minecraft-server
|
||||
volumes:
|
||||
- data:/data
|
||||
- ./mods:/mods
|
||||
ports:
|
||||
- "25565:25565"
|
||||
environment:
|
||||
EULA: "true"
|
||||
TYPE: "FORGE"
|
||||
VERSION: "1.19.2"
|
||||
DEBUG: "true"
|
||||
SETUP_ONLY: "true"
|
||||
tty: True
|
||||
stdin_open: True
|
||||
|
||||
volumes:
|
||||
data: {}
|
||||
17
examples/docker-compose-mohist.yml
Normal file
17
examples/docker-compose-mohist.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
ports:
|
||||
- "25565:25565"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: MOHIST
|
||||
VERSION: 1.12.2
|
||||
DEBUG: "true"
|
||||
volumes:
|
||||
- data:/data
|
||||
|
||||
volumes:
|
||||
data: {}
|
||||
@@ -1,18 +1,19 @@
|
||||
version: '3.7'
|
||||
|
||||
version: '3.8'
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
container_name: paper
|
||||
environment:
|
||||
EULA: "true"
|
||||
ENABLE_RCON: "true"
|
||||
TYPE: PAPER
|
||||
VERSION: 1.9.4
|
||||
# needed for Paper versions before 1.14
|
||||
VIEW_DISTANCE: 10
|
||||
MEMORY: 2G
|
||||
CONSOLE: "false"
|
||||
ports:
|
||||
- 25565:25565
|
||||
volumes:
|
||||
- mc-paper:/data
|
||||
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
mc-paper:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
version: '3'
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
mc:
|
||||
|
||||
36
examples/docker-compose-rconcmd.yml
Normal file
36
examples/docker-compose-rconcmd.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
minecraft:
|
||||
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- "mc:/data"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: FABRIC
|
||||
MODS_FORGEAPI_PROJECTIDS: 433175
|
||||
MODS_FORGEAPI_KEY: ${MODS_FORGEAPI_KEY}
|
||||
MODS_FORGEAPI_DOWNLOAD_DEPENDENCIES: "TRUE"
|
||||
REMOVE_OLD_FORGEAPI_MODS: "TRUE"
|
||||
# YAML Heredoc, be sure to use '|-' this will remove the first newline and final new line.
|
||||
# This is versus '|' that will leaving with two empty strings at top and bottom.
|
||||
RCON_CMDS_STARTUP: |-
|
||||
/gamerule doFireTick false
|
||||
/team add New
|
||||
/team add Old
|
||||
/chunky radius 1000
|
||||
/chunky start
|
||||
RCON_CMDS_ON_CONNECT: |-
|
||||
/team join New @a[team=]
|
||||
/give @a[team=New] birch_boat
|
||||
/team join Old @a[team=New]
|
||||
RCON_CMDS_FIRST_CONNECT: |-
|
||||
/chunky pause
|
||||
RCON_CMDS_LAST_DISCONNECT: |-
|
||||
/kill @e[type=minecraft:boat]
|
||||
/chunky continue
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
mc: {}
|
||||
27
examples/docker-compose-rlcraft.yml
Normal file
27
examples/docker-compose-rlcraft.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java8
|
||||
volumes:
|
||||
- data:/data
|
||||
- ./modpacks:/modpacks:ro
|
||||
environment:
|
||||
EULA: "true"
|
||||
TYPE: "FORGE"
|
||||
VERSION: "1.12.2"
|
||||
FORGEVERSION: "14.23.5.2860"
|
||||
OVERRIDE_SERVER_PROPERTIES: "true"
|
||||
DIFFICULTY: "hard"
|
||||
MAX_TICK_TIME: "-1"
|
||||
ALLOW_FLIGHT: "true"
|
||||
ENABLE_COMMAND_BLOCK: "true"
|
||||
VIEW_DISTANCE: "10"
|
||||
MEMORY: "4G"
|
||||
# Download from https://www.curseforge.com/minecraft/modpacks/rlcraft and place in modpacks subdir
|
||||
GENERIC_PACK: "/modpacks/RLCraft+Server+Pack+1.12.2+-+Release+v2.9.1c.zip"
|
||||
ports:
|
||||
- 25565:25565
|
||||
|
||||
volumes:
|
||||
data:
|
||||
@@ -1,8 +1,10 @@
|
||||
version: "3"
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
tty: true
|
||||
stdin_open: true
|
||||
ports:
|
||||
- 25565:25565
|
||||
environment:
|
||||
|
||||
20
examples/docker-compose-spiget.yml
Normal file
20
examples/docker-compose-spiget.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
mc:
|
||||
# Only using IMAGE variable to allow for local testing
|
||||
image: itzg/minecraft-server
|
||||
# image: ${IMAGE:-itzg/minecraft-server}
|
||||
ports:
|
||||
- "25565:25565"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: SPIGOT
|
||||
# SPIGET_RESOURCES: 34315,3836
|
||||
SPIGET_RESOURCES: ""
|
||||
REMOVE_OLD_MODS: "true"
|
||||
volumes:
|
||||
- data:/data
|
||||
|
||||
volumes:
|
||||
data: {}
|
||||
@@ -1,4 +1,4 @@
|
||||
version: '3'
|
||||
version: '3.8'
|
||||
# Forge with Sponge API support. THIS REQUIRES DOWNLOADING SPONGEFORGE.
|
||||
# Place the SpongeForge jar file in /data/mods. Other Forge mods go here as well.
|
||||
# Place Sponge mods in /data/mods/plugins. Yes, this is a directory inside the Forge mod directory. Do NOT use /data/plugins.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
version: "3.7"
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
|
||||
16
examples/docker-compose.yml
Normal file
16
examples/docker-compose.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
version: '3'
|
||||
# Other docker-compose examples in /examples
|
||||
|
||||
services:
|
||||
minecraft:
|
||||
image: itzg/minecraft-server
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- "mc:/data"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
restart: always
|
||||
|
||||
volumes:
|
||||
mc: {}
|
||||
@@ -3,18 +3,18 @@ apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
labels:
|
||||
app: example
|
||||
name: example
|
||||
app: mc-example
|
||||
name: mc-example
|
||||
spec:
|
||||
replicas: 1
|
||||
serviceName: example
|
||||
serviceName: mc-example
|
||||
selector:
|
||||
matchLabels:
|
||||
app: example
|
||||
app: mc-example
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: example
|
||||
app: mc-example
|
||||
spec:
|
||||
containers:
|
||||
- name: mc
|
||||
@@ -25,6 +25,18 @@ spec:
|
||||
volumeMounts:
|
||||
- mountPath: /data
|
||||
name: data
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- mc-monitor
|
||||
- status
|
||||
- --host
|
||||
- localhost
|
||||
- --port
|
||||
- "25565"
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 5
|
||||
failureThreshold: 18
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
@@ -39,12 +51,12 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
service: example
|
||||
name: example
|
||||
service: mc-example
|
||||
name: mc-example
|
||||
spec:
|
||||
ports:
|
||||
- port: 25565
|
||||
targetPort: 25565
|
||||
selector:
|
||||
app: example
|
||||
type: LoadBalancer
|
||||
app: mc-example
|
||||
type: NodePort
|
||||
|
||||
@@ -35,20 +35,17 @@ spec:
|
||||
name: main
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- mcstatus
|
||||
- localhost
|
||||
- ping
|
||||
initialDelaySeconds: 5
|
||||
command: [ "/usr/local/bin/mc-monitor", "status", "--host", "localhost" ]
|
||||
# Give it i + p * f seconds to be ready, so 120 seconds
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 5
|
||||
failureThreshold: 20
|
||||
# Monitor ongoing liveness
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- mcstatus
|
||||
- localhost
|
||||
- ping
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
command: ["/usr/local/bin/mc-monitor", "status", "--host", "localhost"]
|
||||
initialDelaySeconds: 120
|
||||
periodSeconds: 60
|
||||
volumeMounts:
|
||||
- name: mc-data
|
||||
mountPath: /data
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
Place server [modpacks downloaded from CurseForge](https://www.curseforge.com/minecraft/modpacks) in this directory.
|
||||
|
||||
The example [`docker-compose-curseforge.yml`](../docker-compose-curseforge.yml) references a modpack downloaded from <https://www.curseforge.com/minecraft/modpacks/skyfactory-4/files/2787018>.
|
||||
The example [`docker-compose-curseforge.yml`](../docker-compose-curseforge.yml) references a modpack downloaded from <https://www.curseforge.com/minecraft/modpacks/skyfactory-4/files/3012800>.
|
||||
|
||||
80
examples/mods.txt
Normal file
80
examples/mods.txt
Normal file
@@ -0,0 +1,80 @@
|
||||
https://edge.forgecdn.net/files/2965/233/Bookshelf-1.15.2-5.6.40.jar
|
||||
https://edge.forgecdn.net/files/2926/27/ProgressiveBosses-2.1.5-mc1.15.2.jar
|
||||
https://edge.forgecdn.net/files/3248/905/goblintraders-1.3.1-1.15.2.jar
|
||||
https://edge.forgecdn.net/files/3272/32/jei-1.15.2-6.0.3.16.jar
|
||||
https://edge.forgecdn.net/files/2871/647/ToastControl-1.15.2-3.0.1.jar
|
||||
https://edge.forgecdn.net/files/3101/903/Druidcraft-1.15-0.4.45.jar
|
||||
https://edge.forgecdn.net/files/2880/426/DefaultOptions_1.15.2-11.0.1.jar
|
||||
https://edge.forgecdn.net/files/2996/535/MekanismAdditions-1.15.2-9.10.9.422.jar
|
||||
https://edge.forgecdn.net/files/3147/275/blockcarpentry-1.15-0.8.2.jar
|
||||
https://edge.forgecdn.net/files/3005/715/refinedstorageaddons-0.6.3.jar
|
||||
https://edge.forgecdn.net/files/3140/146/rftoolsbase-1.15-1.1.10.jar
|
||||
https://edge.forgecdn.net/files/3236/649/cc-tweaked-1.15.2-1.95.3.jar
|
||||
https://edge.forgecdn.net/files/3048/970/light-overlay-4.7.2.jar
|
||||
https://edge.forgecdn.net/files/3015/904/randompatches-1.15.2-1.22.1.1.jar
|
||||
https://edge.forgecdn.net/files/3131/439/engineersdecor-1.15.2-1.1.4.jar
|
||||
https://edge.forgecdn.net/files/3051/255/carryon-1.15.2-1.13.0.5.jar
|
||||
https://edge.forgecdn.net/files/3175/752/EnderStorage-1.15.2-2.5.2.164-universal.jar
|
||||
https://edge.forgecdn.net/files/2997/84/Savage-and-Ravage-1.15.2-1.1.4.jar
|
||||
https://edge.forgecdn.net/files/3053/840/PackMenu-1.15.2-1.2.8.jar
|
||||
https://edge.forgecdn.net/files/3003/397/JEITweaker-1.15.2-1.0.1.3.jar
|
||||
https://edge.forgecdn.net/files/3069/489/absentbydesign-1.15.2-1.1.1.jar
|
||||
https://edge.forgecdn.net/files/2997/601/Upgrade-Aquatic-1.15.2-1.7.1.jar
|
||||
https://edge.forgecdn.net/files/2950/766/ReAuth-1.14-1.15-3.8.1.jar
|
||||
https://edge.forgecdn.net/files/3024/179/Powah-1.15.2-1.1.15.jar
|
||||
https://edge.forgecdn.net/files/3092/975/StorageDrawers-1.15.2-7.0.3.jar
|
||||
https://edge.forgecdn.net/files/2853/267/furniture-7.0.0-pre16-1.15.1.jar
|
||||
https://edge.forgecdn.net/files/2987/251/AppleSkin-mc1.15.2-forge-1.0.14.jar
|
||||
https://edge.forgecdn.net/files/2980/323/industrial-foregoing-1.15.2-2.3.3-e356e61.jar
|
||||
https://edge.forgecdn.net/files/3024/178/Lollipop-1.15.2-1.0.16.jar
|
||||
https://edge.forgecdn.net/files/3210/106/tablechair-1.4.jar
|
||||
https://edge.forgecdn.net/files/3047/358/xercapaint-1.15.2-3.3.jar
|
||||
https://edge.forgecdn.net/files/2873/657/BonsaiTrees-2.1.2.6.jar
|
||||
https://edge.forgecdn.net/files/2938/583/config-2-3.0.jar
|
||||
https://edge.forgecdn.net/files/2991/235/Waystones_1.15.2-6.0.2.jar
|
||||
https://edge.forgecdn.net/files/2957/23/OpenLoader-1.15.2-4.0.5.jar
|
||||
https://edge.forgecdn.net/files/3275/718/XaerosWorldMap_1.13.2_Forge_1.15.2.jar
|
||||
https://edge.forgecdn.net/files/2876/104/AI-Improvements-1.15.2-0.3.0.jar
|
||||
https://edge.forgecdn.net/files/3005/515/mysticallib-1.15.2-2.0.1.jar
|
||||
https://edge.forgecdn.net/files/3008/867/WAWLA-1.15.2-3.0.4.jar
|
||||
https://edge.forgecdn.net/files/2964/474/WailaHarvestability-mc1.15.2-1.1.12.jar
|
||||
https://edge.forgecdn.net/files/3103/508/Kiwi-1.15.2-2.8.5.jar
|
||||
https://edge.forgecdn.net/files/3128/662/Atum-1.15.2-2.1.12.jar
|
||||
https://edge.forgecdn.net/files/2988/910/Buzzier-Bees-1.15.2-1.5.2.jar
|
||||
https://edge.forgecdn.net/files/3030/627/u_team_core-1.15.2-3.0.2.169.jar
|
||||
https://edge.forgecdn.net/files/3003/984/SilentLib-1.15.2-4.6.6+59.jar
|
||||
https://edge.forgecdn.net/files/2968/353/refinedpipes-0.4.2.jar
|
||||
https://edge.forgecdn.net/files/3140/149/rftoolsbuilder-1.15-2.1.16.jar
|
||||
https://edge.forgecdn.net/files/3067/203/mightyarchitect-mc1.15.2_v0.5.jar
|
||||
https://edge.forgecdn.net/files/2980/153/EquipmentTooltips-1.15.2-1.4.3+14.jar
|
||||
https://edge.forgecdn.net/files/3103/510/FruitTrees-1.15.2-1.7.0.jar
|
||||
https://edge.forgecdn.net/files/2989/38/Atmospheric-1.15.2-1.4.1.jar
|
||||
https://edge.forgecdn.net/files/3096/836/rftoolscontrol-1.15-3.0.9.jar
|
||||
https://edge.forgecdn.net/files/2989/662/Enhanced-Mushrooms-1.15.2-v1.2.2.jar
|
||||
https://edge.forgecdn.net/files/3227/891/SimpleStorageNetwork-1.15.2-1.0.2.jar
|
||||
https://edge.forgecdn.net/files/3217/290/minecolonies-0.13.645-RELEASE-universal.jar
|
||||
https://edge.forgecdn.net/files/2935/384/SnowRealMagic-1.15.2-1.7.5.jar
|
||||
https://edge.forgecdn.net/files/2988/584/aiotbotania-1.15.2-1.2.3.jar
|
||||
https://edge.forgecdn.net/files/3255/408/mowziesmobs-1.5.15.jar
|
||||
https://edge.forgecdn.net/files/3062/510/HealthOverlay-1.15.2-1.0.2.jar
|
||||
https://edge.forgecdn.net/files/3023/121/neoncraft-1.1.jar
|
||||
https://edge.forgecdn.net/files/2997/617/Swamp-Expansion-1.15.2-1.7.3.jar
|
||||
https://edge.forgecdn.net/files/2980/252/titanium-1.15.2-2.4.2.jar
|
||||
https://edge.forgecdn.net/files/3152/946/rftoolsutility-1.15-2.1.20.jar
|
||||
https://edge.forgecdn.net/files/3083/277/swingthroughgrass-1.15.2-1.4.1.jar
|
||||
https://edge.forgecdn.net/files/3138/530/SilentGear-1.15.2-1.11.4+187.jar
|
||||
https://edge.forgecdn.net/files/3105/429/DarkUtilities-1.15.2-3.1.9.jar
|
||||
https://edge.forgecdn.net/files/3099/23/ImmersiveEngineering-1.15.2-4.1.1-125.jar
|
||||
https://edge.forgecdn.net/files/2856/529/FastFurnace-1.15.1-3.0.0.jar
|
||||
https://edge.forgecdn.net/files/2988/999/BiomesOPlenty-1.15.2-10.0.0.366-universal.jar
|
||||
https://edge.forgecdn.net/files/2989/95/The-Endergetic-Expansion-1.15.2-v1.3.2.jar
|
||||
https://edge.forgecdn.net/files/2993/960/FluxNetworks-1.15.2-5.0.3-4.jar
|
||||
https://edge.forgecdn.net/files/3028/611/ServerTabInfo-1.15.2-1.2.8.jar
|
||||
https://edge.forgecdn.net/files/3134/277/fairylights-3.0.15-1.15.2.jar
|
||||
https://edge.forgecdn.net/files/3048/54/useful_backpacks-1.15.2-1.10.3.77.jar
|
||||
https://edge.forgecdn.net/files/3273/515/mcw-trapdoors-1.0.2-mc1.15.2.jar
|
||||
https://edge.forgecdn.net/files/2986/639/CraftingTweaks_1.15.2-11.0.1.jar
|
||||
https://edge.forgecdn.net/files/3261/454/create-mc1.15.2_v0.3.1a.jar
|
||||
https://edge.forgecdn.net/files/3211/10/supermartijn642configlib-1.0.5-mc1.15.jar
|
||||
https://edge.forgecdn.net/files/2995/786/TerraForged-1.15.2-0.0.15.jar
|
||||
https://edge.forgecdn.net/files/2892/562/leavesdecayonotherleaves-1.1.jar
|
||||
21
examples/valhelsia2/docker-compose.yml
Normal file
21
examples/valhelsia2/docker-compose.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java8-multiarch
|
||||
volumes:
|
||||
- data:/data
|
||||
- ./modpacks:/modpacks:ro
|
||||
environment:
|
||||
EULA: "true"
|
||||
TYPE: FORGE
|
||||
VERSION: "1.15.2"
|
||||
GENERIC_PACK: /modpacks/Valhelsia_2-2.3.4-SERVER.zip
|
||||
MEMORY: "2G"
|
||||
ports:
|
||||
- "25565:25565"
|
||||
healthcheck:
|
||||
test: NONE
|
||||
|
||||
volumes:
|
||||
data: {}
|
||||
27
examples/vanilla-tweaks/docker-compose.yml
Normal file
27
examples/vanilla-tweaks/docker-compose.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
version: "3.3"
|
||||
|
||||
services:
|
||||
vanillatweaks_file:
|
||||
restart: "no"
|
||||
image: itzg/minecraft-server
|
||||
ports:
|
||||
- "25565:25565/tcp"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
VERSION: ${MINECRAFT_VERSION:-LATEST}
|
||||
VANILLATWEAKS_FILE: /config/vanillatweaks-datapacks.json
|
||||
REMOVE_OLD_VANILLATWEAKS: "TRUE"
|
||||
volumes:
|
||||
- data:/data
|
||||
- ./vanillatweaks-datapacks.json:/config/vanillatweaks-datapacks.json:ro
|
||||
vanillatweaks_sharecode:
|
||||
# port is set to 25566 to not conflict with vanillatweaks_file example
|
||||
ports:
|
||||
- "25566:25565/tcp"
|
||||
restart: "no"
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
VERSION: ${MINECRAFT_VERSION:-LATEST}
|
||||
VANILLATWEAKS_SHARECODE: MGr52E
|
||||
REMOVE_OLD_VANILLATWEAKS: "TRUE"
|
||||
15
examples/vanilla-tweaks/vanillatweaks-datapacks.json
Normal file
15
examples/vanilla-tweaks/vanillatweaks-datapacks.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"version": "1.18",
|
||||
"packs": {
|
||||
"survival": [
|
||||
"graves",
|
||||
"multiplayer sleep",
|
||||
"afk display",
|
||||
"armor statues",
|
||||
"unlock all recipes",
|
||||
"fast leaf decay",
|
||||
"coordinates hud"
|
||||
],
|
||||
"items": ["armored elytra"]
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
. /autopause/autopause-fcns.sh
|
||||
|
||||
. ${SCRIPTS:-/}start-utils
|
||||
. /auto/autopause-fcns.sh
|
||||
|
||||
# shellcheck source=../../scripts/start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
if isTrue "${DEBUG_AUTOPAUSE}"; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
autopause_error_loop() {
|
||||
logAutopause "Available interfaces within the docker container:"
|
||||
@@ -39,7 +42,12 @@ if ! [[ -d "/sys/class/net/$AUTOPAUSE_KNOCK_INTERFACE" ]] ; then
|
||||
autopause_error_loop
|
||||
fi
|
||||
|
||||
sudo /usr/sbin/knockd -c /tmp/knockd-config.cfg -d -i "$AUTOPAUSE_KNOCK_INTERFACE"
|
||||
knockdArgs=(-c /tmp/knockd-config.cfg -d -i "$AUTOPAUSE_KNOCK_INTERFACE")
|
||||
if isTrue "${DEBUG_AUTOPAUSE}"; then
|
||||
knockdArgs+=(-D)
|
||||
fi
|
||||
|
||||
sudo /usr/sbin/knockd "${knockdArgs[@]}"
|
||||
if [ $? -ne 0 ] ; then
|
||||
logAutopause "Failed to start knockd daemon."
|
||||
logAutopause "Probable cause: Unable to attach to interface \"$AUTOPAUSE_KNOCK_INTERFACE\"."
|
||||
@@ -50,12 +58,13 @@ STATE=INIT
|
||||
|
||||
while :
|
||||
do
|
||||
isTrue "${DEBUG_AUTOPAUSE}" && log "DEBUG: autopause state = $STATE"
|
||||
case X$STATE in
|
||||
XINIT)
|
||||
# Server startup
|
||||
if mc_server_listening ; then
|
||||
TIME_THRESH=$(($(current_uptime)+$AUTOPAUSE_TIMEOUT_INIT))
|
||||
logAutopause "MC Server listening for connections - stopping in $AUTOPAUSE_TIMEOUT_INIT seconds"
|
||||
logAutopause "MC Server listening for connections - pausing in $AUTOPAUSE_TIMEOUT_INIT seconds"
|
||||
STATE=K
|
||||
fi
|
||||
;;
|
||||
@@ -66,8 +75,8 @@ do
|
||||
STATE=E
|
||||
else
|
||||
if [[ $(current_uptime) -ge $TIME_THRESH ]] ; then
|
||||
logAutopause "No client connected since startup / knocked - stopping"
|
||||
/autopause/pause.sh
|
||||
logAutopause "No client connected since startup / knocked - pausing"
|
||||
/auto/pause.sh
|
||||
STATE=S
|
||||
fi
|
||||
fi
|
||||
@@ -76,7 +85,7 @@ do
|
||||
# Established
|
||||
if ! java_clients_connected ; then
|
||||
TIME_THRESH=$(($(current_uptime)+$AUTOPAUSE_TIMEOUT_EST))
|
||||
logAutopause "All clients disconnected - stopping in $AUTOPAUSE_TIMEOUT_EST seconds"
|
||||
logAutopause "All clients disconnected - pausing in $AUTOPAUSE_TIMEOUT_EST seconds"
|
||||
STATE=I
|
||||
fi
|
||||
;;
|
||||
@@ -87,8 +96,8 @@ do
|
||||
STATE=E
|
||||
else
|
||||
if [[ $(current_uptime) -ge $TIME_THRESH ]] ; then
|
||||
logAutopause "No client reconnected - stopping"
|
||||
/autopause/pause.sh
|
||||
logAutopause "No client reconnected - pausing"
|
||||
/auto/pause.sh
|
||||
STATE=S
|
||||
fi
|
||||
fi
|
||||
@@ -96,7 +105,7 @@ do
|
||||
XS)
|
||||
# Stopped
|
||||
if rcon_client_exists ; then
|
||||
/autopause/resume.sh
|
||||
/auto/resume.sh
|
||||
fi
|
||||
if java_running ; then
|
||||
if java_clients_connected ; then
|
||||
@@ -104,7 +113,11 @@ do
|
||||
STATE=E
|
||||
else
|
||||
TIME_THRESH=$(($(current_uptime)+$AUTOPAUSE_TIMEOUT_KN))
|
||||
logAutopause "Server was knocked - waiting for clients or timeout"
|
||||
from=unknown
|
||||
if [ -e /var/log/knocked-source ]; then
|
||||
from=$(cat /var/log/knocked-source)
|
||||
fi
|
||||
logAutopause "Server was knocked from $from - waiting for clients or timeout"
|
||||
STATE=K
|
||||
fi
|
||||
fi
|
||||
@@ -115,8 +128,8 @@ do
|
||||
esac
|
||||
if [[ "$STATE" == "S" ]] ; then
|
||||
# before rcon times out
|
||||
sleep 2
|
||||
sleep 5
|
||||
else
|
||||
sleep $AUTOPAUSE_PERIOD
|
||||
sleep "$AUTOPAUSE_PERIOD"
|
||||
fi
|
||||
done
|
||||
35
files/auto/autopause-fcns.sh
Normal file
35
files/auto/autopause-fcns.sh
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
|
||||
current_uptime() {
|
||||
awk '{print $1}' /proc/uptime | cut -d . -f 1
|
||||
}
|
||||
|
||||
java_running() {
|
||||
[[ $( ps -ax -o stat,comm | grep 'java' | awk '{ print $1 }') =~ ^S.*$ ]]
|
||||
}
|
||||
|
||||
java_process_exists() {
|
||||
[[ -n "$(ps -ax -o comm | grep 'java')" ]]
|
||||
}
|
||||
|
||||
rcon_client_exists() {
|
||||
[[ -n "$(ps -ax -o comm | grep 'rcon-cli')" ]]
|
||||
}
|
||||
|
||||
mc_server_listening() {
|
||||
mc-monitor status --host localhost --port "$SERVER_PORT" --timeout 10s >& /dev/null
|
||||
}
|
||||
|
||||
java_clients_connections() {
|
||||
local connections
|
||||
if java_running ; then
|
||||
connections=$(mc-monitor status --host localhost --port "$SERVER_PORT" --show-player-count)
|
||||
else
|
||||
connections=0
|
||||
fi
|
||||
echo $connections
|
||||
}
|
||||
|
||||
java_clients_connected() {
|
||||
(( $(java_clients_connections) > 0 ))
|
||||
}
|
||||
74
files/auto/autostop-daemon.sh
Normal file
74
files/auto/autostop-daemon.sh
Normal file
@@ -0,0 +1,74 @@
|
||||
#!/bin/bash
|
||||
|
||||
# needed for the clients connected function residing in autopause
|
||||
. /auto/autopause-fcns.sh
|
||||
|
||||
# shellcheck source=../../scripts/start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
if isTrue "${DEBUG_AUTOSTOP}"; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
# wait for java process to be started
|
||||
while :
|
||||
do
|
||||
if java_process_exists ; then
|
||||
break
|
||||
fi
|
||||
sleep 0.1
|
||||
done
|
||||
|
||||
STATE=INIT
|
||||
|
||||
while :
|
||||
do
|
||||
isTrue "${DEBUG_AUTOSTOP}" && log "DEBUG: autostop state = $STATE"
|
||||
case X$STATE in
|
||||
XINIT)
|
||||
# Server startup
|
||||
if mc_server_listening ; then
|
||||
TIME_THRESH=$(($(current_uptime)+AUTOSTOP_TIMEOUT_INIT))
|
||||
logAutostop "MC Server listening for connections - stopping in $AUTOSTOP_TIMEOUT_INIT seconds"
|
||||
STATE=II
|
||||
fi
|
||||
;;
|
||||
XII)
|
||||
# Initial idle
|
||||
if java_clients_connected ; then
|
||||
logAutostop "Client connected - waiting for disconnect"
|
||||
STATE=E
|
||||
else
|
||||
if [[ $(current_uptime) -ge $TIME_THRESH ]] ; then
|
||||
logAutostop "No client connected since startup - stopping server"
|
||||
/auto/stop.sh
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
XE)
|
||||
# Established
|
||||
if ! java_clients_connected ; then
|
||||
TIME_THRESH=$(($(current_uptime)+$AUTOSTOP_TIMEOUT_EST))
|
||||
logAutostop "All clients disconnected - stopping in $AUTOSTOP_TIMEOUT_EST seconds"
|
||||
STATE=I
|
||||
fi
|
||||
;;
|
||||
XI)
|
||||
# Idle
|
||||
if java_clients_connected ; then
|
||||
logAutostop "Client reconnected - waiting for disconnect"
|
||||
STATE=E
|
||||
else
|
||||
if [[ $(current_uptime) -ge $TIME_THRESH ]] ; then
|
||||
logAutostop "No client reconnected - stopping"
|
||||
/auto/stop.sh
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
logAutostop "Error: invalid state: $STATE"
|
||||
;;
|
||||
esac
|
||||
sleep $AUTOSTOP_PERIOD
|
||||
done
|
||||
@@ -3,10 +3,13 @@
|
||||
[unpauseMCServer-server]
|
||||
sequence = 25565
|
||||
seq_timeout = 1
|
||||
command = /usr/sbin/gosu minecraft:minecraft /autopause/resume.sh
|
||||
command = /auto/resume.sh %IP%
|
||||
tcpflags = syn
|
||||
[unpauseMCServer-rcon]
|
||||
sequence = 25575
|
||||
seq_timeout = 1
|
||||
command = /usr/sbin/gosu minecraft:minecraft /autopause/resume.sh
|
||||
command = /auto/resume.sh %IP%
|
||||
tcpflags = syn
|
||||
[unpauseMCServer-bedrock]
|
||||
sequence = 19132:udp
|
||||
command = /auto/resume.sh %IP%
|
||||
3
files/autopause/pause.sh → files/auto/pause.sh
Executable file → Normal file
3
files/autopause/pause.sh → files/auto/pause.sh
Executable file → Normal file
@@ -1,6 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
. /start-utils
|
||||
if isTrue "${DEBUG_AUTOPAUSE}"; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
if [[ $( ps -ax -o stat,comm | grep 'java' | awk '{ print $1 }') =~ ^S.*$ ]] ; then
|
||||
# save world
|
||||
12
files/auto/resume.sh
Normal file
12
files/auto/resume.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
. /start-utils
|
||||
if isTrue "${DEBUG_AUTOPAUSE}"; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
if [[ $( ps -ax -o stat,comm | grep 'java' | awk '{ print $1 }') =~ ^T.*$ ]] ; then
|
||||
logAutopauseAction "Knocked from $1, resuming Java process"
|
||||
echo "$1" > /var/log/knocked-source
|
||||
pkill -CONT java
|
||||
fi
|
||||
13
files/auto/stop.sh
Normal file
13
files/auto/stop.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
. /start-utils
|
||||
if isTrue "${DEBUG_AUTOSTOP}"; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
logAutostopAction "Stopping Java process"
|
||||
if isTrue "${AUTOSTOP_PKILL_USE_SUDO:-false}"; then
|
||||
sudo pkill -f --signal SIGTERM mc-server-runner
|
||||
else
|
||||
pkill -f --signal SIGTERM mc-server-runner
|
||||
fi
|
||||
@@ -1,42 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
current_uptime() {
|
||||
echo $(awk '{print $1}' /proc/uptime | cut -d . -f 1)
|
||||
}
|
||||
|
||||
java_running() {
|
||||
[[ $( ps -ax -o stat,comm | grep 'java' | awk '{ print $1 }') =~ ^S.*$ ]]
|
||||
}
|
||||
|
||||
java_process_exists() {
|
||||
[[ -n "$(ps -ax -o comm | grep 'java')" ]]
|
||||
}
|
||||
|
||||
rcon_client_exists() {
|
||||
[[ -n "$(ps -ax -o comm | grep 'rcon-cli')" ]]
|
||||
}
|
||||
|
||||
mc_server_listening() {
|
||||
[[ -n $(netstat -tln | grep -e "0.0.0.0:$SERVER_PORT" -e ":::$SERVER_PORT" | grep LISTEN) ]]
|
||||
}
|
||||
|
||||
java_clients_connected() {
|
||||
local connections
|
||||
connections=$(netstat -tn | grep ":$SERVER_PORT" | grep ESTABLISHED)
|
||||
if [[ -z "$connections" ]] ; then
|
||||
return 1
|
||||
fi
|
||||
IFS=$'\n'
|
||||
connections=($connections)
|
||||
unset IFS
|
||||
# check that at least one external address is not localhost
|
||||
# remember, that the host network mode does not work with autopause because of the knockd utility
|
||||
for (( i=0; i<${#connections[@]}; i++ ))
|
||||
do
|
||||
if [[ ! $(echo "${connections[$i]}" | awk '{print $5}') =~ ^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$ ]] ; then
|
||||
# not localhost
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
. /start-utils
|
||||
|
||||
if [[ $( ps -ax -o stat,comm | grep 'java' | awk '{ print $1 }') =~ ^T.*$ ]] ; then
|
||||
logAutopauseAction "Knocked, resuming Java process"
|
||||
pkill -CONT java
|
||||
fi
|
||||
@@ -4,19 +4,22 @@
|
||||
<Console name="SysOut" target="SYSTEM_OUT">
|
||||
<PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level]: %msg%n" />
|
||||
</Console>
|
||||
<Queue name="ServerGuiConsole">
|
||||
<Queue name="TerminalConsole">
|
||||
<PatternLayout pattern="[%d{HH:mm:ss} %level]: %msg%n" />
|
||||
</Queue>
|
||||
<RollingRandomAccessFile name="File" fileName="logs/latest.log" filePattern="logs/%d{yyyy-MM-dd}-%i.log.gz">
|
||||
<PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level]: %msg%n" />
|
||||
<Policies>
|
||||
<!-- Based on filePattern resolution, so daily -->
|
||||
<TimeBasedTriggeringPolicy />
|
||||
<SizeBasedTriggeringPolicy size="100 MB" />
|
||||
<OnStartupTriggeringPolicy />
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy>
|
||||
<Delete basePath="logs">
|
||||
<IfFileName glob="*.log.gz" />
|
||||
<IfLastModified age="7d" />
|
||||
<IfAccumulatedFileCount exceeds="20"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingRandomAccessFile>
|
||||
@@ -28,7 +31,7 @@
|
||||
</filters>
|
||||
<AppenderRef ref="SysOut"/>
|
||||
<AppenderRef ref="File"/>
|
||||
<AppenderRef ref="ServerGuiConsole"/>
|
||||
<AppenderRef ref="TerminalConsole"/>
|
||||
</Root>
|
||||
</Loggers>
|
||||
</Configuration>
|
||||
@@ -1,2 +1,2 @@
|
||||
%minecraft ALL=(ALL) NOPASSWD:/usr/bin/pkill
|
||||
%minecraft ALL=(ALL) NOPASSWD:/usr/sbin/knockd
|
||||
minecraft ALL=(ALL) NOPASSWD:/usr/bin/pkill
|
||||
minecraft ALL=(ALL) NOPASSWD:/usr/sbin/knockd
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
# Moved to top-level
|
||||
|
||||
The contents of this directory have now been moved to the top level of
|
||||
[itzg/docker-minecraft-server](https://github.com/itzg/docker-minecraft-server).
|
||||
22
start → scripts/start
Normal file → Executable file
22
start → scripts/start
Normal file → Executable file
@@ -1,11 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
. ${SCRIPTS:-/}start-utils
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
|
||||
# The Dockerfile ENVs take precedence here, but defaulting for testing consistency
|
||||
: "${UID:=1000}"
|
||||
: "${GID:=1000}"
|
||||
|
||||
umask 0002
|
||||
chmod g+w /data
|
||||
|
||||
if ! isTrue "${SKIP_SUDO:-false}" && [ $(id -u) = 0 ]; then
|
||||
if ! isTrue "${SKIP_SUDO:-false}" && [ "$(id -u)" = 0 ]; then
|
||||
runAsUser=minecraft
|
||||
runAsGroup=minecraft
|
||||
|
||||
@@ -24,14 +29,14 @@ if ! isTrue "${SKIP_SUDO:-false}" && [ $(id -u) = 0 ]; then
|
||||
if [[ $GID != 0 ]]; then
|
||||
if [[ $GID != $(id -g minecraft) ]]; then
|
||||
log "Changing gid of minecraft to $GID"
|
||||
groupmod -o -g $GID minecraft
|
||||
groupmod -o -g "$GID" minecraft
|
||||
fi
|
||||
else
|
||||
runAsGroup=root
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $(stat -c "%u" /data) != $UID ]]; then
|
||||
if [[ $(stat -c "%u" /data) != "$UID" ]]; then
|
||||
log "Changing ownership of /data to $UID ..."
|
||||
chown -R ${runAsUser}:${runAsGroup} /data
|
||||
fi
|
||||
@@ -40,7 +45,12 @@ if ! isTrue "${SKIP_SUDO:-false}" && [ $(id -u) = 0 ]; then
|
||||
echo 'hosts: files dns' > /etc/nsswitch.conf
|
||||
fi
|
||||
|
||||
exec gosu ${runAsUser}:${runAsGroup} ${SCRIPTS:-/}start-configuration $@
|
||||
distro=$(getDistro)
|
||||
if [[ $distro == alpine ]]; then
|
||||
exec su-exec ${runAsUser}:${runAsGroup} "${SCRIPTS:-/}start-configuration" "$@"
|
||||
else
|
||||
exec gosu ${runAsUser}:${runAsGroup} "${SCRIPTS:-/}start-configuration" "$@"
|
||||
fi
|
||||
else
|
||||
exec ${SCRIPTS:-/}start-configuration $@
|
||||
exec "${SCRIPTS:-/}start-configuration" "$@"
|
||||
fi
|
||||
@@ -1,10 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
. ${SCRIPTS:-/}start-utils
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
|
||||
: "${SERVER_PORT:=25565}"
|
||||
: "${ENABLE_AUTOPAUSE:=false}"
|
||||
: "${AUTOPAUSE_TIMEOUT_EST:=3600}"
|
||||
: "${AUTOPAUSE_TIMEOUT_KN:=120}"
|
||||
: "${AUTOPAUSE_TIMEOUT_INIT:=600}"
|
||||
: "${AUTOPAUSE_PERIOD:=10}"
|
||||
: "${AUTOPAUSE_KNOCK_INTERFACE:=eth0}"
|
||||
: "${DEBUG_AUTOPAUSE:=false}"
|
||||
export SERVER_PORT
|
||||
export ENABLE_AUTOPAUSE
|
||||
export AUTOPAUSE_TIMEOUT_EST
|
||||
export AUTOPAUSE_TIMEOUT_KN
|
||||
export AUTOPAUSE_TIMEOUT_INIT
|
||||
export AUTOPAUSE_PERIOD
|
||||
export AUTOPAUSE_KNOCK_INTERFACE
|
||||
export DEBUG_AUTOPAUSE
|
||||
|
||||
log "Autopause functionality enabled"
|
||||
|
||||
cp /autopause/knockd-config.cfg /tmp/knockd-config.cfg
|
||||
isDebugging && set -x
|
||||
|
||||
cp /auto/knockd-config.cfg /tmp/knockd-config.cfg
|
||||
|
||||
# update server port to listen to
|
||||
regseq="^\s*sequence\s*=\s*$SERVER_PORT\s*$"
|
||||
@@ -64,4 +84,4 @@ elif [[ -z "$MAX_TICK_TIME" ]] ; then
|
||||
export MAX_TICK_TIME
|
||||
fi
|
||||
|
||||
/autopause/autopause-daemon.sh &
|
||||
/auto/autopause-daemon.sh &
|
||||
44
scripts/start-autostop
Executable file
44
scripts/start-autostop
Executable file
@@ -0,0 +1,44 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
|
||||
: "${SERVER_PORT:=25565}"
|
||||
: "${ENABLE_AUTOSTOP:=false}"
|
||||
: "${AUTOSTOP_TIMEOUT_EST:=3600}"
|
||||
: "${AUTOSTOP_TIMEOUT_INIT:=1800}"
|
||||
: "${AUTOSTOP_PERIOD:=10}"
|
||||
: "${DEBUG_AUTOSTOP:=false}"
|
||||
export SERVER_PORT
|
||||
export ENABLE_AUTOSTOP
|
||||
export AUTOSTOP_TIMEOUT_EST
|
||||
export AUTOSTOP_TIMEOUT_INIT
|
||||
export AUTOSTOP_PERIOD
|
||||
export DEBUG_AUTOSTOP
|
||||
|
||||
log "Autostop functionality enabled"
|
||||
|
||||
isDebugging && set -x
|
||||
|
||||
if ! [[ $AUTOSTOP_PERIOD =~ ^[0-9]+$ ]]; then
|
||||
AUTOSTOP_PERIOD=10
|
||||
export AUTOSTOP_PERIOD
|
||||
log "Warning: AUTOSTOP_PERIOD is not numeric, set to 10 (seconds)"
|
||||
fi
|
||||
if [ "$AUTOSTOP_PERIOD" -eq "0" ] ; then
|
||||
AUTOSTOP_PERIOD=10
|
||||
export AUTOSTOP_PERIOD
|
||||
log "Warning: AUTOSTOP_PERIOD must not be 0, set to 10 (seconds)"
|
||||
fi
|
||||
if ! [[ $AUTOSTOP_TIMEOUT_EST =~ ^[0-9]+$ ]] ; then
|
||||
AUTOSTOP_TIMEOUT_EST=3600
|
||||
export AUTOSTOP_TIMEOUT_EST
|
||||
log "Warning: AUTOSTOP_TIMEOUT_EST is not numeric, set to 3600 (seconds)"
|
||||
fi
|
||||
if ! [[ $AUTOSTOP_TIMEOUT_INIT =~ ^[0-9]+$ ]] ; then
|
||||
AUTOSTOP_TIMEOUT_INIT=1800
|
||||
export AUTOSTOP_TIMEOUT_INIT
|
||||
log "Warning: AUTOSTOP_TIMEOUT_INIT is not numeric, set to 1800 (seconds)"
|
||||
fi
|
||||
|
||||
/auto/autostop-daemon.sh &
|
||||
260
scripts/start-configuration
Executable file
260
scripts/start-configuration
Executable file
@@ -0,0 +1,260 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
|
||||
: "${EULA:=}"
|
||||
: "${PROXY:=}"
|
||||
: "${ENABLE_AUTOPAUSE:=false}"
|
||||
: "${ENABLE_AUTOSTOP:=false}"
|
||||
: "${RCON_CMDS_STARTUP:=}"
|
||||
: "${RCON_CMDS_ON_CONNECT:=}"
|
||||
: "${RCON_CMDS_ON_DISCONNECT:=}"
|
||||
: "${RCON_CMDS_FIRST_CONNECT:=}"
|
||||
: "${RCON_CMDS_LAST_DISCONNECT:=}"
|
||||
: "${RCON_CMDS_PERIOD:=10}"
|
||||
: "${RCON_PASSWORD_FILE:=}"
|
||||
: "${RCON_PASSWORD:=minecraft}"
|
||||
: "${RCON_PORT:=25575}"
|
||||
export RCON_PASSWORD RCON_PORT
|
||||
|
||||
shopt -s nullglob
|
||||
|
||||
isDebugging && set -x
|
||||
|
||||
#umask 002
|
||||
export HOME=/data
|
||||
|
||||
log "Running as uid=$(id -u) gid=$(id -g) with /data as '$(ls -lnd /data)'"
|
||||
|
||||
if [ ! -e /data/eula.txt ]; then
|
||||
if ! isTrue "$EULA"; then
|
||||
log ""
|
||||
log "Please accept the Minecraft EULA at"
|
||||
log " https://account.mojang.com/documents/minecraft_eula"
|
||||
log "by adding the following immediately after 'docker run':"
|
||||
log " -e EULA=TRUE"
|
||||
log ""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
writeEula
|
||||
fi
|
||||
|
||||
if isTrue "${ENABLE_AUTOPAUSE}" && isTrue "${EXEC_DIRECTLY:-false}"; then
|
||||
log "EXEC_DIRECTLY=true is incompatible with ENABLE_AUTOPAUSE=true"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if isTrue "${ENABLE_AUTOPAUSE}" && isTrue "${ENABLE_AUTOSTOP}"; then
|
||||
log "ENABLE_AUTOPAUSE=true is incompatible with ENABLE_AUTOSTOP=true"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $PROXY ]]; then
|
||||
export http_proxy="$PROXY"
|
||||
export https_proxy="$PROXY"
|
||||
export JAVA_TOOL_OPTIONS+="-Djava.net.useSystemProxies=true"
|
||||
log "INFO: Giving proxy time to startup..."
|
||||
sleep 5
|
||||
fi
|
||||
|
||||
if [[ $RCON_PASSWORD_FILE ]]; then
|
||||
log ""
|
||||
if [ ! -e ${RCON_PASSWORD_FILE} ]; then
|
||||
log "Initial RCON password file ${RCON_PASSWORD_FILE} does not seems to exist."
|
||||
log "Please ensure your configuration."
|
||||
log "If you are using Docker Secrets feature, please check this for further information: "
|
||||
log " https://docs.docker.com/engine/swarm/secrets"
|
||||
log ""
|
||||
exit 1
|
||||
else
|
||||
RCON_PASSWORD=$(cat ${RCON_PASSWORD_FILE})
|
||||
export RCON_PASSWORD
|
||||
fi
|
||||
log ""
|
||||
fi
|
||||
|
||||
function fixJavaPath() {
|
||||
# Some Docker management UIs grab all the image declared variables and present them for configuration.
|
||||
# When upgrading images across Java versions, that creates a mismatch in PATH's expected by base image.
|
||||
if ! which java > /dev/null; then
|
||||
log "ERROR: your Docker provider has an annoying flaw where it"
|
||||
log " tries to set PATH even though the container establishes"
|
||||
log " a very specific value."
|
||||
sleep 2
|
||||
# now find where java might be
|
||||
for d in /opt/java/openjdk/bin /usr/bin; do
|
||||
if [ -x "${d}/java" ]; then
|
||||
PATH="${PATH}:${d}"
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
if ! fixJavaPath; then
|
||||
log "ERROR: could not locate path that contains java"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export VERSIONS_JSON=https://launchermeta.mojang.com/mc/game/version_manifest.json
|
||||
|
||||
case "X$VERSION" in
|
||||
X|XLATEST|Xlatest)
|
||||
if ! VANILLA_VERSION=$(get --json-path '$.latest.release' "$VERSIONS_JSON"); then
|
||||
log "ERROR: version lookup failed: $VANILLA_VERSION"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
XSNAPSHOT|Xsnapshot)
|
||||
if ! VANILLA_VERSION=$(get --json-path '$.latest.snapshot' "$VERSIONS_JSON"); then
|
||||
log "ERROR: version lookup failed: $VANILLA_VERSION"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
VANILLA_VERSION=$VERSION
|
||||
;;
|
||||
esac
|
||||
export VANILLA_VERSION
|
||||
MAJOR_VANILLA_VERSION=$(get_major_version "$VANILLA_VERSION")
|
||||
export MAJOR_VANILLA_VERSION
|
||||
log "Resolved version given ${VERSION} into ${VANILLA_VERSION} and major version ${MAJOR_VANILLA_VERSION}"
|
||||
|
||||
cd /data || exit 1
|
||||
|
||||
export ORIGINAL_TYPE=${TYPE^^}
|
||||
|
||||
if isTrue "${ENABLE_AUTOPAUSE}"; then
|
||||
${SCRIPTS:-/}start-autopause
|
||||
fi
|
||||
|
||||
if isTrue "${ENABLE_AUTOSTOP}"; then
|
||||
${SCRIPTS:-/}start-autostop
|
||||
fi
|
||||
|
||||
if
|
||||
[[ "$RCON_CMDS_STARTUP" ]] ||
|
||||
[[ "$RCON_CMDS_ON_CONNECT" ]] ||
|
||||
[[ "$RCON_CMDS_ON_DISCONNECT" ]] ||
|
||||
[[ "$RCON_CMDS_FIRST_CONNECT" ]] ||
|
||||
[[ "$RCON_CMDS_LAST_DISCONNECT" ]]
|
||||
then
|
||||
log "Starting RCON commands"
|
||||
# shellcheck source=start-rconcmds
|
||||
${SCRIPTS:-/}start-rconcmds
|
||||
fi
|
||||
|
||||
if versionLessThan 1.7; then
|
||||
echo "
|
||||
MC_HEALTH_EXTRA_ARGS=(
|
||||
--use-server-list-ping
|
||||
)
|
||||
" > /data/.mc-health.env
|
||||
fi
|
||||
|
||||
log "Resolving type given ${TYPE}"
|
||||
case "${TYPE^^}" in
|
||||
*BUKKIT|SPIGOT)
|
||||
exec "${SCRIPTS:-/}start-deployBukkitSpigot" "$@"
|
||||
;;
|
||||
|
||||
PAPER)
|
||||
exec "${SCRIPTS:-/}start-deployPaper" "$@"
|
||||
;;
|
||||
|
||||
FORGE)
|
||||
evaluateJavaCompatibilityForForge
|
||||
exec "${SCRIPTS:-/}start-deployForge" "$@"
|
||||
;;
|
||||
|
||||
FABRIC)
|
||||
exec "${SCRIPTS:-/}start-deployFabric" "$@"
|
||||
;;
|
||||
|
||||
QUILT)
|
||||
exec "${SCRIPTS:-/}start-deployQuilt" "$@"
|
||||
;;
|
||||
|
||||
FTBA)
|
||||
evaluateJavaCompatibilityForForge
|
||||
exec "${SCRIPTS:-/}start-deployFTBA" "$@"
|
||||
;;
|
||||
|
||||
FTB|CURSEFORGE)
|
||||
evaluateJavaCompatibilityForForge
|
||||
exec "${SCRIPTS:-/}start-deployCF" "$@"
|
||||
;;
|
||||
|
||||
VANILLA)
|
||||
exec "${SCRIPTS:-/}start-deployVanilla" "$@"
|
||||
;;
|
||||
|
||||
SPONGEVANILLA)
|
||||
exec "${SCRIPTS:-/}start-deploySpongeVanilla" "$@"
|
||||
;;
|
||||
|
||||
CUSTOM)
|
||||
evaluateJavaCompatibilityForForge
|
||||
exec "${SCRIPTS:-/}start-deployCustom" "$@"
|
||||
;;
|
||||
|
||||
MAGMA)
|
||||
evaluateJavaCompatibilityForForge
|
||||
exec "${SCRIPTS:-/}start-deployMagma" "$@"
|
||||
;;
|
||||
|
||||
MOHIST)
|
||||
evaluateJavaCompatibilityForForge
|
||||
exec "${SCRIPTS:-/}start-deployMohist" "$@"
|
||||
;;
|
||||
|
||||
CATSERVER)
|
||||
evaluateJavaCompatibilityForForge
|
||||
exec "${SCRIPTS:-/}start-deployCatserver" "$@"
|
||||
;;
|
||||
|
||||
LOLISERVER)
|
||||
evaluateJavaCompatibilityForForge
|
||||
exec "${SCRIPTS:-/}start-deployLoliserver" "$@"
|
||||
;;
|
||||
|
||||
PURPUR)
|
||||
exec "${SCRIPTS:-/}start-deployPurpur" "$@"
|
||||
;;
|
||||
|
||||
PUFFERFISH)
|
||||
exec "${SCRIPTS:-/}start-deployPufferfish" "$@"
|
||||
;;
|
||||
|
||||
CANYON)
|
||||
exec "${SCRIPTS:-/}start-deployCanyon" "$@"
|
||||
;;
|
||||
|
||||
LIMBO)
|
||||
exec "${SCRIPTS:-/}start-deployLimbo" "$@"
|
||||
;;
|
||||
|
||||
CRUCIBLE)
|
||||
log "**********************************************************************"
|
||||
log "WARNING: The image tag itzg/minecraft-server:java8 is recommended"
|
||||
log " since some mods require Java 8"
|
||||
log " Exception traces reporting ClassCastException: class jdk.internal.loader.ClassLoaders\$AppClassLoader"
|
||||
log " can be fixed with java8"
|
||||
log "**********************************************************************"
|
||||
exec "${SCRIPTS:-/}start-deployCrucible" "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
log "Invalid type: '$TYPE'"
|
||||
log "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FTBA (multiarch-only),"
|
||||
log " CURSEFORGE, SPONGEVANILLA, PURPUR, CUSTOM,"
|
||||
log " MAGMA, MOHIST, CATSERVER, LOLISERVER, AIRPLANE, PUFFERFISH, CANYON, LIMBO, CRUCIBLE"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
9
start-deployBukkitSpigot → scripts/start-deployBukkitSpigot
Normal file → Executable file
9
start-deployBukkitSpigot → scripts/start-deployBukkitSpigot
Normal file → Executable file
@@ -64,7 +64,11 @@ function downloadSpigot {
|
||||
fi
|
||||
|
||||
if [[ -z $downloadUrl ]]; then
|
||||
downloadUrl="https://cdn.getbukkit.org/${getbukkitFlavor}/${getbukkitFlavor}-${VANILLA_VERSION}.jar"
|
||||
if versionLessThan 1.16.5 || ([[ ${getbukkitFlavor} = "craftbukkit" ]] && [[ ${VANILLA_VERSION} = "1.16.5" ]]); then
|
||||
downloadUrl="https://cdn.getbukkit.org/${getbukkitFlavor}/${getbukkitFlavor}-${VANILLA_VERSION}.jar"
|
||||
else
|
||||
downloadUrl="https://download.getbukkit.org/${getbukkitFlavor}/${getbukkitFlavor}-${VANILLA_VERSION}.jar"
|
||||
fi
|
||||
fi
|
||||
|
||||
setServerVar
|
||||
@@ -122,7 +126,6 @@ else
|
||||
fi
|
||||
|
||||
# Normalize on Spigot for operations below
|
||||
export TYPE=SPIGOT
|
||||
export SKIP_LOG4J_CONFIG=true
|
||||
export FAMILY=SPIGOT
|
||||
|
||||
exec ${SCRIPTS:-/}start-spiget "$@"
|
||||
246
scripts/start-deployCF
Executable file
246
scripts/start-deployCF
Executable file
@@ -0,0 +1,246 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
|
||||
loadForgeVars() {
|
||||
cfgFile=${1?}
|
||||
pat='^([^#;][^=]+)=[:space:]*([^;]*)'
|
||||
while read -r line || [[ -n "$line" ]] ; do
|
||||
if [[ $line =~ $pat ]]; then
|
||||
#echo "MATCHED $line"
|
||||
k=${BASH_REMATCH[1]}
|
||||
v=${BASH_REMATCH[2]}
|
||||
case $k in
|
||||
FORGEURL)
|
||||
forgeInstallerUrl="$v"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
done < "$cfgFile"
|
||||
}
|
||||
|
||||
isDebugging && set -x
|
||||
|
||||
: "${FTB_BASE_DIR:=${CF_BASE_DIR:-/data/FeedTheBeast}}"
|
||||
export FTB_BASE_DIR
|
||||
|
||||
legacyJavaFixerUrl=https://files.minecraftforge.net/maven/net/minecraftforge/lex/legacyjavafixer/1.0/legacyjavafixer-1.0.jar
|
||||
export TYPE=CURSEFORGE
|
||||
|
||||
FTB_SERVER_MOD=${FTB_SERVER_MOD:-$CF_SERVER_MOD}
|
||||
|
||||
log "Looking for Feed-The-Beast / CurseForge server modpack."
|
||||
if [[ ! $FTB_SERVER_MOD ]]; then
|
||||
log "ERROR: CF_SERVER_MOD or FTB_SERVER_MOD is required to be set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
downloadModpack() {
|
||||
srv_modpack=${FTB_SERVER_MOD}
|
||||
if isURL "${srv_modpack}"; then
|
||||
log "Downloading modpack from ${srv_modpack}..."
|
||||
if ! srv_modpack=$(get -o /data --output-filename --skip-existing "${srv_modpack}"); then
|
||||
log "ERROR: failed to download modpack"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
if [[ "${srv_modpack:0:5}" == "data/" ]]; then
|
||||
# Prepend with "/"
|
||||
srv_modpack="/${srv_modpack}"
|
||||
fi
|
||||
if [[ ! "${srv_modpack:0:1}" == "/" ]]; then
|
||||
# If not an absolute path, assume file is in "/data"
|
||||
srv_modpack=/data/${srv_modpack}
|
||||
fi
|
||||
if [[ ! -f "${srv_modpack}" ]]; then
|
||||
log "FTB server modpack ${srv_modpack} not found."
|
||||
exit 2
|
||||
fi
|
||||
if [[ ! "${srv_modpack: -4}" == ".zip" ]]; then
|
||||
log "FTB server modpack ${srv_modpack} is not a zip archive."
|
||||
log "Please set FTB_SERVER_MOD to a file with a .zip extension."
|
||||
exit 2
|
||||
fi
|
||||
FTB_SERVER_MOD=${srv_modpack}
|
||||
}
|
||||
|
||||
if ! isTrue "${USE_MODPACK_START_SCRIPT:-true}"; then
|
||||
downloadModpack
|
||||
|
||||
needsInstall=true
|
||||
installMarker=/data/.curseforge-installed
|
||||
if [ -f $installMarker ]; then
|
||||
if [ "$(cat $installMarker)" != "${FTB_SERVER_MOD}" ]; then
|
||||
log "Upgrading modpack"
|
||||
|
||||
serverJar=$(find "${FTB_BASE_DIR}" -type f \( -path "*/libraries/*" -o -path "*/mods/*" \) -prune -o -name "forge*.jar" -not -name "forge*installer.jar" -print)
|
||||
if [[ "${serverJar}" ]]; then
|
||||
rm -rf "$(dirname "${serverJar}")"/{mods,*.jar,libraries,resources,scripts,config}
|
||||
fi
|
||||
else
|
||||
needsInstall=false
|
||||
fi
|
||||
fi
|
||||
|
||||
if $needsInstall; then
|
||||
log "Unpacking FTB server modpack ${FTB_SERVER_MOD} ..."
|
||||
mkdir -p "${FTB_BASE_DIR}"
|
||||
unzip -o "${FTB_SERVER_MOD}" -d "${FTB_BASE_DIR}" | awk '{printf "."} END {print ""}'
|
||||
|
||||
serverJar=$(find "${FTB_BASE_DIR}" -type f \( -path "*/libraries/*" -o -path "*/mods/*" \) -prune -o -name "forge*.jar" -not -name "forge*installer.jar" -print)
|
||||
if [[ -z "$serverJar" ]]; then
|
||||
|
||||
if [ -f "${FTB_BASE_DIR}/settings.cfg" ]; then
|
||||
loadForgeVars "${FTB_BASE_DIR}/settings.cfg"
|
||||
|
||||
if [[ $forgeInstallerUrl ]]; then
|
||||
forgeInstallerJar="${FTB_BASE_DIR}/forge-installer.jar"
|
||||
if ! curl -fsSL -o "$forgeInstallerJar" "$forgeInstallerUrl" ; then
|
||||
log "ERROR failed to download Forge installer from $forgeInstallerUrl"
|
||||
exit 2
|
||||
fi
|
||||
fi
|
||||
else
|
||||
forgeInstallerJar=$(find "${FTB_BASE_DIR}" -name "forge*installer.jar")
|
||||
fi
|
||||
|
||||
if [[ -z "${forgeInstallerJar}" ]]; then
|
||||
log "ERROR Unable to find forge installer in modpack"
|
||||
log " or download using modpack config."
|
||||
log " Make sure you downloaded the server files."
|
||||
exit 2
|
||||
fi
|
||||
|
||||
log "Installing forge server"
|
||||
dirOfInstaller=$(dirname "${forgeInstallerJar}")
|
||||
(cd "${dirOfInstaller}"; java -jar "$(basename "${forgeInstallerJar}")" --installServer)
|
||||
fi
|
||||
|
||||
echo "${FTB_SERVER_MOD}" > $installMarker
|
||||
fi
|
||||
|
||||
SERVER=$(find "${FTB_BASE_DIR}" -maxdepth 2 -type f \( -path "/libraries/*" -o -path "/mods/*" \) -prune -o -name "forge*.jar" -not -name "forge*installer.jar" -print)
|
||||
if [[ -z "${SERVER}" || ! -f "${SERVER}" ]]; then
|
||||
log "ERROR unable to locate installed forge server jar"
|
||||
isDebugging && find "${FTB_BASE_DIR}" -name "forge*.jar"
|
||||
exit 2
|
||||
fi
|
||||
export SERVER
|
||||
|
||||
FTB_DIR=$(dirname "${SERVER}")
|
||||
export FTB_DIR
|
||||
|
||||
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|
||||
fi
|
||||
|
||||
|
||||
findStartScript() {
|
||||
entryScriptExpr=(
|
||||
-name ServerStart.sh
|
||||
-o -name serverstart.sh
|
||||
-o -name ServerStartLinux.sh
|
||||
-o -name LaunchServer.sh
|
||||
-o -name server-start.sh
|
||||
-o -name start-server.sh
|
||||
-o -name startserver.sh
|
||||
-o -name StartServer.sh
|
||||
-o -name run.sh
|
||||
-o -name start.sh
|
||||
)
|
||||
|
||||
if [ -d "${FTB_BASE_DIR}" ]; then
|
||||
find "${FTB_BASE_DIR}" \( "${entryScriptExpr[@]}" \) -print -quit
|
||||
fi
|
||||
}
|
||||
|
||||
startScript=$(findStartScript)
|
||||
|
||||
# only download and install if a mod pack isn't already installed
|
||||
# also check for the start script rather than just the folder
|
||||
# this allows saving just the world separate from the rest of the data directory
|
||||
if [[ ! $startScript ]]; then
|
||||
downloadModpack
|
||||
srv_modpack=${FTB_SERVER_MOD}
|
||||
|
||||
log "Unpacking FTB server modpack ${srv_modpack} ..."
|
||||
mkdir -p "${FTB_BASE_DIR}"
|
||||
unzip -o "${srv_modpack}" -d "${FTB_BASE_DIR}" | awk '{printf "."} END {print ""}'
|
||||
|
||||
installScriptExpr=(
|
||||
-name install.sh
|
||||
-o -name FTBInstall.sh
|
||||
-o -name Install.sh
|
||||
)
|
||||
|
||||
installScript=$(find "${FTB_BASE_DIR}" -maxdepth 2 -type f \( "${installScriptExpr[@]}" \) -print -quit)
|
||||
if [[ "$installScript" ]]; then
|
||||
(
|
||||
cd "$(dirname "${installScript}")"
|
||||
chmod +x "${installScript}"
|
||||
log "Running included $(basename "${installScript}"). This might take a minute or two..."
|
||||
"${installScript}" > install.log
|
||||
)
|
||||
fi
|
||||
|
||||
startScript=$(findStartScript)
|
||||
fi
|
||||
|
||||
# start script provided by unzipped+installed modpack?
|
||||
if [[ ! $startScript ]]; then
|
||||
# no, then look for a forge jar to run
|
||||
|
||||
# Allow up to 2 levels since some modpacks have a top-level directory named for the modpack
|
||||
forgeJar=$(find "${FTB_BASE_DIR}" -maxdepth 2 -type f \( -path "/libraries/*" -o -path "/mods/*" \) -prune -o -name "forge*.jar" -not -name "forge*installer.jar" -print)
|
||||
if [[ "$forgeJar" ]]; then
|
||||
FTB_BASE_DIR=$(dirname "${forgeJar}")
|
||||
export FTB_BASE_DIR
|
||||
log "No entry script found, so building one for ${forgeJar}"
|
||||
cat > "${FTB_BASE_DIR}/ServerStart.sh" <<EOF
|
||||
#!/bin/sh
|
||||
. ./settings-local.sh
|
||||
java \${JAVA_PARAMETERS} -Xmx\${MAX_RAM} -jar $(basename "${forgeJar}") nogui
|
||||
EOF
|
||||
startScript="${FTB_BASE_DIR}/ServerStart.sh"
|
||||
chmod +x "$startScript"
|
||||
else
|
||||
log "ERROR: Modpack missing start script and unable to find Forge jar to generate one"
|
||||
exit 2
|
||||
fi
|
||||
fi
|
||||
|
||||
# Modpacks that use https://github.com/BloodyMods/ServerStarter will sometimes specify an
|
||||
# extra subpath where all the server files get installed. Need to transplant EULA file there.
|
||||
serverSetupConfig=$(find "${FTB_BASE_DIR}" -type f -name server-setup-config.yaml)
|
||||
if [[ $serverSetupConfig && $serverSetupConfig != "~" ]]; then
|
||||
if baseInstallPath=$(mc-image-helper yaml-path --file "$serverSetupConfig" ".install.baseInstallPath"); then
|
||||
resolvedBaseInstallPath="$(dirname "$serverSetupConfig")/${baseInstallPath}"
|
||||
mkdir -p "$resolvedBaseInstallPath"
|
||||
|
||||
cp -n /data/eula.txt "${resolvedBaseInstallPath}/eula.txt"
|
||||
fi
|
||||
fi
|
||||
|
||||
FTB_SERVER_START="$startScript"
|
||||
export FTB_SERVER_START
|
||||
|
||||
FTB_DIR=$(dirname "${FTB_SERVER_START}")
|
||||
export FTB_DIR
|
||||
chmod a+x "${FTB_SERVER_START}"
|
||||
grep fml.queryResult=confirm "${FTB_SERVER_START}" > /dev/null || \
|
||||
sed -i 's/-jar/-Dfml.queryResult=confirm -jar/' "${FTB_SERVER_START}"
|
||||
sed -i 's/.*read.*Restart now/#\0/' "${FTB_SERVER_START}"
|
||||
legacyJavaFixerPath="${FTB_DIR}/mods/legacyjavafixer.jar"
|
||||
|
||||
if isTrue "${FTB_LEGACYJAVAFIXER}" && [ ! -e "${legacyJavaFixerPath}" ]; then
|
||||
log "Installing legacy java fixer to ${legacyJavaFixerPath}"
|
||||
if ! get -o "${legacyJavaFixerPath}" ${legacyJavaFixerUrl}; then
|
||||
log "ERROR failed to download legacy java fixer from ${legacyJavaFixerUrl}"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
export FAMILY=FORGE
|
||||
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|
||||
48
scripts/start-deployCanyon
Executable file
48
scripts/start-deployCanyon
Executable file
@@ -0,0 +1,48 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
isDebugging && set -x
|
||||
|
||||
: "${CANYON_BUILD:=lastSuccessfulBuild}"
|
||||
|
||||
if [ "${VERSION}" != "b1.7.3" ]; then
|
||||
log "ERROR: Canyon server type only supports VERSION=b1.7.3"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
canyonJob="https://ci.velocitypowered.com/job/Canyon"
|
||||
|
||||
buildRelPath=$(
|
||||
curl -fsSL "${canyonJob}/${CANYON_BUILD}/api/json" |
|
||||
jq -r '.artifacts[0].relativePath'
|
||||
)
|
||||
buildNumber=$(
|
||||
curl -fsSL "${canyonJob}/${CANYON_BUILD}/api/json" |
|
||||
jq -r '.number'
|
||||
)
|
||||
baseName=$(basename "${buildRelPath}")
|
||||
|
||||
# Add build tag to non-tagged builds for version detection
|
||||
if [ ${baseName%.*} = 'canyon-server' ]; then
|
||||
export SERVER=${baseName%.*}_build${buildNumber}.jar
|
||||
else
|
||||
export SERVER="${baseName}"
|
||||
fi
|
||||
|
||||
if [ ! -f "$SERVER" ]; then
|
||||
downloadUrl="${canyonJob}/${CANYON_BUILD}/artifact/${buildRelPath}"
|
||||
log "Downloading Canyon build ${buildNumber} from $downloadUrl ..."
|
||||
curl -fsSL -o "$SERVER" "$downloadUrl"
|
||||
if [ ! -f "$SERVER" ]; then
|
||||
log "ERROR: failed to download from $downloadUrl (status=$?)"
|
||||
exit 3
|
||||
fi
|
||||
fi
|
||||
|
||||
# Normalize on Spigot for later operations
|
||||
export FAMILY=SPIGOT
|
||||
|
||||
exec ${SCRIPTS:-/}start-spiget "$@"
|
||||
8
start-deployCatserver → scripts/start-deployCatserver
Normal file → Executable file
8
start-deployCatserver → scripts/start-deployCatserver
Normal file → Executable file
@@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
. ${SCRIPTS:-/}start-utils
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
set -o pipefail
|
||||
set -e
|
||||
|
||||
@@ -26,7 +27,6 @@ if [ ! -f ${SERVER} ]; then
|
||||
curl -H "Accept:application/octet-stream" -o "$SERVER" -fsSL https://api.github.com/repos/Luohuayu/CatServer/releases/assets/${latestJarId}
|
||||
fi
|
||||
|
||||
export SKIP_LOG4J_CONFIG=true
|
||||
export FAMILY=HYBRID
|
||||
|
||||
# Continue to Final Setup
|
||||
exec ${SCRIPTS:-/}start-finalSetupWorld "$@"
|
||||
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|
||||
60
scripts/start-deployCrucible
Executable file
60
scripts/start-deployCrucible
Executable file
@@ -0,0 +1,60 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-$(dirname "$0")}/start-utils"
|
||||
set -o pipefail
|
||||
set -e
|
||||
isDebugging && set -x
|
||||
|
||||
requireVar VANILLA_VERSION
|
||||
: "${CRUCIBLE_RELEASE:=latest}"
|
||||
|
||||
crucibleReleasesUrl=https://api.github.com/repos/CrucibleMC/Crucible/releases
|
||||
if [[ ${CRUCIBLE_RELEASE^^} = LATEST ]]; then
|
||||
crucibleReleaseUrl=${crucibleReleasesUrl}/latest
|
||||
else
|
||||
crucibleReleaseUrl=${crucibleReleasesUrl}/tags/${CRUCIBLE_RELEASE}
|
||||
fi
|
||||
|
||||
if ! downloadUrl=$(get --json-path "$.assets[?(@.name =~ /Crucible-${VANILLA_VERSION}-.*\.jar/)].browser_download_url" \
|
||||
--accept "application/vnd.github.v3+json" "$crucibleReleaseUrl"); then
|
||||
log "ERROR: failed to access ${CRUCIBLE_RELEASE} release of Crucible"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $downloadUrl = null ]]; then
|
||||
log "ERROR: failed to locate Crucible jar for $VANILLA_VERSION from ${CRUCIBLE_RELEASE}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
log "Downloading Crucible from $downloadUrl"
|
||||
if ! SERVER=$(get --skip-existing --output-filename -o /data "$downloadUrl"); then
|
||||
log "ERROR: failed to download Crucible jar from $downloadUrl"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
librariesDir=/data/libraries
|
||||
if [ ! -d "$librariesDir" ]; then
|
||||
if ! librariesUrl=$(get --json-path "$.assets[?(@.name == 'libraries.zip')].browser_download_url" \
|
||||
--accept "application/vnd.github.v3+json" "$crucibleReleaseUrl"); then
|
||||
log "ERROR: failed to access ${CRUCIBLE_RELEASE} release of Crucible for libraries"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
log "Downloading Crucible libraries"
|
||||
if ! get -o /tmp/libraries.zip "$librariesUrl"; then
|
||||
log "ERROR: failed to download Crucible libraries from $librariesUrl"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! unzip /tmp/libraries.zip -d "$librariesDir"; then
|
||||
log "ERROR: failed to unzip Crucible libraries"
|
||||
exit 1
|
||||
fi
|
||||
rm /tmp/libraries.zip
|
||||
fi
|
||||
|
||||
export SERVER
|
||||
export FAMILY=HYBRID
|
||||
|
||||
exec "${SCRIPTS:-$(dirname "$0")}/start-setupWorld" "$@"
|
||||
9
start-deployCustom → scripts/start-deployCustom
Normal file → Executable file
9
start-deployCustom → scripts/start-deployCustom
Normal file → Executable file
@@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
. ${SCRIPTS:-/}start-utils
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
isDebugging && set -x
|
||||
|
||||
if isURL ${CUSTOM_SERVER}; then
|
||||
@@ -30,7 +31,7 @@ else
|
||||
|
||||
fi
|
||||
|
||||
export SKIP_LOG4J_CONFIG=true
|
||||
# Allow for overriding Family on custom for testing.
|
||||
export FAMILY="${FAMILY:-HYBRID}"
|
||||
|
||||
# Continue to Final Setup
|
||||
exec ${SCRIPTS:-/}start-finalSetupWorld $@
|
||||
exec ${SCRIPTS:-/}start-setupWorld $@
|
||||
40
start-deployFTBA → scripts/start-deployFTBA
Normal file → Executable file
40
start-deployFTBA → scripts/start-deployFTBA
Normal file → Executable file
@@ -2,10 +2,16 @@
|
||||
|
||||
ftbInstallMarker=".ftb-installed"
|
||||
|
||||
. ${SCRIPTS:-/}start-utils
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
isDebugging && set -x
|
||||
set -e
|
||||
|
||||
if [[ $(getDistro) = alpine ]]; then
|
||||
log "ERROR: the FTBA installer is not supported on Alpine. Use the java8-multiarch image tag instead."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! [[ -v FTB_MODPACK_ID ]]; then
|
||||
log "ERROR FTB_MODPACK_ID is required with TYPE=FTB"
|
||||
exit 1
|
||||
@@ -16,7 +22,7 @@ if ! [[ ${FTB_MODPACK_ID} =~ [0-9]+ ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! [[ -v FTB_MODPACK_VERSION_ID ]]; then
|
||||
if [[ ! $FTB_MODPACK_VERSION_ID ]]; then
|
||||
if ! FTB_MODPACK_VERSION_ID=$(curl -fsSL https://api.modpacks.ch/public/modpack/${FTB_MODPACK_ID} | jq -r '.versions | sort_by(.updated)[-1].id'); then
|
||||
log "ERROR unable to resolve latest modpack version ID for modpack ${FTB_MODPACK_ID}"
|
||||
exit 1
|
||||
@@ -26,11 +32,17 @@ elif ! [[ ${FTB_MODPACK_VERSION_ID} =~ [0-9]+ ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! [ -f "${ftbInstallMarker}" ] || [ $(cat "${ftbInstallMarker}") != "${FTB_MODPACK_ID}=${FTB_MODPACK_VERSION_ID}" ]; then
|
||||
if ! [ -f "${ftbInstallMarker}" ] || [ "$(cat "${ftbInstallMarker}")" != "${FTB_MODPACK_ID}=${FTB_MODPACK_VERSION_ID}" ]; then
|
||||
ftbInstaller=/data/ftb-installer
|
||||
if ! [[ -f "${ftbInstaller}" ]]; then
|
||||
log "Downloading FTB installer"
|
||||
curl -fsSL https://api.modpacks.ch/public/modpack/1/1/server/linux -o "${ftbInstaller}"
|
||||
if [ "$(uname -m)" == "aarch64" ]; then
|
||||
log "Downloading ARM installer"
|
||||
curl -fsSL https://api.modpacks.ch/public/modpack/1/1/server/arm/linux -o "${ftbInstaller}"
|
||||
else
|
||||
log "Downloading x86 installer"
|
||||
curl -fsSL https://api.modpacks.ch/public/modpack/1/1/server/linux -o "${ftbInstaller}"
|
||||
fi
|
||||
chmod +x "${ftbInstaller}"
|
||||
fi
|
||||
|
||||
@@ -52,24 +64,28 @@ fi
|
||||
|
||||
isDebugging && cat version.json
|
||||
forgeVersion=$(jq -r '.targets|unique[] | select(.name == "forge") | .version' version.json)
|
||||
fabricVersion=$(jq -r '.targets|unique[] | select(.name == "fabric") | .version' version.json)
|
||||
mcVersion=$(jq -r '.targets|unique[] | select(.name == "minecraft") | .version' version.json)
|
||||
|
||||
variants=(
|
||||
forge-${mcVersion}-${forgeVersion}.jar
|
||||
forge-${mcVersion}-${forgeVersion}-universal.jar
|
||||
forge-${mcVersion}-${forgeVersion}-${mcVersion}-universal.jar
|
||||
"forge-${mcVersion}-${forgeVersion}.jar"
|
||||
"forge-${mcVersion}-${forgeVersion}-universal.jar"
|
||||
"forge-${mcVersion}-${forgeVersion}-${mcVersion}-universal.jar"
|
||||
"fabric-${mcVersion}-${fabricVersion}-server-launch.jar"
|
||||
run.sh
|
||||
)
|
||||
for f in ${variants[@]}; do
|
||||
for f in "${variants[@]}"; do
|
||||
if [ -f $f ]; then
|
||||
export SERVER=$f
|
||||
break
|
||||
fi
|
||||
done
|
||||
if ! [ -v SERVER ]; then
|
||||
log "ERROR unable to locate the installed forge server jar"
|
||||
ls *.jar
|
||||
log "ERROR unable to locate the installed FTB server jar"
|
||||
log " Tried looking for ${variants[*]}"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# Continue to Final Setup
|
||||
exec ${SCRIPTS:-/}start-finalSetupWorld $@
|
||||
export FAMILY=FORGE
|
||||
|
||||
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|
||||
50
scripts/start-deployFabric
Executable file
50
scripts/start-deployFabric
Executable file
@@ -0,0 +1,50 @@
|
||||
#!/bin/bash
|
||||
set -eu
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
|
||||
requireVar VANILLA_VERSION
|
||||
export TYPE=FABRIC
|
||||
: "${FABRIC_LAUNCHER_VERSION:=${FABRIC_INSTALLER_VERSION:-LATEST}}"
|
||||
: "${FABRIC_LAUNCHER:=}"
|
||||
: "${FABRIC_LAUNCHER_URL:=}"
|
||||
: "${FABRIC_LOADER_VERSION:=LATEST}"
|
||||
|
||||
isDebugging && set -x
|
||||
|
||||
# Custom fabric jar
|
||||
if [[ $FABRIC_LAUNCHER ]]; then
|
||||
export SERVER=${FABRIC_LAUNCHER}
|
||||
# Custom fabric jar url
|
||||
elif [[ $FABRIC_LAUNCHER_URL ]]; then
|
||||
export SERVER=fabric-server-$(echo -n "$FABRIC_LAUNCHER_URL" | mc-image-helper hash)
|
||||
# Official fabric launcher
|
||||
else
|
||||
if [[ ${FABRIC_LAUNCHER_VERSION^^} = LATEST ]]; then
|
||||
log "Checking Fabric Launcher version information."
|
||||
FABRIC_LAUNCHER_VERSION=$(maven-metadata-release https://maven.fabricmc.net/net/fabricmc/fabric-installer/maven-metadata.xml)
|
||||
fi
|
||||
if [[ ${FABRIC_LOADER_VERSION^^} = LATEST ]]; then
|
||||
log "Checking Fabric Loader version information."
|
||||
FABRIC_LOADER_VERSION=$(maven-metadata-release https://maven.fabricmc.net/net/fabricmc/fabric-loader/maven-metadata.xml)
|
||||
fi
|
||||
export SERVER=fabric-server-mc.${VANILLA_VERSION}-loader.${FABRIC_LOADER_VERSION}-launcher.${FABRIC_LAUNCHER_VERSION}.jar
|
||||
export FABRIC_LAUNCHER_URL="https://meta.fabricmc.net/v2/versions/loader/${VANILLA_VERSION}/${FABRIC_LOADER_VERSION}/${FABRIC_LAUNCHER_VERSION}/server/jar"
|
||||
fi
|
||||
|
||||
if [[ ! -e ${SERVER} && ! -z ${FABRIC_LAUNCHER_URL} ]]; then
|
||||
log "Downloading $FABRIC_LAUNCHER_URL ..."
|
||||
if ! get -o "$SERVER" "$FABRIC_LAUNCHER_URL"; then
|
||||
log "Failed to download from given location $FABRIC_LAUNCHER_URL"
|
||||
exit 2
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ! -e ${SERVER} ]]; then
|
||||
log "$SERVER does not exist, cannot launch server!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export FAMILY=FABRIC
|
||||
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|
||||
26
scripts/start-deployForge
Executable file
26
scripts/start-deployForge
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
: "${FORGEVERSION:=RECOMMENDED}"
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-$(dirname "$0")}/start-utils"
|
||||
isDebugging && set -x
|
||||
|
||||
if ! mc-image-helper install-forge \
|
||||
--output-directory=/data \
|
||||
--results-file=/data/.run-forge.env \
|
||||
--minecraft-version="${VANILLA_VERSION}" \
|
||||
--forge-version="${FORGEVERSION}" \
|
||||
--force-reinstall="${FORCE_REINSTALL:-false}"; then
|
||||
log "ERROR failed to install forge"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# grab SERVER and export it
|
||||
set -a
|
||||
source /data/.run-forge.env
|
||||
set +a
|
||||
|
||||
export FAMILY=FORGE
|
||||
|
||||
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|
||||
62
scripts/start-deployLimbo
Executable file
62
scripts/start-deployLimbo
Executable file
@@ -0,0 +1,62 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
. ${SCRIPTS:-/}start-utils
|
||||
isDebugging && set -x
|
||||
|
||||
: ${LIMBO_BUILD:=LATEST}
|
||||
: ${FORCE_REDOWNLOAD:=false}
|
||||
: ${LIMBO_SCHEMA_FILENAME:=default.schem}
|
||||
: ${LEVEL:=default;${LIMBO_SCHEMA_FILENAME}}
|
||||
# defaults to localhost, if this is not set
|
||||
: ${SERVER_IP:=0.0.0.0}
|
||||
|
||||
export LEVEL SERVER_IP
|
||||
|
||||
if [[ ${LIMBO_BUILD^^} == LATEST ]]; then
|
||||
LIMBO_BUILD=lastStableBuild
|
||||
fi
|
||||
|
||||
baseUrl="https://ci.loohpjames.com/job/Limbo/${LIMBO_BUILD}"
|
||||
buildInfoUrl="${baseUrl}/api/json"
|
||||
buildJson=$(curl -fsSL "${buildInfoUrl}")
|
||||
if [ $? != 0 ]; then
|
||||
log "ERROR failed to get build info from ${buildInfoUrl} (status=$?)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ${LIMBO_BUILD} = lastStableBuild ]]; then
|
||||
LIMBO_BUILD=$(jq -r '.number' <<<${buildJson})
|
||||
log "Resolved latest Limbo build to ${LIMBO_BUILD}"
|
||||
fi
|
||||
artifactPath=$(jq -r '.artifacts[] | select(.fileName|test("^Limbo-")) | .relativePath' <<<${buildJson})
|
||||
defaultSchemaPath=$(jq -r '.artifacts[] | select(.fileName|test(".*\\.schem")) | .relativePath' <<<${buildJson})
|
||||
|
||||
export SERVER="limbo-${LIMBO_BUILD}.jar"
|
||||
|
||||
if [ ! -f "$SERVER" ] || isTrue "$FORCE_REDOWNLOAD"; then
|
||||
downloadUrl="${baseUrl}/artifact/${artifactPath}"
|
||||
log "Downloading Limbo from $downloadUrl ..."
|
||||
if ! curl -fsSL -o "$SERVER" "$downloadUrl"; then
|
||||
log "ERROR: failed to download from $downloadUrl (status=$?)"
|
||||
exit 3
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
if [ ! -f "${LIMBO_SCHEMA_FILENAME}" ]; then
|
||||
log "Downloading default schem file"
|
||||
if ! curl -o "${LIMBO_SCHEMA_FILENAME}" -fsSL "${baseUrl}/artifact/${defaultSchemaPath}"; then
|
||||
log "ERROR: failed to download schema file $baseUrl (status=$?)"
|
||||
exit 3
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${LEVEL} != *\;* ]]; then
|
||||
LEVEL="${LEVEL};${LIMBO_SCHEMA_FILENAME}"
|
||||
fi
|
||||
export LEVEL
|
||||
|
||||
export FAMILY=LIMBO
|
||||
exec ${SCRIPTS:-/}start-setupWorld $@
|
||||
32
scripts/start-deployLoliserver
Executable file
32
scripts/start-deployLoliserver
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
set -o pipefail
|
||||
set -e
|
||||
|
||||
latestAsset=$(
|
||||
curl -fsSL https://cdn.ci.loliidc.cn:30011/job/LoliServer-1.16.5/lastSuccessfulBuild/artifact/projects/LoliServer/build/libs | \
|
||||
jq '.assets[] | select(.name | match(".*-server.jar"))'
|
||||
)
|
||||
|
||||
if [[ -z "${latestAsset}" ]]; then
|
||||
log "ERROR: latest release of Loliserver is missing server.jar asset"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
isDebugging && log "Latest asset ${latestAsset}"
|
||||
latestJarName=$(echo ${latestAsset} | jq --raw-output '.name')
|
||||
latestJarId=$(echo ${latestAsset} | jq --raw-output '.id')
|
||||
|
||||
|
||||
export SERVER="/data/${latestJarName}"
|
||||
|
||||
if [ ! -f ${SERVER} ]; then
|
||||
log "Downloading ${latestJarName}"
|
||||
curl -H "Accept:application/octet-stream" -o "$SERVER" -fsSL https://cdn.ci.loliidc.cn:30011/job/LoliServer-1.16.5/lastSuccessfulBuild/artifact/projects/LoliServer/build/libs/${latestJarId}
|
||||
fi
|
||||
|
||||
export FAMILY=HYBRID
|
||||
|
||||
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|
||||
22
scripts/start-deployMagma
Executable file
22
scripts/start-deployMagma
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
isDebugging && set -x
|
||||
|
||||
: "${VANILLA_VERSION?}"
|
||||
|
||||
if ! downloadUrl=$(get --json-path '$.link' "https://api.magmafoundation.org/api/v2/${VANILLA_VERSION}/latest"); then
|
||||
log "ERROR failed to locate latest Magma download for ${VANILLA_VERSION}. Is that version supported?"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! SERVER=$(get --output-filename --skip-up-to-date --output /data "$downloadUrl"); then
|
||||
log "ERROR: failed to download Magma server jar from $downloadUrl"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export SERVER
|
||||
export FAMILY=HYBRID
|
||||
|
||||
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|
||||
43
scripts/start-deployMohist
Executable file
43
scripts/start-deployMohist
Executable file
@@ -0,0 +1,43 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-$(dirname "$0")}/start-utils"
|
||||
set -o pipefail
|
||||
set -e
|
||||
isDebugging && set -x
|
||||
|
||||
requireVar VANILLA_VERSION
|
||||
: "${MOHIST_BUILD:=lastSuccessfulBuild}"
|
||||
|
||||
mohistJobs=https://ci.codemc.io/job/MohistMC/job/
|
||||
mohistJob=${mohistJobs}Mohist-${VANILLA_VERSION}/
|
||||
|
||||
if ! get --exists "${mohistJob}"; then
|
||||
log "ERROR: mohist builds do not exist for ${VANILLA_VERSION}"
|
||||
log " check https://ci.codemc.io/job/MohistMC/ for available versions"
|
||||
log " and set VERSION accordingly"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
buildRelPath=$(
|
||||
get --json-path '$.artifacts[0].relativePath' "${mohistJob}${MOHIST_BUILD}/api/json"
|
||||
)
|
||||
|
||||
baseName=$(basename "${buildRelPath}")
|
||||
if [[ ${baseName} != *-server.jar* ]]; then
|
||||
log "ERROR: mohist build for ${VANILLA_VERSION} is not a valid server jar, found ${baseName}"
|
||||
log " check https://ci.codemc.io/job/MohistMC/ for available versions"
|
||||
log " and set VERSION accordingly"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export SERVER="/data/${baseName}"
|
||||
|
||||
if [ ! -f "${SERVER}" ]; then
|
||||
log "Downloading ${baseName}"
|
||||
get -o "${SERVER}" "${mohistJob}${MOHIST_BUILD}/artifact/${buildRelPath}"
|
||||
fi
|
||||
|
||||
export FAMILY=HYBRID
|
||||
|
||||
exec "${SCRIPTS:-$(dirname "$0")}/start-setupWorld" "$@"
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user