├── LICENSE
├── README.md
├── install
├── apps
│ ├── install-app.sh
│ ├── install-rclone.sh
│ ├── remove-app.sh
│ ├── remove-rclone.sh
│ ├── secure-app.sh
│ └── secure-rclone.sh
├── install.sh
├── misc
│ ├── Gooby-update.sh
│ ├── backup-create.sh
│ ├── backup-restore.sh
│ ├── environment-build.sh
│ ├── system-cleanup.sh
│ └── upload-trigger.sh
├── server
│ ├── OS-upgrade.sh
│ ├── docker-install.sh
│ ├── domain-manage.sh
│ ├── email-manage.sh
│ ├── proxy-switch.sh
│ ├── server-init.sh
│ ├── timezone-manage.sh
│ └── user-create.sh
└── stats
│ ├── apps-installed.sh
│ ├── environment-check.sh
│ ├── plex-stats.sh
│ └── traffic-view.sh
├── menus
├── apps.sh
├── appsdownload.sh
├── appsmedia.sh
├── appsother.sh
├── main.sh
├── misc.sh
├── server.sh
├── stats.sh
└── variables.sh
└── scripts
├── bin
├── api
├── apicheck
├── gbackup
├── gooby
├── omni-upgrade
├── plexstats
├── rclean
├── resetbackup
├── rstats
├── sizer
└── syncmount
├── cron
├── backup.sh
├── rclean.sh
├── syncmount.sh
└── upgradeservice.sh
├── nginx
├── 00---Core
├── 01-header.yaml
├── 02-oauth.yaml
├── 03-proxy.yaml
├── 04-watchtower.yaml
├── 05-autoheal.yaml
├── 10---Organizers
├── 11-organizr.yaml
├── 12-ombi.yaml
├── 13-monitorr.yaml
├── 14-portainer.yaml
├── 20---Streamers
├── 21-plex-beta.yaml
├── 21-plex-hw.yaml
├── 21-plex.yaml
├── 22-emby-beta.yaml
├── 22-emby-hw.yaml
├── 22-emby.yaml
├── 23-jellyfin-beta.yaml
├── 23-jellyfin.yaml
├── 25-tautulli.yaml
├── 26-embystat.yaml
├── 30---Usenet
├── 31-nzbget.yaml
├── 32-sabnzbd.yaml
├── 40---Torrent
├── 41-deluge.yaml
├── 45-rtorrent.yaml
├── 50---Catalog
├── 51-radarr-beta.yaml
├── 51-radarr.yaml
├── 52-sonarr.yaml
├── 53-lidarr.yaml
├── 56-jackett.yaml
├── 59-radarr4k-beta.yaml
├── 59-radarr4k.yaml
├── 60---Utils
├── 61-nextcloud.yaml
├── 62-netdata.yaml
├── 63-speedtest.yaml
├── 70---Database
├── 71-mysql.yaml
├── 72-mariadb.yaml
├── 73-postgres.yaml
├── 75-redis.yaml
├── 80---Web
├── 81-phpapache.yaml
├── 90---Core
└── 99-footer.yaml
├── services
├── mergerfs.service
├── rclonefs.service
└── traefik.toml
└── traefik
├── 00---Core
├── 01-header.yaml
├── 02-oauth.yaml
├── 03-proxy.yaml
├── 04-watchtower.yaml
├── 05-autoheal.yaml
├── 10---Organizers
├── 11-organizr.yaml
├── 12-ombi.yaml
├── 13-monitorr.yaml
├── 14-portainer.yaml
├── 20---Streamers
├── 21-plex-beta.yaml
├── 21-plex-hw.yaml
├── 21-plex.yaml
├── 22-emby-beta.yaml
├── 22-emby-hw.yaml
├── 22-emby.yaml
├── 23-jellyfin.yaml
├── 25-tautulli.yaml
├── 26-embystat.yaml
├── 30---Usenet
├── 31-nzbget.yaml
├── 32-sabnzbd.yaml
├── 40---Torrent
├── 41-deluge.yaml
├── 45-rtorrent.yaml
├── 50---Catalog
├── 51-radarr-beta.yaml
├── 51-radarr.yaml
├── 52-sonarr.yaml
├── 53-lidarr.yaml
├── 56-jackett.yaml
├── 59-radarr4k-beta.yaml
├── 59-radarr4k.yaml
├── 60---Utils
├── 61-nextcloud.yaml
├── 62-netdata.yaml
├── 63-speedtest.yaml
├── 70---Database
├── 71-mysql.yaml
├── 72-mariadb.yaml
├── 73-postgres.yaml
├── 75-redis.yaml
├── 80---Web
├── 81-phpapache.yaml
├── 90---Core
└── 99-footer.yaml
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## Gooby is proud to announce:
2 |
3 | # OmniStream
4 |
5 | What is OmniStream? It's next iteration of Gooby - entirely rebuilt from the ground up. It has many exciting new features such as:
6 |
7 | * Multi user support: everything is in the user home folder - including the mounts.
8 | * Full support of Traefik, with all its advantages such as a single domain certificate if used in conjunction with CloudFlare - no more Let’s Encrypt bans.
9 | * Omni can create and remove subdomains on the fly - you won't need to manually edit your A records.
10 | * More customizations than ever, plus a vastly improved menu system - maintaining your media server couldn't be easier.
11 | * Last but not least, OmniStream is 100% dockerized now, including Rclone and MergerFS - you will never be “waiting on mounts” again!
12 |
13 | ## How to upgrade?
14 |
15 | **MAKE A BACKUP BEFORE YOU START!** Read the information on [OmniStream.cloud](https://omnistream.cloud) first. You can start the upgrade by typing `omni-upgrade`.
16 |
17 | ## What will change?
18 |
19 | There are a few things that will change, mainly with your mount locations. We have made sure impact is minimal, so you won't have to rescan your Plex, Emby or Jellyfin libraries again. However you will have to make some changes within your catalogue apps (Radarr, Sonarr, etc) and downloaders (Torrent, Usenet apps). If you created any custom yaml files, those will not port over automatically. You will need to manually keep a copy and adapt them to work with Omni.
20 |
21 | ## Who are behind OmniStream?
22 |
23 | The same two people (kelinger and TechPerplexed) that created Gooby will be maintaining OmniStream, so you can still expect the same level of support and care. [OmniStream has its own location on GitHub](https://github.com/kelinger/OmniStream). Once you are ready to upgrade, meet us over there for questions and suggestions.
24 |
25 | ## Is Gooby going away?
26 |
27 | No, you can keep using Gooby indefinitely. We won't be actively maintaining it any longer, but you'll never be forced to upgrade. Gooby is here to stay!
28 |
29 | If for some reason you still want to install Gooby from scratch, run this command:
30 |
31 | `sudo wget https://bit.ly/GetGooby2 -O /tmp/install.sh && sudo bash /tmp/install.sh`
32 |
33 | ## Disclaimer:
34 |
35 | This software is supplied "AS IS" without any warranties and support. You are solely responsible for determining whether Gooby is compatible with your equipment and other software installed on your system. Make sure you have a backup of all your important data!
36 |
37 | ## Donate:
38 |
39 | Thank you SO MUCH for your generosity - we promise we'll will think of you when we sip that coffee!
40 |
41 | [](https://www.paypal.com/donate/?hosted_button_id=VRNLSU6P65FNJ)
42 |
--------------------------------------------------------------------------------
/install/apps/install-app.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | docker ps -q -f name=${APP} > ${CONFIGVARS}/checkapp
4 | clear
5 |
6 | if [ -s ${CONFIGVARS}/checkapp ]; then
7 |
8 | ALREADYINSTALLED
9 |
10 | else
11 |
12 | EXPLAINAPP
13 |
14 | CONFIRMATION
15 |
16 | if [[ ${REPLY} =~ ^[Yy]$ ]]; then
17 |
18 | GOAHEAD
19 |
20 | echo ""
21 | echo "--------------------------------------------------"
22 | echo " Please choose what version you want to install:"
23 | echo ""
24 | [[ -f "/opt/Gooby/scripts/${PROXYVERSION}/${APPLOC}.yaml" ]] && echo " ${LYELLOW}S${STD} - ${TASK} Stable"
25 | [[ -f "/opt/Gooby/scripts/${PROXYVERSION}/${APPLOC}-beta.yaml" ]] && echo " ${LYELLOW}B${STD} - ${TASK} Beta"
26 | echo "--------------------------------------------------"
27 | echo ""
28 | read -n 1 -s -r -p " ---> "
29 | echo ""
30 |
31 | case "${REPLY}" in
32 | s|S ) APPLOC=${APPLOC} ;;
33 | b|B ) [[ -f "/opt/Gooby/scripts/${PROXYVERSION}/${APPLOC}-beta.yaml" ]] && APPLOC=${APPLOC}-beta ;;
34 | * ) APPLOC=${APPLOC} ;;
35 | esac
36 |
37 | if [[ -d ${OLDLOC} && ! -d ${CONFIGS}/${TASK} ]]; then
38 |
39 | clear
40 | echo "${YELLOW}"
41 | echo "--------------------------------------------------"
42 | echo " It seems you installed ${TASK} previously"
43 | echo " Would you like to import those settings? (Y/n)"
44 | echo "--------------------------------------------------"
45 | echo "${STD}"
46 | read -n 1 -s -r -p " ---> "
47 | echo ""
48 |
49 | case "${REPLY}" in
50 | n|N ) echo "Settings not imported"; echo "You chose to start from scratch" ;;
51 | * ) echo "Great, importing settings"; sudo mv ${OLDLOC} ${CONFIGS}/${TASK} ;;
52 | esac
53 |
54 | fi
55 |
56 | if [[ ${TASK} = "Plex" && ! -d ${OLDLOC} && ! -d ${CONFIGS}/${TASK} ]]; then
57 |
58 | clear
59 | echo "${YELLOW}"
60 | echo "--------------------------------------------------"
61 | echo " It seems you are new to ${TASK}"
62 | echo " In order to proceed, you will need to visit"
63 | echo " https://www.${LYELLOW}plex.tv/claim${YELLOW}"
64 | echo " and copy the token to clipboard"
65 | echo ""
66 | echo " Make sure you activate the token within 4 minutes"
67 | echo " at ${LYELLOW}${APP}.${MYDOMAIN}:8443${YELLOW}"
68 | echo "--------------------------------------------------"
69 | echo "${STD}"
70 | read -e -p " Paste token here: " PLEXCLAIM
71 | echo ""
72 | echo "${PLEXCLAIM}" > ${CONFIGVARS}/plexclaim
73 |
74 | fi
75 |
76 | echo ""
77 | cd ${CONFIGS}/Docker
78 | sudo rsync -a /opt/Gooby/scripts/${PROXYVERSION}/${APPLOC}.yaml ${CONFIGS}/Docker/components
79 | echo "Just a moment while ${APP} is being installed..."
80 | source /opt/Gooby/install/misc/environment-build.sh rebuild
81 | /usr/local/bin/docker-compose up -d --remove-orphans
82 | cd "${CURDIR}"
83 |
84 | APPINSTALLED
85 |
86 | TASKCOMPLETE
87 |
88 | else
89 |
90 | CANCELTHIS
91 |
92 | fi
93 |
94 | fi
95 |
96 | rm ${CONFIGVARS}/checkapp
97 | PAUSE
98 |
--------------------------------------------------------------------------------
/install/apps/install-rclone.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | source ${CONFIGS}/Docker/.env
4 | which rclone > ${CONFIGVARS}/checkapp
5 | clear
6 |
7 | if [ -s ${CONFIGVARS}/checkapp ]; then
8 |
9 | ALREADYINSTALLED
10 |
11 | echo "Here is a list of the root folders in your mount:"
12 | echo
13 | ls -1 ${MEDIA}
14 | echo
15 | echo "If you're getting an error here, please"
16 | echo "check your Rclone config settings."
17 | echo "You may need to uninstall and try again!"
18 |
19 | else
20 |
21 | EXPLAINTASK
22 |
23 | CONFIRMATION
24 |
25 | if [[ ${REPLY} =~ ^[Yy]$ ]]; then
26 |
27 | GOAHEAD
28 |
29 | # Install MergerFS
30 |
31 | sudo apt-get update -y; sudo apt-get upgrade -y
32 | sudo apt-get -y install mergerfs
33 |
34 | which mergerfs > ${CONFIGVARS}/mergerfs
35 | if [ ! -s ${CONFIGVARS}/mergerfs ]; then
36 | sudo wget https://github.com/trapexit/mergerfs/releases/download/2.28.1/mergerfs_2.28.1.ubuntu-xenial_amd64.deb -O /tmp/mergerfs.deb
37 | sudo dpkg -i /tmp/mergerfs.deb
38 | fi
39 | rm ${CONFIGVARS}/mergerfs
40 |
41 | # Main script
42 |
43 | cd /tmp
44 | clear
45 | read -n 1 -s -r -p "Stable ${YELLOW}(S)${STD} or Beta installation ${YELLOW}(B)?${STD} " -i "S" CHOICE
46 |
47 | case "${CHOICE}" in
48 | b|B ) curl https://rclone.org/install.sh | sudo bash -s beta; echo "Beta" > ${CONFIGVARS}/rcloneversion ;;
49 | * ) curl https://rclone.org/install.sh | sudo bash; echo "Stable" > ${CONFIGVARS}/rcloneversion ;;
50 | esac
51 |
52 | clear
53 |
54 | echo "${YELLOW}Please follow the instructions to setup Rclone${STD}"
55 | echo
56 | rclone config
57 | echo
58 | read -r RCLONESERVICE < ${HOME}/.config/rclone/rclone.conf; RCLONESERVICE=${RCLONESERVICE:1:-1}
59 | read -e -p "Confirm that this is what you named your mount " -i "${RCLONESERVICE}" RCLONESERVICE
60 | echo
61 | echo "What is your media folder in ${RCLONESERVICE}?"
62 | read -e -p "Leave empty for root - not recommended! (ex: Media) " -i "" RCLONEFOLDER
63 | echo
64 |
65 | # Installing Services
66 |
67 | RCLONESERVICE=${RCLONESERVICE#:}; echo ${RCLONESERVICE} > ${CONFIGVARS}/rcloneservice
68 | RCLONEFOLDER=${RCLONEFOLDER%/}; RCLONEFOLDER=${RCLONEFOLDER#/}; echo ${RCLONEFOLDER} > ${CONFIGVARS}/rclonefolder
69 |
70 | sudo sed -i 's/^#user_allow_other/user_allow_other/g' /etc/fuse.conf
71 |
72 | source /opt/Gooby/install/misc/environment-build.sh rebuild
73 |
74 | mkdir -p ${HOME}/logs ${HOME}/Downloads
75 | sudo mkdir -p ${MEDIA} ${RCLONEMOUNT} ${UPLOADS} ${LOCALFILES}
76 | sudo chown -R ${USER}:${USER} ${HOME} ${CONFIGVARS} ${CONFIGS}/Docker ${MEDIA} ${RCLONEMOUNT} ${UPLOADS} ${LOCALFILES}
77 |
78 | cat ${HOME}/.config/rclone/rclone.conf | grep "Local" > /dev/null
79 | if ! [[ ${?} -eq 0 ]]; then
80 | echo [Local] >> ${HOME}/.config/rclone/rclone.conf
81 | echo type = local >> ${HOME}/.config/rclone/rclone.conf
82 | echo nounc = >> ${HOME}/.config/rclone/rclone.conf
83 | fi
84 |
85 | if [ ! -d ${UPLOADS}/Downloads ]; then
86 | sudo mv ${HOME}/Downloads ${UPLOADS}
87 | sudo ln -s ${UPLOADS}/Downloads ${HOME}/Downloads
88 | fi
89 |
90 | # Create and start services
91 |
92 | sudo rsync -a /opt/Gooby/scripts/services/rclonefs* /etc/systemd/system/
93 | sudo rsync -a /opt/Gooby/scripts/services/mergerfs* /etc/systemd/system/
94 | sudo sed -i "s/GOOBYUSER/${USER}/g" /etc/systemd/system/rclonefs.service
95 | sudo sed -i "s/GOOBYUSER/${USER}/g" /etc/systemd/system/mergerfs.service
96 |
97 | sudo systemctl enable rclonefs.service mergerfs.service
98 | sudo systemctl daemon-reload
99 | sudo systemctl start rclonefs.service
100 | sleep 10; sudo systemctl start mergerfs.service
101 |
102 | # Create syncmount cron
103 | crontab -l | grep 'syncmount.sh' || (crontab -l 2>/dev/null; echo "0,15,30,45 * * * * /opt/Gooby/scripts/cron/syncmount.sh > /dev/null 2>&1") | crontab -
104 |
105 | echo
106 | echo " Done! Please perform a system cleanup now."
107 | echo
108 |
109 | TASKCOMPLETE
110 |
111 | else
112 |
113 | CANCELTHIS
114 |
115 | fi
116 |
117 | fi
118 |
119 | rm ${CONFIGVARS}/checkapp
120 | PAUSE
121 |
--------------------------------------------------------------------------------
/install/apps/remove-app.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | docker ps -q -f name=${APP} > ${CONFIGVARS}/checkapp
4 | clear
5 |
6 | if [ ! -s ${CONFIGVARS}/checkapp ]; then
7 |
8 | NOTINSTALLED
9 |
10 | else
11 |
12 | EXPLAINAPP
13 |
14 | CONFIRMATION
15 |
16 | if [[ ${REPLY} =~ ^[Yy]$ ]]; then
17 |
18 | GOAHEAD
19 |
20 | cd ${CONFIGS}/Docker
21 | echo " Just a moment while ${APP} is being uninstalled..."
22 | docker stop ${APP}
23 | sudo rm ${CONFIGS}/Docker/components/${APPLOC}*
24 | source /opt/Gooby/install/misc/environment-build.sh rebuild
25 | /usr/local/bin/docker-compose up -d --remove-orphans
26 | cd "${CURDIR}"
27 |
28 | clear
29 |
30 | echo " ${TASK} has been removed".
31 |
32 | CONFIRMDELETE
33 |
34 | case "${REPLY}" in
35 | y|Y ) [[ -d "${CONFIGS}/${TASK}" ]] && sudo mv ${CONFIGS}/${TASK} /tmp/; echo " Done, all traces of ${TASK} are gone" ;;
36 | * ) echo " User data for ${TASK} preserved" ;;
37 | esac
38 |
39 | TASKCOMPLETE
40 |
41 | else
42 |
43 | CANCELTHIS
44 |
45 | fi
46 |
47 | fi
48 |
49 | rm ${CONFIGVARS}/checkapp
50 | PAUSE
51 |
--------------------------------------------------------------------------------
/install/apps/remove-rclone.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | source ${CONFIGS}/Docker/.env
4 | which rclone > ${CONFIGVARS}/checkapp
5 | clear
6 |
7 | if [ ! -s ${CONFIGVARS}/checkapp ]; then
8 |
9 | NOTINSTALLED
10 |
11 | else
12 |
13 | EXPLAINTASK
14 |
15 | CONFIRMATION
16 |
17 | if [[ ${REPLY} =~ ^[Yy]$ ]]; then
18 |
19 | GOAHEAD
20 |
21 | # Main script
22 |
23 | /bin/fusermount -uz ${RCLONEMOUNT}
24 | sudo rm /usr/bin/rclone
25 | sudo rm /usr/local/share/man/man1/rclone.1
26 |
27 | # Removing Services
28 |
29 | if [ -f /etc/systemd/system/rclone.service ]; then
30 | sudo systemctl stop rclone
31 | sudo systemctl disable rclone.service
32 | sudo rm /etc/systemd/system/rclone.service
33 | fi
34 |
35 | if [ -f /etc/systemd/system/gooby.service ]; then
36 | sudo systemctl stop gooby
37 | sudo systemctl disable gooby.service gooby-rclone.service gooby-find.service mnt-google.mount
38 | sudo rm /etc/systemd/system/gooby* /etc/systemd/system/mnt-*
39 | fi
40 |
41 | if [ -f /etc/systemd/system/rclonefs.service ]; then
42 | sudo systemctl stop mergerfs rclonefs
43 | sudo systemctl disable mergerfs.service rclonefs.service
44 | sudo rm /etc/systemd/system/mergerfs* /etc/systemd/system/rclonefs*
45 | fi
46 |
47 | sudo rmdir ${RCLONEMOUNT} > /dev/null 2>&1
48 | sudo rmdir ${MEDIA} > /dev/null 2>&1
49 |
50 | sudo systemctl daemon-reload
51 |
52 | TASKCOMPLETE
53 |
54 | else
55 |
56 | CANCELTHIS
57 |
58 | fi
59 |
60 | fi
61 |
62 | rm ${CONFIGVARS}/checkapp
63 | PAUSE
64 |
--------------------------------------------------------------------------------
/install/apps/secure-app.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | docker ps -q -f name=${APP} > ${CONFIGVARS}/checkapp
4 | MENU="Secure App"
5 | clear
6 |
7 | if [ ! -s ${CONFIGVARS}/checkapp ]; then
8 |
9 | NOTINSTALLED
10 |
11 | else
12 |
13 | FILENAME=${APP}.${MYDOMAIN}
14 | cd ${CONFIGS}/Docker/security
15 |
16 | # Menu Options
17 |
18 | NEWUSER(){
19 | clear
20 | read -p "Username to add: " USERNAME
21 |
22 | try_install() {
23 | dpkg -l "$1" | grep -q ^ii && return 1 # Package already installed
24 | echo
25 | echo Installing ${@}
26 | echo
27 | sudo apt -y install "$@"
28 | return 0
29 | }
30 |
31 | # Check to see if apache2-utils are installed. If not, then install them.
32 |
33 | try_install apache2-utils
34 |
35 | echo
36 |
37 | if [[ -e ${FILENAME} ]]
38 | then # File exists so append with new user
39 | echo Updating file ${FILENAME}
40 | echo Adding user ${USERNAME}
41 | htpasswd ${FILENAME} ${USERNAME}
42 | else # Create file then create first user
43 | echo Creating file ${FILENAME}
44 | echo Adding user ${USERNAME}
45 | htpasswd -c ${FILENAME} ${USERNAME}
46 | fi
47 |
48 | cd ${CURDIR}
49 | docker stop ${APP}
50 | docker start ${APP}
51 |
52 | TASKCOMPLETE
53 |
54 | touch ${CONFIGVARS}/checkapp; rm ${CONFIGVARS}/checkapp
55 | PAUSE
56 | }
57 |
58 | RESTOREACCESS(){
59 | clear
60 | echo "Restoring unrestricted access to ${FILENAME}..."
61 | rm ${FILENAME}
62 |
63 | cd ${CURDIR}
64 | docker stop ${APP}
65 | docker start ${APP}
66 |
67 | TASKCOMPLETE
68 |
69 | touch ${CONFIGVARS}/checkapp; rm ${CONFIGVARS}/checkapp
70 | PAUSE
71 | }
72 |
73 | QUIT(){
74 | exit
75 | }
76 |
77 | # Display menu
78 |
79 | COLOUR=${CYAN}
80 |
81 | show_menus() {
82 | MENUSTART
83 |
84 | if [ -f ${FILENAME} ]; then
85 |
86 | echo " Current users to access ${FILENAME}:"
87 | echo
88 | cat -s -n ${FILENAME} | cut -f1 -d":"
89 |
90 | else
91 |
92 | echo " You haven't added any passwords for ${FILENAME} yet"
93 |
94 | fi
95 |
96 | echo
97 | echo " ${COLOUR}A${STD} - Add user to access ${FILENAME}"
98 | if [ -f ${FILENAME} ]; then echo " ${COLOUR}R${STD} - Reset access to default (remove users)"; fi
99 | echo " ${WHITE}Z${STD} - EXIT to Main Menu"
100 | echo " ${COLOUR}"
101 | MENUEND
102 | }
103 |
104 | # Read Choices
105 |
106 | read_options(){
107 | local CHOICE
108 | read -n 1 -r -p "Choose option: " CHOICE
109 | case ${CHOICE} in
110 | [Aa]) NEWUSER ;;
111 | [Rr]) RESTOREACCESS ;;
112 | [Zz]) QUIT ;;
113 | *) echo "${LRED}Please select a valid option${STD}" && sleep 1
114 | esac
115 | }
116 |
117 | MENUFINALIZE
118 |
119 | fi
120 |
--------------------------------------------------------------------------------
/install/apps/secure-rclone.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | which rclone > ${CONFIGVARS}/checkapp
4 | clear
5 |
6 | if [ ! -s ${CONFIGVARS}/checkapp ]; then
7 |
8 | NOTINSTALLED
9 |
10 | else
11 |
12 | EXPLAINTASK
13 |
14 | CONFIRMATION
15 |
16 | if [[ ${REPLY} =~ ^[Yy]$ ]]; then
17 |
18 | GOAHEAD
19 |
20 | echo " ${TASK} does not have its own web page"
21 | echo " There is nothing to secure!"
22 |
23 | TASKCOMPLETE
24 |
25 | else
26 |
27 | CANCELTHIS
28 |
29 | fi
30 |
31 | fi
32 |
33 | rm ${CONFIGVARS}/checkapp
34 | PAUSE
35 |
--------------------------------------------------------------------------------
/install/install.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | clear
4 | echo
5 | echo "--------------------------------------------------"
6 | echo " This will install Gooby"
7 | echo " For best results, run as user 'root'"
8 | echo
9 | echo " Do you wish to install Gooby now? (y/N)? "
10 | echo "--------------------------------------------------"
11 | echo
12 | read -n 1 -s -r -p " ---> "
13 | echo
14 |
15 | if [[ ${REPLY} =~ ^[Yy]$ ]]; then
16 |
17 | echo "--------------------------------------------------"
18 | echo " Great! Let's begin."
19 | echo " Please sit back while we initialize dependencies"
20 | echo "--------------------------------------------------"
21 |
22 | # Installing needed apps
23 |
24 | echo; sleep 2
25 | sudo apt-get update -y; echo; sleep 2
26 | sudo apt-get upgrade -y; echo; sleep 2
27 |
28 | APPLIST="acl apt-transport-https ca-certificates curl fail2ban fuse git gpg-agent grsync jq nano rsync sqlite3 screen socat ufw unzip wget"
29 |
30 | for i in ${APPLIST}; do
31 | echo Installing $i...
32 | echo
33 | sudo apt-get -y install $i
34 | echo; sleep 2
35 | done
36 |
37 | # Enable UFW firewall
38 |
39 | echo Enabling UFW firewall...
40 | echo
41 | sudo ufw default deny incoming
42 | sudo ufw default allow outgoing
43 | sudo ufw allow ssh
44 | sudo ufw --force enable
45 | echo
46 |
47 | # Cloning Gooby from Github
48 |
49 | sudo rm -r /opt/.Gooby > /dev/null 2>&1
50 | sudo git clone -b v2 https://github.com/TechPerplexed/Gooby /opt/.Gooby
51 |
52 | if [ -d /opt/.Gooby ]; then
53 | sudo rm -r /opt/Gooby > /dev/null 2>&1
54 | sudo mv /opt/.Gooby /opt/Gooby
55 | sudo chmod +x -R /opt/Gooby/install
56 | sudo chmod +x -R /opt/Gooby/menus
57 | sudo chmod +x -R /opt/Gooby/scripts/bin
58 | sudo chmod +x -R /opt/Gooby/scripts/cron
59 | sudo rsync -a /opt/Gooby/scripts/bin/* /bin
60 | sudo chmod 755 /bin/gooby
61 | sudo chmod 755 /bin/gbackup
62 | sudo chmod 755 /bin/omni-upgrade
63 | sudo chmod 755 /bin/plexstats
64 | sudo chmod 755 /bin/rclean
65 | sudo chmod 755 /bin/resetbackup
66 | sudo chmod 755 /bin/rstats
67 | sudo chmod 755 /bin/sizer
68 | sudo chmod 755 /bin/syncmount
69 | fi
70 |
71 | # Finalizing
72 |
73 | source /opt/Gooby/menus/variables.sh
74 |
75 | clear
76 | echo "${GREEN}"
77 | echo "--------------------------------------------------"
78 | echo " Server initialization and dependencies complete!"
79 | echo " Type ${WHITE}gooby${GREEN} to continue installation"
80 | echo " Visit ${LGREEN}techperplexed.blogspot.com${GREEN} for instructions"
81 | echo "--------------------------------------------------"
82 | echo "${STD}"
83 |
84 | else
85 |
86 | echo
87 | echo "--------------------------------------------------"
88 | echo " No worries. You can install Gooby at any time"
89 | echo " Visit techperplexed.blogspot.com for instructions"
90 | echo "--------------------------------------------------"
91 | echo
92 |
93 | fi
94 |
--------------------------------------------------------------------------------
/install/misc/Gooby-update.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | source ${CONFIGS}/Docker/.env
4 |
5 | clear
6 |
7 | EXPLAINTASK
8 |
9 | CONFIRMATION
10 |
11 | if [[ ${REPLY} =~ ^[Yy]$ ]]; then
12 |
13 | echo Updating Gooby to v2 (final version)
14 | echo
15 | sudo rm -r /opt/.Gooby > /dev/null 2>&1
16 | sudo git clone -b v2 https://github.com/TechPerplexed/Gooby /opt/.Gooby
17 |
18 | if [ -d /opt/.Gooby ]; then
19 | sudo rm -r /opt/Gooby
20 | sudo mv /opt/.Gooby /opt/Gooby
21 | sudo chmod +x -R /opt/Gooby/install
22 | sudo chmod +x -R /opt/Gooby/menus
23 | sudo chmod +x -R /opt/Gooby/scripts/bin
24 | sudo chmod +x -R /opt/Gooby/scripts/cron
25 | sudo rsync -a /opt/Gooby/scripts/bin/* /bin
26 | sudo chmod 755 /bin/gooby
27 | sudo chmod 755 /bin/gbackup
28 | sudo chmod 755 /bin/omni-upgrade
29 | sudo chmod 755 /bin/plexstats
30 | sudo chmod 755 /bin/rclean
31 | sudo chmod 755 /bin/resetbackup
32 | sudo chmod 755 /bin/rstats
33 | sudo chmod 755 /bin/sizer
34 | sudo chmod 755 /bin/syncmount
35 | fi
36 |
37 | sleep 5
38 |
39 | clear
40 |
41 | TASKCOMPLETE
42 |
43 | else
44 |
45 | CANCELTHIS
46 |
47 | fi
48 |
49 | PAUSE
50 |
--------------------------------------------------------------------------------
/install/misc/backup-create.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | clear
4 |
5 | EXPLAINTASK
6 |
7 | CONFIRMATION
8 |
9 | if [[ ${REPLY} =~ ^[Yy]$ ]]; then
10 |
11 | GOAHEAD
12 |
13 | if [ ! -d ${CONFIGVARS}/snapshots ]; then
14 |
15 | echo
16 | echo " It looks like this is the first time you are creating a backup."
17 | echo " Please make ${LYELLOW}sure${STD} that you restore an existing backup first!"
18 | echo
19 | read -n 1 -s -r -p " Do you wish to proceed with the backup now (y/N)? "
20 | echo
21 |
22 | if [[ ${REPLY} =~ ^[Yy]$ ]]; then
23 |
24 | echo " Ok, proceeding..."; echo
25 |
26 | else
27 | echo " Ok, script will quit now to allow you to restore your existing backup first."; PAUSE; exit
28 |
29 | fi
30 | fi
31 |
32 | echo " Current backup schedule:"
33 |
34 | if ! crontab -l | grep 'backup.sh'; then
35 |
36 | echo
37 | echo " You currently have no backup cron scheduled."
38 | echo
39 | read -n 1 -s -r -p " Would you like to schedule a weekly backup (y/N)? "
40 | echo
41 |
42 | if [[ ${REPLY} =~ ^[Yy]$ ]]; then
43 |
44 | crontab -l | grep 'backup.sh' || (crontab -l 2>/dev/null; echo "15 2 * * SUN /opt/Gooby/scripts/cron/backup.sh > /dev/null 2>&1") | crontab -
45 | crontab -l | grep 'resetbackup' || (crontab -l 2>/dev/null; echo "10 2 1 * * /bin/resetbackup > /dev/null 2>&1") | crontab -
46 | echo
47 | echo " Backup scheduled to run at 02:15 every Sunday."
48 | echo " The incremental backup will reset on the first of each month."
49 | echo
50 | echo " You can always change these settings by typing ${LYELLOW}crontab -e${STD}"
51 | sleep 10
52 |
53 | else
54 |
55 | echo " No worries, you can always add a backup schedule later!"; sleep 10
56 |
57 | fi
58 |
59 | fi
60 |
61 | echo
62 | echo " The backup can take several hours"
63 | echo " Please don't exit the terminal until it's done!"
64 | echo
65 |
66 | source /opt/Gooby/scripts/cron/backup.sh
67 |
68 | clear
69 | echo "${YELLOW}"
70 | echo "--------------------------------------------------"
71 | echo " Done! The backup can be found in your"
72 | echo " Backup folder (on the Google drive)"
73 | echo "--------------------------------------------------"
74 | echo "${STD}"
75 |
76 | TASKCOMPLETE
77 |
78 | else
79 |
80 | CANCELTHIS
81 |
82 | fi
83 |
84 | PAUSE
85 |
--------------------------------------------------------------------------------
/install/misc/backup-restore.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | source ${CONFIGS}/Docker/.env
4 | which rclone > ${CONFIGVARS}/checkrcl.txt
5 | clear
6 |
7 | if [ ! -s ${CONFIGVARS}/checkrcl.txt ]; then
8 |
9 | RCLONECHECK
10 |
11 | else
12 |
13 | EXPLAINTASK
14 |
15 | CONFIRMATION
16 |
17 | if [[ ${REPLY} =~ ^[Yy]$ ]]; then
18 |
19 | GOAHEAD
20 |
21 | mkdir -p /tmp/goobyrestore
22 | mkdir -p /tmp/Gooby
23 | RESTOREFOLDER=/tmp/goobyrestore
24 | OLDFILES=/tmp/Gooby
25 |
26 | echo " Restoring the backup can take several hours"
27 | echo " please don't exit the terminal until it's done!"
28 | echo
29 | read -e -p " Server to restore: " -i "${SERVER}" SERVER
30 | echo
31 | echo " App name to restore: (for example, ${LYELLOW}Docker${STD} or ${LYELLOW}Plex${STD})"
32 | echo " You can find your app names in ${RCLONESERVICE}:/Backup/${SERVER}/Gooby"
33 | echo " You can type ${LYELLOW}All${STD} for all Docker apps,"
34 | echo " Or ${LYELLOW}Home${STD} for restoring your /home/${USER} directory"
35 | echo
36 | read -e -p " App to restore (case matters): " -i "All" APPNAME
37 |
38 | echo
39 | echo " ${LMAGENTA}Copying ${APPNAME} backup from ${RCLONESERVICE}...${STD}"
40 | echo
41 |
42 | if [ "${APPNAME}" == "Home" ]; then
43 |
44 | /usr/bin/rclone --stats-one-line -P copy ${RCLONESERVICE}:/Backup/${SERVER}/${SERVER}-backup.tar.gz ${RESTOREFOLDER} --checksum --drive-chunk-size=64M
45 |
46 | [ -f ${RESTOREFOLDER}/${SERVER}-backup.tar.gz ] || { echo; echo " ${LRED}Sorry, backup not found on ${RCLONESERVICE}!${STD} - please try again"; PAUSE; exit ;}
47 |
48 | echo
49 | echo " ${GREEN}Restoring your home folder...${STD}"
50 | echo
51 |
52 | tar -xpvf ${RESTOREFOLDER}/${SERVER}-backup.tar.gz -C /
53 | sudo chown ${USER}:${USER} ${HOME}
54 |
55 | else
56 |
57 | if [ "${APPNAME}" == "All" ]; then
58 |
59 | /usr/bin/rclone --stats-one-line -P copy ${RCLONESERVICE}:/Backup/${SERVER}/Gooby ${RESTOREFOLDER} --checksum --drive-chunk-size=64M
60 | [ -f ${RESTOREFOLDER}/Docker-full.tar.gz ] || { echo; echo " ${LRED}Sorry, backup not found on ${RCLONESERVICE}!${STD} - please try again"; PAUSE; exit ;}
61 | sudo mv ${CONFIGS}/[^.]* ${OLDFILES}
62 | sudo rm -f "${CONFIGVARS}/snapshots/*.snar"
63 |
64 | else
65 |
66 | echo "+ ${APPNAME}*" > ${CONFIGVARS}/checkapp.txt
67 | echo "- *" >> ${CONFIGVARS}/checkapp.txt
68 | /usr/bin/rclone --stats-one-line -P copy ${RCLONESERVICE}:/Backup/${SERVER}/Gooby --filter-from ${CONFIGVARS}/checkapp.txt ${RESTOREFOLDER} --checksum --drive-chunk-size=64M
69 | rm -f ${CONFIGVARS}/checkapp.txt
70 | [ -f ${RESTOREFOLDER}/${APPNAME}-full.tar.gz ] || { echo; echo " ${LRED}Sorry, backup not found on ${RCLONESERVICE}!${STD}, please try again"; PAUSE; exit ;}
71 | sudo mv ${CONFIGS}/${APPNAME}/ ${OLDFILES}
72 | sudo rm -f "${CONFIGVARS}/snapshots/${APPNAME}.snar"
73 |
74 | fi
75 |
76 | echo
77 | echo " ${LBLUE}${APPNAME} backup downloaded, proceeding...${STD}"
78 | echo
79 |
80 | echo
81 | echo " ${YELLOW}Taking containers down...${STD}"
82 |
83 | cd ${CONFIGS}/Docker
84 | /usr/local/bin/docker-compose down
85 | cd ${CURDIR}
86 |
87 | echo
88 | echo " ${GREEN}Restoring files...${STD}"
89 | echo
90 |
91 | cd ${CONFIGS}
92 |
93 | for f in ${RESTOREFOLDER}/*-full.tar.gz
94 |
95 | do
96 |
97 | echo " ${GREEN}Extracting full archive... ${f}${STD}"
98 | echo
99 | tar -xpvf "$f"
100 | echo
101 | rm "$f"
102 |
103 | done
104 |
105 | for f in ${RESTOREFOLDER}/*-diff.tar.gz
106 |
107 | do
108 |
109 | echo " ${GREEN}Extracting differential archive... ${f}${STD}"
110 | echo
111 | [ -f "$f" ] && tar --incremental -xpvf "$f"
112 | echo
113 | [ -f "$f" ] && rm "$f"
114 |
115 | done
116 |
117 | cd ${CURDIR}
118 | mkdir -p ${CONFIGVARS}/snapshots
119 | source /bin/resetbackup
120 |
121 | echo " ${GREEN}Restoring permissions, please wait...${STD}"
122 | echo
123 | sudo chown ${USER}:${USER} ${CONFIGS}
124 |
125 | echo
126 | echo " ${CYAN}Finished restoring ${APPNAME}${STD}"
127 | echo
128 |
129 | echo
130 | echo " ${WHITE}Make sure${STD} you check if your services are"
131 | echo " running properly before you remove the old installation!"
132 | echo
133 | echo " Run ${WHITE}rclean${STD} to bring up all containers again"
134 | read -n 1 -r -p " Remove old installation files (y/N)? " -i "" CHOICE
135 | echo
136 |
137 | case "${CHOICE}" in
138 | y|Y ) sudo rm -r ${OLDFILES} ;;
139 | * ) echo " Your old installation files are available"; echo " at ${OLDFILES} until you reboot"; echo ;;
140 | esac
141 |
142 | fi
143 |
144 | sudo rm -r ${RESTOREFOLDER}
145 |
146 | TASKCOMPLETE
147 |
148 | else
149 |
150 | CANCELTHIS
151 |
152 | fi
153 |
154 | fi
155 |
156 | rm -f ${CONFIGVARS}/checkrcl.txt
157 | PAUSE
158 |
--------------------------------------------------------------------------------
/install/misc/environment-build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | source /opt/Gooby/menus/variables.sh
4 |
5 | ENV=${CONFIGS}/Docker/.env
6 | touch ${ENV}
7 |
8 | # Since Docker processes " as part of the paths, we don't actually store it in the variables. However, BASH does require
9 | # the " if the string is going to have odd characters. As a result, we have to load the existing environment line
10 | # by line and insert the " around the values.
11 |
12 | # Load existing variables and use them as defaults, if available
13 |
14 | while IFS='' read -r line || [[ -n "${line}" ]]; do
15 | newline=$(echo ${line} | sed 's/=/&\"/g; s/:$//')\"
16 | eval ${newline} > /dev/null 2>&1
17 | done < ${ENV}
18 |
19 | if [[ ${1,,} != "rebuild" ]]; then
20 | echo "Creating configuration file..."
21 | fi
22 |
23 | cat > ${ENV} << EOF
24 |
25 | ###########################
26 | # Environment variables #
27 | # for Gooby v${VERSION} #
28 | ###########################
29 |
30 | # Config variables
31 | CONFIGS=/var/local/Gooby
32 | CONFIGVARS=${CONFIGS}/Docker/.config
33 |
34 | # Server settings
35 | MYDOMAIN=$(cat ${CONFIGVARS}/mydomain)
36 | MYEMAIL=$(cat ${CONFIGVARS}/myemail)
37 | IP=$(curl ifconfig.me)
38 | SERVER=$(hostname)
39 | TIMEZONE=$(cat /etc/timezone)
40 |
41 | # User settings
42 | GROUPID=$(id -g)
43 | GROUPNAME=${USER}
44 | USERID=$(id -u)
45 | USERNAME=${USER}
46 |
47 | # App settings
48 | CF_EMAIL=$(cat ${CONFIGVARS}/cf_email)
49 | CF_KEY=$(cat ${CONFIGVARS}/cf_key)
50 | GPUGIDS=$(getent group video | cut -d: -f3)
51 | PLEXCLAIM=$(cat ${CONFIGVARS}/plexclaim)
52 |
53 | # Gooby settings
54 | APILOG=${LOGS}/api.log
55 | CURDIR=$(pwd)
56 | GOOBYBRANCH=$(cat ${CONFIGVARS}/goobybranch)
57 | LOGS=${HOME}/logs
58 | PROXYVERSION=$(cat ${CONFIGVARS}/proxyversion)
59 | VERSION=$(cat ${CONFIGVARS}/version)
60 |
61 | # Rclone settings
62 | RCLONEHOME=${HOMEDIR}/.config/rclone
63 | RCLONESERVICE=$(cat ${CONFIGVARS}/rcloneservice)
64 | RCLONEFOLDER=$(cat ${CONFIGVARS}/rclonefolder)
65 | RCLONEUSERNAME=$(cat ${CONFIGVARS}/rcloneusername)
66 | RCLONEPASSWORD=$(cat ${CONFIGVARS}/rclonepassword)
67 |
68 | # Mounts and locations
69 | HOMEDIR=${HOME}
70 | LOCALFILES=$(cat ${CONFIGVARS}/localfiles)
71 | MEDIA=$(cat ${CONFIGVARS}/media)
72 | RCLONEMOUNT=$(cat ${CONFIGVARS}/rclonemount)
73 | ROOTMOUNT=$(cat ${CONFIGVARS}/rootmount)
74 | UPLOADS=$(cat ${CONFIGVARS}/uploads)
75 | DOWNLOADS=${HOMEDIR}/Downloads
76 |
77 | # Legacy variables
78 | GOOGLE=$(cat ${CONFIGVARS}/media)
79 |
80 | EOF
81 |
82 | cat ${CONFIGS}/Docker/components/??-* > ${CONFIGS}/Docker/docker-compose.yaml
83 | echo done
84 |
--------------------------------------------------------------------------------
/install/misc/system-cleanup.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | source ${CONFIGS}/Docker/.env
4 | which rclone > ${CONFIGVARS}/checkapp.txt
5 | clear
6 |
7 | if [ ! -s ${CONFIGVARS}/checkapp.txt ]; then
8 |
9 | echo "${YELLOW}"
10 | echo "--------------------------------------------------"
11 | echo " You will need to install and configure"
12 | echo " Rclone before you can run the system clean!"
13 | echo "--------------------------------------------------"
14 | echo "${STD}"
15 |
16 | else
17 |
18 | EXPLAINTASK
19 |
20 | CONFIRMATION
21 |
22 | if [[ ${REPLY} =~ ^[Yy]$ ]]; then
23 |
24 | echo
25 | echo "${GREEN}Giving your system a nice little spring cleaning...${STD}"
26 | echo
27 |
28 | source /opt/Gooby/scripts/cron/rclean.sh
29 |
30 | clear
31 |
32 | TASKCOMPLETE
33 |
34 | else
35 |
36 | CANCELTHIS
37 |
38 | fi
39 |
40 | fi
41 |
42 | rm ${CONFIGVARS}/checkapp.txt 2>/dev/null;
43 |
44 | PAUSE
45 |
--------------------------------------------------------------------------------
/install/misc/upload-trigger.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | clear
4 |
5 | EXPLAINTASK
6 |
7 | CONFIRMATION
8 |
9 | if [[ ${REPLY} =~ ^[Yy]$ ]]; then
10 |
11 | echo
12 | echo "${GREEN}This will manually trigger your uploads."
13 | echo "This process runs every 15 minutes regardless!${STD}"
14 | echo
15 |
16 | source /opt/Gooby/scripts/cron/syncmount.sh
17 |
18 | TASKCOMPLETE
19 |
20 | else
21 |
22 | CANCELTHIS
23 |
24 | fi
25 |
26 | PAUSE
27 |
--------------------------------------------------------------------------------
/install/server/OS-upgrade.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | clear
4 |
5 | echo -e "--------------------------------------------------"
6 | echo -e " ~~~ ${RED}DANGER ZONE!!!${STD} ~~~"
7 | echo -e " This will upgrade your OS software"
8 | echo -e " ${YELLOW}CAUTION!!!${STD} Make SURE you have a backup!"
9 | echo -e "--------------------------------------------------"
10 | echo ""
11 |
12 | EXPLAINTASK
13 |
14 | CONFIRMATION
15 |
16 | if [[ ${REPLY} =~ ^[Yy]$ ]]; then
17 |
18 | GOAHEAD
19 |
20 | sudo apt-get update
21 | sudo apt-get upgrade -y
22 | sudo apt-get dist-upgrade -y
23 | sudo apt autoremove -y
24 | sudo apt autoclean
25 | sudo apt-get autoremove
26 | sudo apt install update-manager-core -y
27 | sudo do-release-upgrade
28 |
29 | TASKCOMPLETE
30 |
31 | else
32 |
33 | CANCELTHIS
34 |
35 | fi
36 |
37 | PAUSE
38 |
--------------------------------------------------------------------------------
/install/server/docker-install.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | VERSION=$(lsb_release -si)
4 | echo Distribution is ${VERSION}
5 |
6 | sudo apt -y update
7 | sudo apt install -y apt-transport-https ca-certificates curl software-properties-common python3-pip acl
8 |
9 | curl -fsSL https://download.docker.com/linux/${VERSION,,}/gpg | sudo apt-key add -
10 | sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/${VERSION,,} $(lsb_release -cs) stable"
11 |
12 | sudo apt -y update
13 | apt-cache policy docker-ce
14 | sudo apt install -y docker-ce
15 |
16 | # latest docker compose released tag
17 |
18 | COMPOSE_VERSION=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep 'tag_name' | cut -d\" -f4)
19 |
20 | # Install docker-compose
21 |
22 | sudo sh -c "curl -L https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose"
23 | sudo chmod +x /usr/local/bin/docker-compose
24 | # sudo sh -c "curl -L https://raw.githubusercontent.com/docker/compose/${COMPOSE_VERSION}/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose"
25 |
26 | # Set permissions
27 |
28 | sudo usermod -aG docker ${USER}
29 | sudo gpasswd -a ${USER} docker
30 | sudo setfacl -m user:${USER}:rw /var/run/docker.sock
31 |
32 | clear
33 |
34 | docker version
35 | echo
36 | docker-compose version
37 |
--------------------------------------------------------------------------------
/install/server/domain-manage.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | clear
4 |
5 | EXPLAINTASK
6 |
7 | CONFIRMATION
8 |
9 | if [[ ${REPLY} =~ ^[Yy]$ ]]; then
10 |
11 | GOAHEAD
12 |
13 | OLDDOMAIN=$(cat ${CONFIGVARS}/mydomain)
14 | echo "Your domain is currently set to ${OLDDOMAIN}"
15 |
16 | read -p "Your new domain: " SETURL
17 |
18 | if [[ -z "${SETURL}" ]]; then
19 |
20 | echo "No input entered... no changes made!"
21 |
22 | else
23 |
24 | echo "${SETURL}" > ${CONFIGVARS}/mydomain
25 |
26 | MYDOMAIN=$(cat ${CONFIGVARS}/mydomain)
27 |
28 | echo ""
29 | echo "Just a moment while your new domain is being installed..."
30 | echo ""
31 | cd ${CONFIGS}/Docker
32 | sudo sed -i "s/${OLDDOMAIN}/${MYDOMAIN}/g" ${CONFIGS}/Docker/traefik/traefik.toml
33 |
34 | /usr/local/bin/docker-compose down
35 | source /opt/Gooby/install/misc/environment-build.sh rebuild
36 | /usr/local/bin/docker-compose up -d --remove-orphans
37 | cd "${CURDIR}"
38 | clear
39 | source ${CONFIGS}/Docker/.env
40 |
41 | echo
42 | echo "Your new domain is set to ${MYDOMAIN}"
43 | echo "Remember to point it to IP address ${IP}"
44 |
45 | TASKCOMPLETE
46 |
47 | fi
48 |
49 | else
50 |
51 | CANCELTHIS
52 |
53 | fi
54 |
55 | PAUSE
56 |
--------------------------------------------------------------------------------
/install/server/email-manage.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | clear
4 |
5 | EXPLAINTASK
6 |
7 | CONFIRMATION
8 |
9 | if [[ ${REPLY} =~ ^[Yy]$ ]]; then
10 |
11 | GOAHEAD
12 |
13 | OLDEMAIL=$(cat ${CONFIGVARS}/myemail)
14 |
15 | echo "Your email address is currently set to ${OLDEMAIL}"
16 |
17 | read -p "Your new email address: " SETMAIL
18 |
19 | if [[ -z "${SETMAIL}" ]]; then
20 |
21 | echo "No input entered... no changes made!"
22 |
23 | else
24 |
25 | echo "${SETMAIL}" > ${CONFIGVARS}/myemail
26 |
27 | MYEMAIL=$(cat ${CONFIGVARS}/myemail)
28 |
29 | sudo sed -i "s/${OLDEMAIL}/${MYEMAIL}/g" ${CONFIGS}/Docker/traefik/traefik.toml
30 |
31 | /opt/Gooby/install/misc/environment-build.sh rebuild
32 | source ${CONFIGS}/Docker/.env
33 |
34 | echo; echo "Your new email address is set to ${MYEMAIL}"
35 |
36 | TASKCOMPLETE
37 |
38 | fi
39 |
40 | else
41 |
42 | CANCELTHIS
43 |
44 | fi
45 |
46 | PAUSE
47 |
--------------------------------------------------------------------------------
/install/server/proxy-switch.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | clear
4 |
5 | EXPLAINTASK
6 |
7 | CONFIRMATION
8 |
9 | if [[ ${REPLY} =~ ^[Yy]$ ]]; then
10 |
11 | GOAHEAD
12 |
13 | clear
14 |
15 | echo
16 | echo " Coming soon! Stay tuned..."
17 | echo
18 |
19 | TASKCOMPLETE
20 |
21 | else
22 |
23 | CANCELTHIS
24 |
25 | fi
26 |
27 | PAUSE
28 |
--------------------------------------------------------------------------------
/install/server/server-init.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | source /opt/Gooby/menus/variables.sh
4 |
5 | # Make it yours
6 |
7 | clear
8 | echo
9 | echo "${YELLOW}Welcome to ${GOOBY}${YELLOW}!"
10 | echo
11 | echo "Please answer the following two questions:${STD}"
12 | echo
13 | echo "What domain will you be using to access your server?"
14 | read -e -p '(ex: mydomain.com) ' -i "${MYDOMAIN}" MYDOMAIN
15 | echo
16 | echo "What is your email address for certificate registration?"
17 | read -e -p '(ex: myname@mydomain.com) ' -i "${MYEMAIL}" MYEMAIL
18 | echo
19 | echo "${YELLOW}Thank you! Please hang tight while we get some things ready...${STD}"
20 | echo
21 | sleep 10
22 |
23 | # Install Docker
24 |
25 | source /opt/Gooby/install/server/docker-install.sh
26 |
27 | # Save parameters
28 |
29 | sudo mkdir -p ${CONFIGVARS} ${CONFIGS}/Docker/components
30 | sudo chown -R ${USER}:${USER} ${CONFIGS}
31 |
32 | echo "${MYDOMAIN}" > ${CONFIGVARS}/mydomain
33 | echo "${MYEMAIL}" > ${CONFIGVARS}/myemail
34 | echo "v2" > ${CONFIGVARS}/goobybranch
35 |
36 | [[ ! -f ${CONFIGVARS}/rootmount ]] && echo "/mnt" > ${CONFIGVARS}/rootmount
37 | [[ ! -f ${CONFIGVARS}/media ]] && echo "/mnt/google" > ${CONFIGVARS}/media
38 | [[ ! -f ${CONFIGVARS}/uploads ]] && echo "/mnt/uploads" > ${CONFIGVARS}/uploads
39 | [[ ! -f ${CONFIGVARS}/localfiles ]] && echo "/mnt/local" > ${CONFIGVARS}/localfiles
40 | [[ ! -f ${CONFIGVARS}/rclonemount ]] && echo "/mnt/rclone" > ${CONFIGVARS}/rclonemount
41 | [[ ! -f ${CONFIGVARS}/rclonepassword ]] && echo "Go0by" > ${CONFIGVARS}/rclonepassword
42 | [[ ! -f ${CONFIGVARS}/rcloneusername ]] && echo "gooby" > ${CONFIGVARS}/rcloneusername
43 | [[ ! -f ${CONFIGVARS}/proxyversion ]] && echo "nginx" > ${CONFIGVARS}/proxyversion
44 |
45 | # Copy necessary containers
46 |
47 | PROXYVERSION=$(cat ${CONFIGVARS}/proxyversion)
48 |
49 | sudo rsync -a /opt/Gooby/scripts/${PROXYVERSION}/{01-header.yaml,02-oauth.yaml,03-proxy.yaml,04-watchtower.yaml,05-autoheal.yaml,99-footer.yaml} ${CONFIGS}/Docker/components
50 | touch ${CONFIGVARS}/cf_email ${CONFIGVARS}/cf_key ${CONFIGVARS}/plexclaim ${CONFIGVARS}/rclonefolder ${CONFIGVARS}/rcloneservice ${CONFIGVARS}/rcloneversion ${CONFIGVARS}/version
51 |
52 | # Build server
53 |
54 | source /opt/Gooby/install/misc/environment-build.sh
55 |
56 | cd ${CONFIGS}/Docker
57 |
58 | sudo mkdir nginx
59 | sudo mkdir -p traefik
60 | sudo rsync -a /opt/Gooby/scripts/services/traefik.toml ${CONFIGS}/Docker/traefik/
61 | sudo sed -i "s/GOOBYDOMAIN/${MYDOMAIN}/g" ${CONFIGS}/Docker/traefik/traefik.toml
62 | sudo sed -i "s/GOOBYEMAIL/${MYEMAIL}/g" ${CONFIGS}/Docker/traefik/traefik.toml
63 |
64 | # Set permissions
65 |
66 | sudo chown -R ${USER}:${USER} ${CONFIGS}
67 |
68 | echo "client_max_body_size 30m;" > ${CONFIGS}/Docker/nginx/my_custom_proxy_settings.conf
69 |
70 | # Bring containers up
71 |
72 | /usr/local/bin/docker-compose up --remove-orphans --build -d
73 |
74 | cd "${CURDIR}"
75 |
76 | # Add rlean to bootup cron
77 |
78 | crontab -l | grep 'rclean.sh' || (crontab -l 2>/dev/null; echo "@reboot /opt/Gooby/scripts/cron/rclean.sh > /dev/null 2>&1") | crontab -
79 |
--------------------------------------------------------------------------------
/install/server/timezone-manage.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | clear
4 |
5 | EXPLAINTASK
6 |
7 | CONFIRMATION
8 |
9 | if [[ ${REPLY} =~ ^[Yy]$ ]]; then
10 |
11 | GOAHEAD
12 |
13 | sudo dpkg-reconfigure tzdata
14 | echo
15 | echo "Your timezone is now set to ${CYAN}$( cat /etc/timezone )${STD}"
16 | echo
17 |
18 | TASKCOMPLETE
19 |
20 | else
21 |
22 | CANCELTHIS
23 |
24 | fi
25 |
26 | PAUSE
27 |
--------------------------------------------------------------------------------
/install/server/user-create.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | MENU="Create User"
4 | PERFORM="create"
5 | TASK="a new user"
6 |
7 | source /opt/Gooby/menus/variables.sh
8 |
9 | EXPLAINTASK
10 |
11 | echo "You are logged in as ${USER}"
12 | echo "You will need to ${PERFORM} ${TASK}"
13 |
14 | CONFIRMATION
15 |
16 | if [[ ${REPLY} =~ ^[Yy]$ ]]; then
17 |
18 | read -e -p "${YELLOW}Desired username${STD}: " -i "yourname" PU
19 |
20 | sudo -s adduser ${PU}
21 |
22 | sudo -s usermod -a -G sudo ${PU}
23 | sudo -s echo -e "${PU}\tALL=(ALL)\tNOPASSWD:ALL" > /etc/sudoers.d/${PU}
24 | sudo -s chmod 0440 /etc/sudoers.d/${PU}
25 |
26 | COLOUR=${YELLOW}
27 |
28 | MENUSTART
29 | echo " You should now be switched to ${COLOUR}${PU}${STD}"
30 | echo " Type ${WHITE}gooby${STD} to access the menu."
31 | echo " ${COLOUR}"
32 | MENUEND
33 | su ${PU}
34 |
35 | else
36 |
37 | CANCELTHIS
38 | MENUVISIT
39 | exit 0
40 |
41 | fi
42 |
43 | PAUSE
44 |
--------------------------------------------------------------------------------
/install/stats/apps-installed.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | MENU="Installed Apps"
4 |
5 | source ${CONFIGS}/Docker/.env
6 |
7 | clear
8 | echo "Fetching your settings..."
9 |
10 | # Menu Options
11 |
12 | QUIT(){
13 | exit
14 | }
15 |
16 | # Display menu
17 |
18 | COLOUR=${LBLUE}
19 |
20 | show_menus() {
21 | MENUSTART
22 | docker ps -a --format "table {{.Status}}\t: ${COLOUR}{{.Names}}${STD}" | sort
23 | echo
24 | echo " ${WHITE}Z${STD} - EXIT to Main Menu"
25 | echo " ${COLOUR}"
26 | MENUEND
27 | }
28 |
29 | # Read Choices
30 |
31 | read_options(){
32 | local CHOICE
33 | read -n 1 -s -r -p "Choose option: " CHOICE
34 | case ${CHOICE} in
35 | [Zz]) QUIT ;;
36 | *) echo "${LRED}Please select a valid option${STD}" && sleep 1
37 | esac
38 | }
39 |
40 | MENUFINALIZE
41 |
--------------------------------------------------------------------------------
/install/stats/environment-check.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | MENU="Check Environment"
4 |
5 | source ${CONFIGS}/Docker/.env
6 |
7 | clear
8 | echo "Fetching your settings..."
9 |
10 | # Menu Options
11 |
12 | QUIT(){
13 | exit
14 | }
15 |
16 | # Display menu
17 |
18 | COLOUR=${LBLUE}
19 |
20 | show_menus() {
21 | MENUSTART
22 | echo -n " OS Version : ${COLOUR}" ; lsb_release -ds 2>/dev/null || cat /etc/*release 2>/dev/null | head -n1 || uname -om ; echo -n "${STD}" ; echo -n "${STD}"
23 | echo " Server Name : ${COLOUR}${SERVER}${STD}"
24 | echo " Timezone : ${COLOUR}${TIMEZONE}${STD}"
25 | echo " Domain : ${COLOUR}${MYDOMAIN}${STD}"
26 | echo " Email Address : ${COLOUR}${MYEMAIL}${STD}"
27 | echo " IP Address : ${COLOUR}${IP}${STD}"
28 | echo " Proxy Version : ${COLOUR}${PROXYVERSION^^}${STD}"
29 | echo " Gooby Version : ${COLOUR}${VERSION}${STD}"
30 | echo
31 | echo " Media Location : ${COLOUR}/Media${STD}"
32 | echo " Download Location : ${COLOUR}/Media/Downloads${STD}"
33 | echo
34 | echo " ${WHITE}Z${STD} - EXIT to Main Menu"
35 | echo " ${COLOUR}"
36 | MENUEND
37 | }
38 |
39 | # Read Choices
40 |
41 | read_options(){
42 | local CHOICE
43 | read -n 1 -s -r -p "Choose option: " CHOICE
44 | case ${CHOICE} in
45 | [Zz]) QUIT ;;
46 | *) echo "${LRED}Please select a valid option${STD}" && sleep 1
47 | esac
48 | }
49 |
50 | MENUFINALIZE
51 |
--------------------------------------------------------------------------------
/install/stats/plex-stats.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | MENU="Plex Statistics"
4 |
5 | source ${CONFIGS}/Docker/.env
6 |
7 | clear
8 | echo "Fetching your settings..."
9 |
10 | # Menu Options
11 |
12 | QUIT(){
13 | exit
14 | }
15 |
16 | # Display menu
17 |
18 | COLOUR=${LBLUE}
19 |
20 | show_menus() {
21 | MENUSTART
22 | source /opt/Gooby/scripts/bin/plexstats
23 | echo
24 | echo " ${WHITE}Z${STD} - EXIT to Main Menu"
25 | echo " ${COLOUR}"
26 | MENUEND
27 | }
28 |
29 | # Read Choices
30 |
31 | read_options(){
32 | local CHOICE
33 | read -n 1 -s -r -p "Choose option: " CHOICE
34 | case ${CHOICE} in
35 | [Zz]) QUIT ;;
36 | *) echo "${LRED}Please select a valid option${STD}" && sleep 1
37 | esac
38 | }
39 |
40 | MENUFINALIZE
41 |
--------------------------------------------------------------------------------
/install/stats/traffic-view.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | MENU="Rclone Activity"
4 |
5 | source /opt/Gooby/menus/variables.sh
6 | source ${CONFIGS}/Docker/.env
7 | OPTION=${1}
8 |
9 | while true; do
10 |
11 | RAW=$(rclone rc --user ${RCLONEUSERNAME} --pass ${RCLONEPASSWORD} core/stats)
12 | JRAW=$(rclone rc --user ${RCLONEUSERNAME} --pass ${RCLONEPASSWORD} job/list)
13 | SDATE=$(date -d "-$(echo ${RAW} | jq '.elapsedTime') seconds" '+%F %H:%M:%S')
14 | GIG=$(echo ${RAW} | jq '.bytes /1024/1024/1024')
15 | CHECK=$(echo ${RAW} | jq .checks)
16 | DEL=$(echo ${RAW} | jq .deletes)
17 | ERR=$(echo ${RAW} | jq .errors)
18 | FT=$(echo ${RAW} | jq .transfers)
19 |
20 | TRANSFERS=$(echo ${RAW} | jq .transferring | jq length)
21 | SIZE=$(echo ${RAW} | jq '[.transferring[].size]' | jq 'add /1024/1024/1024')
22 | SPEED=$(echo ${RAW} | jq '[.transferring[].speed]' | jq 'add /1024/1024')
23 | FILES=$(echo ${RAW} | jq '[ .transferring[] | {name: .name, percent: .percentage} ]')
24 | #QSIZE=$(echo ${JRAW} | jq .jobids | jq length)
25 |
26 | # Display menu
27 |
28 | COLOUR=${LBLUE}
29 |
30 | MENUSTART
31 | echo " Transfers Since Reboot/Cleanup"
32 | echo -----------------------------------------
33 | echo -n " Data transferred : ${COLOUR}"; printf "%'.2f" ${GIG}; echo " GB${STD}"
34 | echo -n " Files transferred : ${COLOUR}"; printf "%'d\n" ${FT}; echo -n "${STD}"
35 | echo -n " Checks completed : ${COLOUR}"; printf "%'d\n" ${CHECK}; echo -n "${STD}"
36 | echo -n " Deletes performed : ${COLOUR}"; printf "%'d\n" ${DEL}; echo -n "${STD}"
37 | echo -n " Errors occurred : ${COLOUR}"; printf "%'d\n" ${ERR}; echo -n "${STD}"
38 | echo
39 | echo " Transfers Real Time"
40 | echo -----------------------------------------
41 | echo -n " Files in motion : ${COLOUR}"; printf "%'d\n" ${TRANSFERS}; echo -n "${STD}"
42 | echo -n " Size of files : ${COLOUR}"; printf "%'.2f" ${SIZE}; echo " GB${STD}"
43 | echo -n " Current speed : ${COLOUR}"; printf "%'.2f" ${SPEED}; echo " MB/sec${STD}"
44 | echo
45 |
46 | if [[ ${OPTION,,} != "short" && ${TRANSFERS} != 0 ]]; then
47 | echo 'Files transferring:'
48 | echo
49 | for ((x=0; x<${TRANSFERS}; x++))
50 | do
51 | percent=$(echo ${RAW} | jq ".transferring[${x}] .percentage")
52 | name=$(echo ${RAW} | jq ".transferring[${x}] .name")
53 | name=$(basename "${name}")
54 | if [[ ${percent} -lt 10 ]]
55 | then
56 | percent=" ${percent}"
57 | fi
58 | echo "${percent}% ${name//\"}" >> /tmp/xfer-${$}
59 | done
60 | cat /tmp/xfer-${$} | sort -n
61 | rm /tmp/xfer-${$}
62 | fi
63 |
64 | echo
65 | echo " ${WHITE}Z${STD} - EXIT to Main Menu"
66 | echo " ${COLOUR}"
67 | MENUEND
68 |
69 | sleep 1
70 |
71 | read -t 0.25 -N 1 input
72 | if [[ $input = "z" ]] || [[ $input = "Z" ]]; then
73 | echo
74 | break
75 | fi
76 |
77 | done
78 |
--------------------------------------------------------------------------------
/menus/apps.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | if [ ! -e ${CONFIGS}/Docker/.env ]; then /opt/Gooby/install/server/server-init.sh; fi
4 |
5 | source ${CONFIGS}/Docker/.env
6 |
7 | # Menu Options
8 |
9 | INSTALL(){
10 | PERFORM="install"
11 | source /opt/Gooby/install/apps/${PERFORM}-${APPTYPE}.sh
12 | }
13 |
14 | REMOVE(){
15 | PERFORM="remove"
16 | source /opt/Gooby/install/apps/${PERFORM}-${APPTYPE}.sh
17 | }
18 |
19 | SECURE(){
20 | PERFORM="secure"
21 | source /opt/Gooby/install/apps/${PERFORM}-${APPTYPE}.sh
22 | }
23 |
24 | QUIT(){
25 | exit
26 | }
27 |
28 | # Display menu
29 |
30 | COLOUR=${LPURPLE}
31 |
32 | show_menus() {
33 | MENUSTART
34 | echo " ${COLOUR}I${STD} - Install ${TASK}"
35 | echo " ${COLOUR}R${STD} - Remove ${TASK}"
36 | echo " ${COLOUR}S${STD} - Secure ${TASK}"
37 | echo " ${WHITE}Z${STD} - EXIT to Main Menu"
38 | echo " ${COLOUR}"
39 | MENUEND
40 | }
41 |
42 | # Read Choices
43 |
44 | read_options(){
45 | local CHOICE
46 | read -n 1 -s -r -p "Choose option: " CHOICE
47 | case ${CHOICE} in
48 | [Ii]) INSTALL ;;
49 | [Rr]) REMOVE ;;
50 | [Ss]) SECURE ;;
51 | [Zz]) QUIT ;;
52 | *) echo "${LRED}Please select a valid option${STD}" && sleep 1
53 | esac
54 | }
55 |
56 | MENUFINALIZE
57 |
--------------------------------------------------------------------------------
/menus/appsdownload.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | MENU="Download Applications"
4 | source /opt/Gooby/menus/variables.sh
5 |
6 | # Menu Options
7 |
8 | RADARR(){
9 | TASK=Radarr
10 | APP=radarr
11 | APPTYPE=app
12 | APPLOC=51-radarr
13 | OLDLOC=${USER}/.config/Radarr/
14 | source /opt/Gooby/menus/apps.sh
15 | }
16 |
17 | SONARR(){
18 | TASK=Sonarr
19 | APP=sonarr
20 | APPTYPE=app
21 | APPLOC=52-sonarr
22 | OLDLOC=${USER}/.config/NzbDrone/
23 | source /opt/Gooby/menus/apps.sh
24 | }
25 |
26 | DELUGE(){
27 | TASK=Deluge
28 | APP=deluge
29 | APPTYPE=app
30 | APPLOC=41-deluge
31 | OLDLOC=${USER}/.config/deluge/
32 | source /opt/Gooby/menus/apps.sh
33 | }
34 |
35 | NZBGET(){
36 | TASK=NZBGet
37 | APP=nzbget
38 | APPTYPE=app
39 | APPLOC=31-nzbget
40 | OLDLOC=/noupgradepathprovided
41 | source /opt/Gooby/menus/apps.sh
42 | }
43 |
44 | JACKETT(){
45 | TASK=Jackett
46 | APP=jackett
47 | APPTYPE=app
48 | APPLOC=56-jackett
49 | OLDLOC=/noupgradepathprovided
50 | source /opt/Gooby/menus/apps.sh
51 | }
52 |
53 | QUIT(){
54 | exit
55 | }
56 |
57 | # Display menu
58 |
59 | COLOUR=${LPURPLE}
60 |
61 | show_menus() {
62 | MENUSTART
63 | echo " ${COLOUR}A${STD} - Radarr"
64 | echo " ${COLOUR}B${STD} - Sonarr"
65 | echo " ${COLOUR}C${STD} - Deluge"
66 | echo " ${COLOUR}D${STD} - NZBGet"
67 | echo " ${COLOUR}E${STD} - Jackett"
68 | echo " ${WHITE}Z${STD} - EXIT to Main Menu"
69 | echo " ${COLOUR}"
70 | MENUEND
71 | }
72 |
73 | # Read Choices
74 |
75 | read_options(){
76 | local CHOICE
77 | read -n 1 -s -r -p "Choose option: " CHOICE
78 | case ${CHOICE} in
79 | [Aa]) RADARR ;;
80 | [Bb]) SONARR ;;
81 | [Cc]) DELUGE ;;
82 | [Dd]) NZBGET ;;
83 | [Ee]) JACKETT ;;
84 | [Zz]) QUIT ;;
85 | *) echo "${LRED}Please select a valid option${STD}" && sleep 1
86 | esac
87 | }
88 |
89 | MENUFINALIZE
90 |
--------------------------------------------------------------------------------
/menus/appsmedia.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | MENU="Media Applications"
4 | source /opt/Gooby/menus/variables.sh
5 |
6 | # Menu Options
7 |
8 | RCLONE(){
9 | TASK=Rclone
10 | APP=rclone
11 | APPTYPE=rclone
12 | source /opt/Gooby/menus/apps.sh
13 | }
14 |
15 | PLEX(){
16 | TASK=Plex
17 | APP=plex
18 | APPTYPE=app
19 | APPLOC=21-plex
20 | OLDLOC=/var/lib/plexmediaserver/
21 | source /opt/Gooby/menus/apps.sh
22 | }
23 |
24 | TAUTULLI(){
25 | TASK=Tautulli
26 | APP=tautulli
27 | APPTYPE=app
28 | APPLOC=25-tautulli
29 | OLDLOC=/opt/Tautulli/
30 | source /opt/Gooby/menus/apps.sh
31 | }
32 |
33 | EMBY(){
34 | TASK=Emby
35 | APP=emby
36 | APPTYPE=app
37 | APPLOC=22-emby
38 | OLDLOC=/var/lib/emby/
39 | source /opt/Gooby/menus/apps.sh
40 | }
41 |
42 | JELLYFIN(){
43 | TASK=Jellyfin
44 | APP=jellyfin
45 | APPTYPE=app
46 | APPLOC=23-jellyfin
47 | OLDLOC=/var/lib/jellyfin/
48 | source /opt/Gooby/menus/apps.sh
49 | }
50 |
51 | QUIT(){
52 | exit
53 | }
54 |
55 | # Display menu
56 |
57 | COLOUR=${LPURPLE}
58 |
59 | show_menus() {
60 | MENUSTART
61 | echo " ${COLOUR}A${STD} - Rclone"
62 | echo " ${COLOUR}B${STD} - Plex"
63 | echo " ${COLOUR}C${STD} - Tautulli"
64 | echo " ${COLOUR}D${STD} - Emby"
65 | echo " ${COLOUR}E${STD} - Jellyfin"
66 | echo " ${WHITE}Z${STD} - EXIT to Main Menu"
67 | echo " ${COLOUR}"
68 | MENUEND
69 | }
70 |
71 | # Read Choices
72 |
73 | read_options(){
74 | local CHOICE
75 | read -n 1 -s -r -p "Choose option: " CHOICE
76 | case ${CHOICE} in
77 | [Aa]) RCLONE ;;
78 | [Bb]) PLEX ;;
79 | [Cc]) TAUTULLI ;;
80 | [Dd]) EMBY ;;
81 | [Ee]) JELLYFIN ;;
82 | [Zz]) QUIT ;;
83 | *) echo "${LRED}Please select a valid option${STD}" && sleep 1
84 | esac
85 | }
86 |
87 | MENUFINALIZE
88 |
--------------------------------------------------------------------------------
/menus/appsother.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | MENU="Other Applications"
4 | source /opt/Gooby/menus/variables.sh
5 |
6 | # Menu Options
7 |
8 | NETDATA(){
9 | TASK=Netdata
10 | APP=netdata
11 | APPTYPE=app
12 | APPLOC=62-netdata
13 | OLDLOC=/noupgradepathprovided
14 | source /opt/Gooby/menus/apps.sh
15 | }
16 |
17 | ORGANIZR(){
18 | TASK=Organizr
19 | APP=organizr
20 | APPTYPE=app
21 | APPLOC=11-organizr
22 | OLDLOC=/noupgradepathprovided
23 | source /opt/Gooby/menus/apps.sh
24 | }
25 |
26 | OMBI(){
27 | TASK=Ombi
28 | APP=ombi
29 | APPTYPE=app
30 | APPLOC=12-ombi
31 | OLDLOC=/opt/Ombi/
32 | source /opt/Gooby/menus/apps.sh
33 | }
34 |
35 | PORTAINER(){
36 | TASK=Portainer
37 | APP=portainer
38 | APPTYPE=app
39 | APPLOC=14-portainer
40 | OLDLOC=/noupgradepathprovided
41 | source /opt/Gooby/menus/apps.sh
42 | }
43 |
44 | APACHE(){
45 | TASK=Apache
46 | APP=apache
47 | APPTYPE=app
48 | APPLOC=81-phpapache
49 | OLDLOC=/noupgradepathprovided
50 | source /opt/Gooby/menus/apps.sh
51 | }
52 |
53 | QUIT(){
54 | exit
55 | }
56 |
57 | # Display menu
58 |
59 | COLOUR=${LPURPLE}
60 |
61 | show_menus() {
62 | MENUSTART
63 | echo " ${COLOUR}A${STD} - Netdata"
64 | echo " ${COLOUR}B${STD} - Organizr"
65 | echo " ${COLOUR}C${STD} - Ombi"
66 | echo " ${COLOUR}D${STD} - Portainer"
67 | echo " ${COLOUR}E${STD} - PHP Apache"
68 | echo " ${WHITE}Z${STD} - EXIT to Main Menu"
69 | echo " ${COLOUR}"
70 | MENUEND
71 | }
72 |
73 | # Read Choices
74 |
75 | read_options(){
76 | local CHOICE
77 | read -n 1 -s -r -p "Choose option: " CHOICE
78 | case ${CHOICE} in
79 | [Aa]) NETDATA ;;
80 | [Bb]) ORGANIZR ;;
81 | [Cc]) OMBI ;;
82 | [Dd]) PORTAINER ;;
83 | [Ee]) APACHE ;;
84 | [Zz]) QUIT ;;
85 | *) echo "${LRED}Please select a valid option${STD}" && sleep 1
86 | esac
87 | }
88 |
89 | MENUFINALIZE
90 |
--------------------------------------------------------------------------------
/menus/main.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | MENU="Main Menu"
4 | source /opt/Gooby/menus/variables.sh
5 |
6 | # Menu Options
7 |
8 | server(){
9 | /opt/Gooby/menus/server.sh
10 | }
11 |
12 | media(){
13 | /opt/Gooby/menus/appsmedia.sh
14 | }
15 |
16 | download(){
17 | /opt/Gooby/menus/appsdownload.sh
18 | }
19 |
20 | other(){
21 | /opt/Gooby/menus/appsother.sh
22 | }
23 |
24 | misc(){
25 | /opt/Gooby/menus/misc.sh
26 | }
27 |
28 | stats(){
29 | /opt/Gooby/menus/stats.sh
30 | }
31 |
32 | quit(){
33 | MENUVISIT
34 | exit
35 | }
36 |
37 | # Display menu
38 |
39 | COLOUR=${GREEN}
40 |
41 | show_menus() {
42 | MENUSTART
43 | echo " ${COLOUR}A${STD} - Maintain Server"
44 | echo " ${COLOUR}B${STD} - Media Applications"
45 | echo " ${COLOUR}C${STD} - Download Applications"
46 | echo " ${COLOUR}D${STD} - Other Applications"
47 | echo " ${COLOUR}E${STD} - Additional Tasks"
48 | echo " ${COLOUR}F${STD} - Various Statistics"
49 | echo " ${LRED}Q${STD} - QUIT ${FUNCTION}"
50 | echo " ${COLOUR}"
51 | MENUEND
52 | }
53 |
54 | # Read Choices
55 |
56 | read_options(){
57 | local CHOICE
58 | read -n 1 -s -r -p "Choose option: " CHOICE
59 | case ${CHOICE} in
60 | [Aa]) server ;;
61 | [Bb]) media ;;
62 | [Cc]) download ;;
63 | [Dd]) other ;;
64 | [Ee]) misc ;;
65 | [Ff]) stats ;;
66 | [Qq]) quit ;;
67 | *) echo "${LRED}Please select a valid option${STD}" && sleep 1
68 | esac
69 | }
70 |
71 | MENUFINALIZE
72 |
--------------------------------------------------------------------------------
/menus/misc.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | MENU="Additional Tasks"
4 | source /opt/Gooby/menus/variables.sh
5 |
6 | # Menu Options
7 |
8 | GOOBY(){
9 | PERFORM="update"
10 | TASK="Gooby"
11 | source /opt/Gooby/install/misc/${TASK}-${PERFORM}.sh
12 | }
13 |
14 | UPLOAD(){
15 | PERFORM="trigger"
16 | TASK="upload"
17 | source /opt/Gooby/install/misc/${TASK}-${PERFORM}.sh
18 | }
19 |
20 | RCLEAN(){
21 | PERFORM="cleanup"
22 | TASK="system"
23 | source /opt/Gooby/install/misc/${TASK}-${PERFORM}.sh
24 | }
25 |
26 | BACKUP(){
27 | PERFORM="create"
28 | TASK="backup"
29 | source /opt/Gooby/install/misc/${TASK}-${PERFORM}.sh
30 | }
31 |
32 | RESTORE(){
33 | PERFORM="restore"
34 | TASK="backup"
35 | source /opt/Gooby/install/misc/${TASK}-${PERFORM}.sh
36 | }
37 |
38 | QUIT(){
39 | exit
40 | }
41 |
42 | # Display menu
43 |
44 | COLOUR=${CYAN}
45 |
46 | show_menus() {
47 | MENUSTART
48 | echo " ${COLOUR}A${STD} - Update Gooby"
49 | echo " ${COLOUR}B${STD} - Trigger Uploading"
50 | echo " ${COLOUR}C${STD} - System Cleanup"
51 | echo " ${COLOUR}D${STD} - Create Backup"
52 | echo " ${COLOUR}E${STD} - Restore Backup"
53 | echo " ${WHITE}Z${STD} - EXIT to Main Menu"
54 | echo " ${COLOUR}"
55 | MENUEND
56 | }
57 |
58 | # Read Choices
59 |
60 | read_options(){
61 | local CHOICE
62 | read -n 1 -s -r -p "Choose option: " CHOICE
63 | case ${CHOICE} in
64 | [Aa]) GOOBY ;;
65 | [Bb]) UPLOAD ;;
66 | [Cc]) RCLEAN ;;
67 | [Dd]) BACKUP ;;
68 | [Ee]) RESTORE ;;
69 | [Zz]) QUIT ;;
70 | *) echo "${LRED}Please select a valid option${STD}" && sleep 1
71 | esac
72 | }
73 |
74 | MENUFINALIZE
75 |
--------------------------------------------------------------------------------
/menus/server.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | MENU="Maintain Server"
4 | source /opt/Gooby/menus/variables.sh
5 |
6 | # Menu Options
7 |
8 | DOMAIN(){
9 | PERFORM="manage"
10 | TASK="domain"
11 | source /opt/Gooby/install/server/${TASK}-${PERFORM}.sh
12 | }
13 |
14 | EMAILADDR(){
15 | PERFORM="manage"
16 | TASK="email"
17 | source /opt/Gooby/install/server/${TASK}-${PERFORM}.sh
18 | }
19 |
20 | TZONE(){
21 | PERFORM="manage"
22 | TASK="timezone"
23 | source /opt/Gooby/install/server/${TASK}-${PERFORM}.sh
24 | }
25 |
26 | UPGRADE(){
27 | PERFORM="upgrade"
28 | TASK="OS"
29 | source /opt/Gooby/install/server/${TASK}-${PERFORM}.sh
30 | }
31 |
32 | PROXYSWITCH(){
33 | PERFORM="switch"
34 | TASK="proxy"
35 | source /opt/Gooby/install/server/${TASK}-${PERFORM}.sh
36 | }
37 |
38 | QUIT(){
39 | exit
40 | }
41 |
42 | # Display menu
43 |
44 | COLOUR=${YELLOW}
45 |
46 | show_menus() {
47 | MENUSTART
48 | echo " ${COLOUR}A${STD} - Manage Domain Name"
49 | echo " ${COLOUR}B${STD} - Manage Email Address"
50 | echo " ${COLOUR}C${STD} - Set Timezone"
51 | echo " ${COLOUR}D${STD} - Server Upgrade - Danger zone!"
52 | echo " ${COLOUR}E${STD} - Switch Proxy"
53 | echo " ${WHITE}Z${STD} - EXIT to Main Menu"
54 | echo " ${COLOUR}"
55 | MENUEND
56 | }
57 |
58 | # Read Choices
59 |
60 | read_options(){
61 | local CHOICE
62 | read -n 1 -s -r -p "Choose option: " CHOICE
63 | case ${CHOICE} in
64 | [Aa]) DOMAIN ;;
65 | [Bb]) EMAILADDR ;;
66 | [Cc]) TZONE ;;
67 | [Dd]) UPGRADE ;;
68 | [Ee]) PROXYSWITCH ;;
69 | [Zz]) QUIT ;;
70 | *) echo "${LRED}Please select a valid option${STD}" && sleep 1
71 | esac
72 | }
73 |
74 | MENUFINALIZE
75 |
--------------------------------------------------------------------------------
/menus/stats.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | MENU="Statistics"
4 | source /opt/Gooby/menus/variables.sh
5 |
6 | # Menu Options
7 |
8 | CHECKENV(){
9 | PERFORM="check"
10 | TASK="environment"
11 | source /opt/Gooby/install/stats/${TASK}-${PERFORM}.sh
12 | }
13 |
14 | CONTAINERS(){
15 | PERFORM="installed"
16 | TASK="apps"
17 | source /opt/Gooby/install/stats/${TASK}-${PERFORM}.sh
18 | }
19 |
20 | VIEWTRAFFIC(){
21 | PERFORM="view"
22 | TASK="traffic"
23 | source /opt/Gooby/install/stats/${TASK}-${PERFORM}.sh
24 | }
25 |
26 | PLEXSTATS(){
27 | PERFORM="stats"
28 | TASK="plex"
29 | source /opt/Gooby/install/stats/${TASK}-${PERFORM}.sh
30 | }
31 |
32 | QUIT(){
33 | exit
34 | }
35 |
36 | # Display menu
37 |
38 | COLOUR=${LBLUE}
39 |
40 | show_menus() {
41 | MENUSTART
42 | echo " ${COLOUR}A${STD} - Check Environment"
43 | echo " ${COLOUR}B${STD} - Installed Apps (Containers)"
44 | echo " ${COLOUR}C${STD} - View Rclone Activity"
45 | echo " ${COLOUR}D${STD} - Plex Statistics"
46 | echo " ${WHITE}Z${STD} - EXIT to Main Menu"
47 | echo " ${COLOUR}"
48 | MENUEND
49 | }
50 |
51 | # Read Choices
52 |
53 | read_options(){
54 | local CHOICE
55 | read -n 1 -s -r -p "Choose option: " CHOICE
56 | case ${CHOICE} in
57 | [Aa]) CHECKENV ;;
58 | [Bb]) CONTAINERS ;;
59 | [Cc]) VIEWTRAFFIC ;;
60 | [Dd]) PLEXSTATS ;;
61 | [Zz]) QUIT ;;
62 | *) echo "${LRED}Please select a valid option${STD}" && sleep 1
63 | esac
64 | }
65 |
66 | MENUFINALIZE
67 |
--------------------------------------------------------------------------------
/menus/variables.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | CONFIGS=/var/local/Gooby
4 | CONFIGVARS=${CONFIGS}/Docker/.config
5 | CONFIGENV=${CONFIGS}/Docker/.env
6 |
7 | # Define colors
8 |
9 | BLUE=$(echo -en '\033[00;34m')
10 | CYAN=$(echo -en '\033[00;36m')
11 | GREEN=$(echo -en '\033[00;32m')
12 | LBLUE=$(echo -en '\033[01;34m')
13 | LCYAN=$(echo -en '\033[01;36m')
14 | LGRAY=$(echo -en '\033[00;37m')
15 | LGREEN=$(echo -en '\033[01;32m')
16 | LMAGENTA=$(echo -en '\033[01;35m')
17 | LPURPLE=$(echo -en '\033[01;35m')
18 | LRED=$(echo -en '\033[01;31m')
19 | LYELLOW=$(echo -en '\033[01;33m')
20 | MAGENTA=$(echo -en '\033[00;35m')
21 | PURPLE=$(echo -en '\033[00;35m')
22 | RED=$(echo -en '\033[00;31m')
23 | WHITE=$(echo -en '\033[01;37m')
24 | YELLOW=$(echo -en '\033[00;33m')
25 | STD=$(echo -en '\033[0m')
26 |
27 | GOOBY=${LYELLOW}G${LGREEN}O${CYAN}O${BLUE}B${MAGENTA}Y${STD}
28 |
29 | # Define choices
30 |
31 | MENUSTART(){
32 | clear
33 | echo " ${COLOUR}"
34 | echo "--------------------------------------------------"
35 | echo " ${GOOBY}${COLOUR} instructions at techperplexed.blogspot.com"
36 | echo "--------------------------------------------------"
37 | echo " ${MENU}"
38 | echo " ${STD}"
39 | }
40 |
41 | MENUEND(){
42 | echo "--------------------------------------------------"
43 | echo " ${STD}"
44 | }
45 |
46 | MENUFINALIZE(){
47 | trap '' SIGINT SIGQUIT SIGTSTP
48 | while true
49 | do
50 | show_menus
51 | read_options
52 | done
53 | }
54 |
55 | MENUVISIT(){
56 | clear
57 | echo
58 | echo "--------------------------------------------------"
59 | echo " Open the menu any time by typing '${WHITE}gooby${STD}'"
60 | echo "--------------------------------------------------"
61 | echo
62 | }
63 |
64 | RCLONECHECK(){
65 | echo "${LPURPLE}"
66 | echo "--------------------------------------------------"
67 | echo " You will need to install and configure Rclone"
68 | echo " before you can perform this function"
69 | echo "--------------------------------------------------"
70 | echo "${STD}"
71 | }
72 |
73 | ALREADYINSTALLED(){
74 | echo "${YELLOW}"
75 | echo "--------------------------------------------------"
76 | echo " ${TASK} appears to be installed"
77 | echo "--------------------------------------------------"
78 | echo "${STD}"
79 | }
80 |
81 | NOTINSTALLED(){
82 | echo "${YELLOW}"
83 | echo "--------------------------------------------------"
84 | echo " ${TASK} is not installed yet"
85 | echo "--------------------------------------------------"
86 | echo "${STD}"
87 | }
88 |
89 | APPINSTALLED(){
90 | clear
91 | echo "${YELLOW}"
92 | echo "--------------------------------------------------"
93 | echo " ${TASK} is now installed"
94 | echo " You can reach it through this URL:"
95 | echo " ${WHITE}${APP}.${MYDOMAIN}${YELLOW}"
96 | echo " Don't forget to create an A record with your"
97 | echo " provider for ${WHITE}${APP}${YELLOW} and point it to"
98 | echo " your server IP address ${WHITE}${IP}${YELLOW}"
99 | echo "--------------------------------------------------"
100 | echo "${STD}"
101 | }
102 |
103 | NOAPPUPDATE(){
104 | echo "${LGREEN}"
105 | echo "--------------------------------------------------"
106 | echo " ${TASK} cannot be updated through this menu"
107 | echo " You can update it from the web interface itself"
108 | echo "--------------------------------------------------"
109 | echo "${STD}"
110 | }
111 |
112 | EXPLAINTASK(){
113 | clear
114 | echo "${CYAN}"
115 | echo "--------------------------------------------------"
116 | echo " This will ${PERFORM} ${TASK}"
117 | echo "--------------------------------------------------"
118 | echo "${STD}"
119 | }
120 |
121 | EXPLAINAPP(){
122 | clear
123 | which rclone > ${CONFIGVARS}/checkapp
124 | if [ ! -s ${CONFIGVARS}/checkapp ]; then
125 | echo "${LRED}"
126 | echo "--------------------------------------------------"
127 | echo " WARNING! Rclone is not installed yet."
128 | echo " Please configure that first, otherwise your"
129 | echo " system will not work as intended."
130 | echo "--------------------------------------------------"
131 | echo "${STD}"
132 | fi
133 | echo "${CYAN}"
134 | echo "--------------------------------------------------"
135 | echo " This will ${PERFORM} ${TASK}"
136 | echo "--------------------------------------------------"
137 | echo "${STD}"
138 | }
139 |
140 | CONFIRMATION(){
141 | echo "${YELLOW}"
142 | echo "--------------------------------------------------"
143 | echo " Are you sure you want to ${PERFORM} ${TASK} (y/N)? "
144 | echo "--------------------------------------------------"
145 | echo "${STD}"
146 | read -n 1 -s -r -p " ---> "
147 | echo
148 | }
149 |
150 | CONFIRMDELETE(){
151 | echo "${LRED}"
152 | echo "--------------------------------------------------"
153 | echo " DANGER ZONE - EXTREME CAUTION!!!"
154 | echo " Do you want to delete all user data as well?"
155 | echo " This cannot be undone"
156 | echo " Make sure you have a backup!"
157 | echo
158 | echo " Delete user data for ${TASK}? (y/N)?"
159 | echo "--------------------------------------------------"
160 | echo "${STD}"
161 | read -n 1 -s -r -p " ---> "
162 | echo
163 | }
164 |
165 | GOAHEAD(){
166 | clear
167 | echo "${LMAGENTA}"
168 | echo "--------------------------------------------------"
169 | echo " Starting ${PERFORM} ${TASK}"
170 | echo "--------------------------------------------------"
171 | echo "${STD}"
172 | }
173 |
174 | TASKCOMPLETE(){
175 | echo "${LMAGENTA}"
176 | echo "--------------------------------------------------"
177 | echo " ${PERFORM} ${TASK} completed"
178 | echo "--------------------------------------------------"
179 | echo "${STD}"
180 | }
181 |
182 | CANCELTHIS(){
183 | echo "${YELLOW}"
184 | echo "--------------------------------------------------"
185 | echo " Cancelling ${PERFORM} ${TASK}"
186 | echo "--------------------------------------------------"
187 | echo "${STD}"
188 | }
189 |
190 | PAUSE(){
191 | echo "${GREEN}"
192 | echo "--------------------------------------------------"
193 | echo " All done! Press Enter to return to the menu"
194 | echo "--------------------------------------------------"
195 | echo "${STD}"
196 | read -n 1 -s -r -p " ---> "
197 | echo
198 | }
199 |
--------------------------------------------------------------------------------
/scripts/bin/api:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | apicheck "1 day ago"
4 |
--------------------------------------------------------------------------------
/scripts/bin/apicheck:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | source /opt/Gooby/menus/variables.sh
3 | source ${CONFIGS}/Docker/.env
4 |
5 | x=$(date --date="${1}" '+%F %H:%M:%S')
6 |
7 | echo Since ${x}
8 | echo -n "Gigabytes: "
9 | q -f "1=%4.4f" -d, "select sum(c4)/1024.0/1024/1024 as GB from ${LOGS}/api.log where c1>'$x' and c2='START'"
10 | echo -n "Files: "
11 | q -d, "select sum(c3) as FILES from ${LOGS}/api.log where c1>'$x' and c2='START'"
12 |
13 |
--------------------------------------------------------------------------------
/scripts/bin/gbackup:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | /opt/Gooby/scripts/cron/backup.sh
4 |
--------------------------------------------------------------------------------
/scripts/bin/gooby:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | source /opt/Gooby/menus/variables.sh
4 |
5 | if [ "${EUID}" -ne 0 ]; then
6 |
7 | if [ ! -e ${CONFIGS}/Docker/.env ]; then /opt/Gooby/install/server/server-init.sh; fi
8 |
9 | /opt/Gooby/menus/main.sh
10 |
11 | else
12 |
13 | /opt/Gooby/install/server/user-create.sh
14 |
15 | fi
16 |
--------------------------------------------------------------------------------
/scripts/bin/omni-upgrade:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Upgrade from Gooby to Omni
4 |
5 | source /opt/Gooby/menus/variables.sh
6 | source ${CONFIGS}/Docker/.env
7 | clear
8 |
9 | echo "This will install OmniStream."
10 | echo "You WILL have to make some adjustments"
11 | echo "to your existing apps afterwards."
12 | echo
13 | echo "See ${LCYAN}omnistream.cloud${STD} for detailed information."
14 | echo
15 | echo "${LRED}MAKE A BACKUP BEFORE YOU START!!!${STD}"
16 | echo
17 | echo "Would you like to start the upgrade now?"
18 | echo
19 | read -p "${LGREEN}Y${STD} for YES or ${LRED}Q${STD} to QUIT: " -n1 REPLY
20 | echo
21 | echo
22 |
23 | if [[ ${REPLY} =~ ^[Yy]$ ]] ; then
24 |
25 | # Downloading OmniStream
26 |
27 | echo; echo -n "${YELLOW}Downloading OmniStream... ${STD}"
28 |
29 | wget tinyurl.com/omniSetup -O /tmp/setup
30 | chmod 700 /tmp/setup
31 |
32 | echo "${LGREEN}Done${STD}"
33 |
34 | # Shutting Gooby down
35 |
36 | echo; echo -n "${YELLOW}Shutting down Gooby...${STD}"
37 |
38 | cd ${CONFIGS}/Docker
39 | /usr/local/bin/docker-compose down
40 | docker system prune -a -f --volumes
41 |
42 | echo "${LGREEN}Done${STD}"
43 |
44 | # Remove cron jobs
45 |
46 | echo; echo -n "${YELLOW}Removing Gooby specific cron jobs... ${STD}"
47 |
48 | crontab -l | grep -v '\/opt\/Gooby\/scripts\/cron\/rclean.sh' | crontab -
49 | crontab -l | grep -v '\/opt\/Gooby\/scripts\/cron\/syncmount' | crontab -
50 | crontab -l | grep -v '\/opt\/Gooby\/scripts\/cron\/backup' | crontab -
51 | crontab -l | grep -v '\/bin\/resetbackup' | crontab -
52 |
53 | echo "${LGREEN}Done${STD}"
54 |
55 | # Remove services
56 |
57 | echo; echo -n "${YELLOW}Removing mounts and services... ${STD}"
58 |
59 | if [ -f /etc/systemd/system/rclonefs.service ]; then
60 | sudo systemctl stop mergerfs rclonefs
61 | /bin/fusermount -uz ${MEDIA}
62 | /bin/fusermount -uz ${RCLONEMOUNT}
63 | sudo systemctl disable mergerfs.service rclonefs.service
64 | sudo rm /etc/systemd/system/mergerfs* /etc/systemd/system/rclonefs*
65 | echo "${LGREEN}Done${STD}"
66 |
67 | fi
68 |
69 | # Remove bin files
70 |
71 | echo; echo -n "${YELLOW}Cleaning up bin files... ${STD}"
72 |
73 | [[ -f /bin/gooby ]] && sudo rm /bin/gooby
74 | [[ -f /bin/gbackup ]] && sudo rm /bin/gbackup
75 | [[ -f /bin/plexstats ]] && sudo rm /bin/plexstats
76 | [[ -f /bin/rclean ]] && sudo rm /bin/rclean
77 | [[ -f /bin/resetbackup ]] && sudo rm /bin/resetbackup
78 | [[ -f /bin/rstats ]] && sudo rm /bin/rstats
79 | [[ -f /bin/sizer ]] && sudo rm /bin/sizer
80 | [[ -f /bin/syncmount ]] && sudo rm /bin/syncmount
81 |
82 | # Install OmniStream
83 |
84 | clear
85 | echo
86 | echo "The OmniStream installation will start now."
87 | echo "Make sure you follow along with the instructions."
88 | echo "These can be found at ${LCYAN}omnistream.cloud${STD}."
89 | echo "Follow the tutorial ${YELLOW}Installing Omnistream${STD}."
90 | echo
91 | read -n 1 -s -r -p "Press ENTER to continue"
92 |
93 | source /tmp/setup
94 |
95 | echo "${LGREEN}Done${STD}"
96 |
97 | # Move all containers, delete Docker
98 |
99 | echo; echo -n "${YELLOW}Moving containers from Gooby to OmniStream... ${STD}"
100 |
101 | [[ -d ${HOME}/OmniStream/configs ]] && sudo mv /var/local/Gooby/* ${HOME}/OmniStream/configs/ ; echo "${LGREEN}Done${STD}" || echo "${LRED}Failed!${STD} (no such folder)"
102 | [[ -d ${HOME}/OmniStream/configs/Docker ]] && sudo mv ${HOME}/OmniStream/configs/Docker/* /tmp/ ; echo "${LGREEN}Done${STD}" || echo "${LRED}Failed!${STD} (no such folder)"
103 |
104 | # Set permissions
105 |
106 | echo; echo -n "${YELLOW}Setting permissions... ${STD}"
107 |
108 | sudo chown -R ${USER}:${USER} ${HOME}/OmniStream/configs
109 |
110 | echo "${LGREEN}Done${STD}"
111 |
112 | # Rename folders
113 |
114 | echo; echo "${YELLOW}Renaming folders...${STD}"
115 |
116 | cd /home/${USER}/OmniStream/configs
117 | for f in *; do
118 | test -d "$f" && sudo mv "${f}" "${f,,}" > /dev/null 2>&1
119 | echo "Renamed $f to ${f,,}..."
120 | done
121 |
122 | echo "${LGREEN}Done${STD}"
123 |
124 | # Remove Gooby specific folders
125 |
126 | echo; echo -n "${YELLOW}Removing Gooby folders... ${STD}"
127 |
128 | [[ ! -d /var/local/Gooby/Docker ]] && sudo rm -r /opt/Gooby
129 | [[ ! -d /var/local/Gooby/Docker ]] && sudo rm -r /var/local/Gooby
130 | [[ ! -d /var/local/Gooby/Docker ]] && sudo rm /bin/omni-upgrade
131 | rm ${HOME}/Downloads
132 |
133 | echo "${LGREEN}Done${STD}"
134 |
135 | # Finalizing upgrade
136 |
137 | echo
138 | [[ ! -d /var/local/Gooby ]] && echo "${LGREEN}Gooby has finished upgrading to OmniStream.${STD}" || echo "${LRED}Gooby has upgraded with some errors... please try again.${STD}"
139 | [[ -d /tmp/components ]] && echo "${LGREEN}If you had any custom yaml files, then you can find those in" ; echo "/tmp/components. Make sure you adapt and copy them!${STD}"
140 |
141 | echo
142 | echo "Important! Visit ${LCYAN}omnistream.cloud${STD} and follow the"
143 | echo "tutorial ${YELLOW}Omni Finalization${STD} to run OmniStream."
144 | echo
145 | else
146 |
147 | echo; echo "${YELLOW}No changes to your system were made.${STD}"
148 |
149 | fi
150 |
--------------------------------------------------------------------------------
/scripts/bin/plexstats:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # Script by ajkis: https://github.com/ajkis/scripts/tree/master/plex
3 | # Adapted for Omni: Ken Linger
4 |
5 | source /opt/Gooby/menus/variables.sh
6 | source ${CONFIGS}/Docker/.env
7 |
8 | logfile="${LOGS}/plexstats.log"
9 | db="/${CONFIGS}/Plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db"
10 | echo "$(date "+%d.%m.%Y %T") PLEX LIBRARY STATS" | tee -a $logfile
11 | echo "Media items in Libraries" | tee -a $logfile
12 | query="SELECT Library, Items \
13 | FROM ( SELECT name AS Library, \
14 | COUNT(duration) AS Items \
15 | FROM media_items m \
16 | LEFT JOIN library_sections l ON l.id = m.library_section_id \
17 | WHERE library_section_id > 0 GROUP BY name );"
18 | sqlite3 -header -line "$db" "$query" | tee -a $logfile
19 | echo " " | tee -a
20 | echo "Time to watch" | tee -a $logfile
21 | query="SELECT Library, Minutes, Hours, Days \
22 | FROM ( SELECT name AS Library, \
23 | SUM(duration)/1000/60 AS Minutes, \
24 | SUM(duration)/1000/60/60 AS Hours, \
25 | SUM(duration)/1000/60/60/24 AS Days \
26 | FROM media_items m \
27 | LEFT JOIN library_sections l ON l.id = m.library_section_id \
28 | WHERE library_section_id > 0 GROUP BY name );"
29 | sqlite3 -header -line "$db" "$query" | tee -a $logfile
30 |
31 | echo " " | tee -a
32 |
33 | query="select count(*) from media_items"
34 | result=$(sqlite3 -header -line "$db" "$query")
35 | echo "${result:11} files in library" | tee -a $logfile
36 |
37 | query="select count(*) from media_items where bitrate is null"
38 | result=$(sqlite3 -header -line "$db" "$query")
39 | echo "${result:11} files missing analyzation info" | tee -a $logfile
40 |
41 | query="SELECT count(*) FROM media_parts WHERE deleted_at is not null"
42 | result=$(sqlite3 -header -line "$db" "$query")
43 | echo "${result:11} media_parts marked as deleted" | tee -a $logfile
44 |
45 | query="SELECT count(*) FROM metadata_items WHERE deleted_at is not null"
46 | result=$(sqlite3 -header -line "$db" "$query")
47 | echo "${result:11} metadata_items marked as deleted" | tee -a $logfile
48 |
49 | query="SELECT count(*) FROM directories WHERE deleted_at is not null"
50 | result=$(sqlite3 -header -line "$db" "$query")
51 | echo "${result:11} directories marked as deleted" | tee -a $logfile
52 |
53 | query="select count(*) from metadata_items meta \
54 | join media_items media on media.metadata_item_id = meta.id \
55 | join media_parts part on part.media_item_id = media.id \
56 | where part.extra_data not like '%deepAnalysisVersion=2%' \
57 | and meta.metadata_type in (1, 4, 12) and part.file != '';"
58 | result=$(sqlite3 -header -line "$db" "$query")
59 | echo "${result:11} files missing deep analyzation info." | tee -a $logfile
60 | echo
61 | echo " ${WHITE}Z${STD} - EXIT to Main Menu"
62 | echo
63 | while true; do
64 | read -t 0.25 -N 1 input
65 | if [[ $input = "z" ]] || [[ $input = "Z" ]]; then
66 | echo
67 | break
68 | fi
69 |
70 | done
71 |
72 |
73 |
--------------------------------------------------------------------------------
/scripts/bin/rclean:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | /opt/Gooby/scripts/cron/rclean.sh
4 |
--------------------------------------------------------------------------------
/scripts/bin/resetbackup:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | source /opt/Gooby/menus/variables.sh
4 | source ${CONFIGS}/Docker/.env
5 |
6 | sudo rm -f ${CONFIGVARS}/snapshots/*
7 |
8 | echo
9 | echo "Incremental backups reset to full backup"
10 | echo
11 |
--------------------------------------------------------------------------------
/scripts/bin/rstats:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | /opt/Gooby/install/stats/traffic-view.sh
4 |
--------------------------------------------------------------------------------
/scripts/bin/sizer:
--------------------------------------------------------------------------------
1 | #!/usr/bin/awk -f
2 |
3 | BEGIN{ x = ARGV[1]
4 |
5 | split("B KB MB GB TB PB",type)
6 |
7 | for(i=5;y < 1;i--)
8 | y = x / (2^(10*i))
9 |
10 | printf("%.2f %s\n",y,type[i+2])
11 | }
12 |
--------------------------------------------------------------------------------
/scripts/bin/syncmount:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | /opt/Gooby/scripts/cron/syncmount.sh
4 |
--------------------------------------------------------------------------------
/scripts/cron/backup.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | if pidof -o %PPID -x "$(basename $0)"; then
3 | echo Already running!
4 | exit 1
5 | fi
6 |
7 | source /opt/Gooby/menus/variables.sh
8 | source ${CONFIGS}/Docker/.env
9 |
10 | # Make sure there's a place to store backup index for full versus differential
11 | mkdir -p ${CONFIGVARS}/snapshots
12 | SNAPSHOTS=${CONFIGVARS}/snapshots
13 |
14 | # Edit the file "fullbackup" in Docker/.config to create a list of files you never
15 | # want an incremental backup of. Format of file e.g.: Docker Radarr Sonarr Tautulli
16 |
17 | FULLBAK=${CONFIGVARS}/fullbackup
18 | if [ ! -e ${CONFIGVARS}/fullbackup ]; then
19 | echo "Docker" > ${CONFIGVARS}/fullbackup
20 | rm "${SNAPSHOTS}/Docker.snar" > /dev/null 2>&1
21 | fi
22 |
23 | rmove() {
24 | # This function handles moving a file from the local storage to Google. It will display
25 | # the original path as well as the target and file size upon completion.
26 | SOURCE=${1}
27 | TARGET=${2}
28 | SOURCEDIR=$(dirname "${SOURCE}")
29 | SOURCEFILE=$(basename "${SOURCE}")
30 | BYTES=$(stat --printf="%s" "${SOURCE}")
31 | echo -n "${TARGET} @ "
32 | /bin/sizer ${BYTES}
33 | echo $(date '+%F %H:%M:%S'),START,1,${BYTES} "# ${SOURCE}" >> ${APILOG}
34 | /usr/bin/rclone rc operations/movefile _async=true srcFs=Local: srcRemote=${SOURCE} dstFs=${RCLONESERVICE}: dstRemote=${TARGET} --user ${RCLONEUSERNAME} --pass ${RCLONEPASSWORD} > /dev/null
35 | }
36 |
37 | cd ${HOME}
38 | echo Creating backup - please be patient...; echo
39 | # Dump the user's CRONTAB to the local home directory so that it can be included in the backup.
40 | sudo crontab -u ${USER} -l > /home/${USER}/cron
41 | # Create the home folder backup.
42 | echo -n "/tmp/${SERVER}-backup.tar.gz --> "
43 | sudo tar -cpf /tmp/${SERVER}-backup.tar.gz \
44 | --use-compress-program=pigz \
45 | --exclude=.cache \
46 | --exclude=/home/${USER}/Downloads \
47 | /home/${USER} > /dev/null 2>&1
48 | sudo chown ${USERID}:${GROUPID} /tmp/${SERVER}-*.tar.gz
49 | rmove "/tmp/${SERVER}-backup.tar.gz" "/Backup/${SERVER}/${SERVER}-backup.tar.gz"
50 |
51 | cd ${CONFIGS}
52 |
53 | FILES=${CONFIGS}/*
54 | # Loop through each filename / directory name in the Configs directory
55 | for f in ${FILES}
56 | do
57 | FILENAME="$(basename "${f}")"
58 | echo -n "${f} --> "
59 | if [[ -f "${f}" ]]
60 | then
61 | # This is a file, not a directory. So, we're just going to copy it to Google
62 | # as is (no tar/zip).
63 | cp "${f}" /tmp/
64 | rmove "/tmp/${FILENAME}" "/Backup/${SERVER}/Gooby/${FILENAME}"
65 | else
66 | # This is a directory so we're going to pack it up into /tmp and then ship
67 | # it off to Google drive.
68 | if [[ -f "${SNAPSHOTS}/${FILENAME}.snar" ]]
69 | then
70 | # We already have a snar, which means that this is a differential
71 | FULL=0
72 | cp "${SNAPSHOTS}/${FILENAME}.snar" "${SNAPSHOTS}/${FILENAME}.bak"
73 | FILENAME2="${FILENAME}-diff"
74 | else
75 | # No snar found, so we're doing the full backup
76 | FULL=1
77 | FILENAME2="${FILENAME}-full"
78 | fi
79 | sudo tar --listed-incremental "${SNAPSHOTS}/${FILENAME}.snar" \
80 | -cpf "/tmp/${FILENAME2}.tar.gz" \
81 | --use-compress-program=pigz \
82 | --exclude=.cache \
83 | "${FILENAME}" > /dev/null 2>&1
84 | sudo chown ${USERID}:${GROUPID} "/tmp/${FILENAME2}.tar.gz" "${SNAPSHOTS}/${FILENAME}.snar"
85 | if [[ ${FULL} -eq 0 ]]
86 | then
87 | # If this is a differential, we want to remember the original so that
88 | # future differential backups are based on the original, not the previous
89 | # differential
90 | mv "${SNAPSHOTS}/${FILENAME}.bak" "${SNAPSHOTS}/${FILENAME}.snar"
91 | else
92 | # This is a full so remove any previous differential
93 | echo -n "Removing outdated DIFF for ${FILENAME} --> "
94 | /usr/bin/rclone rc operations/deletefile _async=true fs=${RCLONESERVICE}: remote="/Backup/${SERVER}/Gooby/${FILENAME}-diff.tar.gz" --user ${RCLONEUSERNAME} --pass ${RCLONEPASSWORD} > /dev/null
95 |
96 | fi
97 | if [[ ${FULLBAK} =~ (^|[[:space:]])${FILENAME}($|[[:space:]]) ]]
98 | then
99 | # Don't keep the SNAR so that this is always a full backup
100 | echo "Disposing SNAR for ${FILENAME}"
101 | rm "${SNAPSHOTS}/${FILENAME}.snar"
102 | else
103 | rmove "/tmp/${FILENAME2}.tar.gz" "/Backup/${SERVER}/Gooby/${FILENAME2}.tar.gz"
104 | # cp "${SNAPSHOTS}/${FILENAME}.snar" /tmp/
105 | # rmove "/tmp/${FILENAME}.snar" "/Backup/${SERVER}/Gooby/snapshots/${FILENAME}.snar"
106 |
107 | fi
108 |
109 | fi
110 | done
111 |
112 | rm /home/${USER}/cron
113 |
--------------------------------------------------------------------------------
/scripts/cron/rclean.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | if pidof -o %PPID -x "$(basename $0)"; then
3 | echo Already running!
4 | exit 1
5 | fi
6 |
7 | source /opt/Gooby/menus/variables.sh
8 | source ${CONFIGS}/Docker/.env
9 |
10 | echo
11 | echo "${LYELLOW}Updating Gooby${STD}"
12 | echo
13 |
14 | sudo rm -r /opt/.Gooby > /dev/null 2>&1
15 | sudo git clone -b v2 https://github.com/TechPerplexed/Gooby /opt/.Gooby
16 |
17 | if [ -d /opt/.Gooby ]; then
18 | sudo rm -r /opt/Gooby
19 | sudo mv /opt/.Gooby /opt/Gooby
20 | sudo chmod +x -R /opt/Gooby/install
21 | sudo chmod +x -R /opt/Gooby/menus
22 | sudo chmod +x -R /opt/Gooby/scripts/bin
23 | sudo chmod +x -R /opt/Gooby/scripts/cron
24 | sudo rsync -a /opt/Gooby/scripts/bin/* /bin
25 | sudo chmod 755 /bin/gooby
26 | sudo chmod 755 /bin/gbackup
27 | sudo chmod 755 /bin/omni-upgrade
28 | sudo chmod 755 /bin/plexstats
29 | sudo chmod 755 /bin/rclean
30 | sudo chmod 755 /bin/resetbackup
31 | sudo chmod 755 /bin/rstats
32 | sudo chmod 755 /bin/sizer
33 | sudo chmod 755 /bin/syncmount
34 | fi
35 |
36 | echo
37 | echo "${LYELLOW}Shutting everything down${STD}"
38 | echo
39 |
40 | cd ${CONFIGS}/Docker
41 | /usr/local/bin/docker-compose down
42 |
43 | sudo systemctl daemon-reload
44 | sudo systemctl stop mergerfs
45 | sudo systemctl stop rclonefs
46 |
47 | echo
48 | echo "${LYELLOW}Updating Rclone if possible${STD}"
49 | echo
50 |
51 | touch ${CONFIGVARS}/rcloneversion
52 | if [ $( cat ${CONFIGVARS}/rcloneversion ) = "Beta" ]; then
53 | curl https://rclone.org/install.sh | sudo bash -s beta
54 | else
55 | curl https://rclone.org/install.sh | sudo bash
56 | fi
57 |
58 | echo
59 | echo "${LYELLOW}Cleaning mount leftovers${STD}"
60 | echo
61 |
62 | # Are mounts truly down?
63 |
64 | mountpoint ${RCLONEMOUNT} > /dev/null
65 | CODE=${?}
66 | mountpoint ${MEDIA} > /dev/null
67 | CODE=$[${CODE}+${?}]
68 |
69 | while [ ${CODE} -lt 2 ]
70 | do
71 | echo Waiting on mounts to drop...
72 | sleep 5
73 | mountpoint ${RCLONEMOUNT} > /dev/null
74 | CODE=${?}
75 | mountpoint ${MEDIA} > /dev/null
76 | CODE=$[${CODE}+${?}]
77 | done
78 |
79 | sudo rmdir ${RCLONEMOUNT} > /dev/null 2>&1
80 | sudo rmdir ${MEDIA} > /dev/null 2>&1
81 | echo -n > ${LOGS}/rclone.log
82 |
83 | sudo chown -R ${USER}:${USER} /mnt
84 |
85 | echo
86 | echo "${LYELLOW}Calling on Upgrade Service${STD}"
87 | echo
88 |
89 | source /opt/Gooby/scripts/cron/upgradeservice.sh
90 |
91 | # Start Rclone and MergerFS
92 |
93 | source /opt/Gooby/install/misc/environment-build.sh rebuild
94 |
95 | sudo systemctl start rclonefs
96 | sleep 10
97 | sudo systemctl start mergerfs
98 |
99 | # Are mounts truly up?
100 |
101 | mountpoint ${RCLONEMOUNT} > /dev/null
102 | CODE=${?}
103 | mountpoint ${MEDIA} > /dev/null
104 | CODE=$[${CODE}+${?}]
105 |
106 | while [ ${CODE} -ne 0 ]
107 | do
108 | echo Waiting on mounts to be created...
109 | sleep 5
110 | mountpoint ${RCLONEMOUNT} > /dev/null
111 | CODE=${?}
112 | mountpoint ${MEDIA} > /dev/null
113 | CODE=$[${CODE}+${?}]
114 | done
115 |
116 | echo
117 | echo "${LYELLOW}Updating and starting containers${STD}"
118 | echo
119 |
120 | /usr/local/bin/docker-compose pull
121 | /usr/local/bin/docker-compose up --remove-orphans --build -d
122 |
123 | echo
124 | echo "${LYELLOW}Cleaning Docker leftovers${STD}"
125 | echo
126 |
127 | docker system prune -a -f --volumes
128 |
129 | cd ${CURDIR}
130 |
131 | echo
132 | echo "${LYELLOW}Patching server${STD}"
133 | echo
134 |
135 | sudo apt-get update
136 | sudo apt-get upgrade -y
137 | sudo apt-get dist-upgrade -y
138 | sudo apt autoremove -y
139 | sudo apt autoclean
140 | sudo apt-get autoremove
141 |
142 | echo
143 | echo "${GREEN}$(date) - Done! Your system should be back online${STD}"
144 | echo
145 |
146 | echo "${LYELLOW}Restoring permissions... this could take a few minutes${STD}"
147 | echo
148 |
149 | sudo chown -R ${USER}:${USER} ${CONFIGS}/Docker /tmp
150 |
--------------------------------------------------------------------------------
/scripts/cron/syncmount.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | if pidof -o %PPID -x "$(basename $0)"; then
3 | echo Already running!
4 | exit 1
5 | fi
6 |
7 | source /opt/Gooby/menus/variables.sh
8 | source ${CONFIGS}/Docker/.env
9 |
10 | # Are mounts truly up?
11 | mountpoint ${RCLONEMOUNT} > /dev/null
12 | CODE=${?}
13 | mountpoint ${MEDIA} > /dev/null
14 | CODE=$[${CODE}+${?}]
15 |
16 | if [ ${CODE} -ne 0 ]
17 | then
18 | # Not every mount is up. Don't continue.
19 | echo Not everything mounted. Exiting.
20 | exit 1
21 | fi
22 |
23 | # Check to see if anything needs to be cached locally. Doing this before the sync allows new files to be copied locally first.
24 |
25 | [ -f ${HOME}/bin/localcache ] && ${HOME}/bin/localcache
26 |
27 | # Load existing variables and use them as defaults, if available
28 |
29 | AGE=2 # How many minutes old a file must be before copying/deleting
30 | LOG=${LOGS}/mounter-sync.log
31 | TEMPFILE="/tmp/filesmissing"
32 |
33 | echo Starting sync at $(date) | tee -a ${LOG}
34 |
35 | # Fix dates in the future
36 |
37 | find ${UPLOADS}/ ! -path "*Downloads*" ! -iname "*.partial~" -type f -mmin -0 -exec touch "{}" -d "$(date -d "-5 minutes")" \;
38 |
39 | # Identify files needing to be copied
40 |
41 | find ${UPLOADS}/ ! -path "*Downloads*" ! -iname "*.partial~" -type f -mmin +${AGE} | sed 's|'${UPLOADS}'||' | sort > ${TEMPFILE}
42 |
43 | # Copy files
44 |
45 | if [[ -s ${TEMPFILE} ]]
46 | then
47 | while IFS= read -r FILE
48 | do
49 | rclone rc core/stats --user ${RCLONEUSERNAME} --pass ${RCLONEPASSWORD} | jq '.transferring' | grep "${UPLOADS}${FILE}" > /dev/null
50 | RUNCHECK=${?}
51 | if [[ ${RUNCHECK} -gt 0 ]]; then
52 | BYTES=$(du "${UPLOADS}${FILE}" | cut -f1)
53 | BYTESH=$(du -h "${UPLOADS}${FILE}" | cut -f1)
54 | echo $(date '+%F %H:%M:%S'),START,1,${BYTES} "# ${FILE}" >> ${APILOG}
55 | echo Queuing ${FILE} of size ${BYTESH}
56 | ## Fix for Rclone RC creating multiple directories
57 | TESTDIR="${RCLONEMOUNT}$(dirname "${FILE}")"
58 | if [[ ! -d "${TESTDIR}" ]]; then
59 | mkdir -p "${TESTDIR}"
60 | fi
61 | rclone rc operations/movefile _async=true srcFs=Local: srcRemote="${UPLOADS}${FILE}" dstFs=${RCLONESERVICE}:${RCLONEFOLDER} dstRemote="${FILE}" --user ${RCLONEUSERNAME} --pass ${RCLONEPASSWORD} > /dev/null
62 | # echo "Sleeping 1 second - temp fix for duplicate folders" ; sleep 1
63 | else
64 | echo Skipping ${FILE}: Already in queue
65 | fi
66 | done < ${TEMPFILE}
67 | else
68 | echo Nothing to copy | tee -a ${LOG}
69 | fi
70 |
71 | # Cleanup letovers
72 |
73 | rm ${TEMPFILE}
74 | cd ${UPLOADS}
75 | find . ! -path "*Downloads*" -type d -empty -delete
76 | echo Finished at $(date) | tee -a ${LOG}
77 | echo --------------------------------------------------- | tee -a ${LOG}
78 |
--------------------------------------------------------------------------------
/scripts/cron/upgradeservice.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | VERSION=2.3.0
4 |
5 | CONFIGVARS=${CONFIGS}/Docker/.config
6 | sudo mkdir -p ${CONFIGVARS}
7 | sudo chown -R ${USER}:${USER} ${CONFIGS}/Docker
8 | touch ${CONFIGVARS}/version
9 |
10 | if [ "$(cat ${CONFIGVARS}/version)" == ${VERSION} ]; then
11 |
12 | echo "${GREEN}Your system is on v${VERSION} (final version)${STD}"; echo
13 |
14 | else
15 |
16 | echo "${LYELLOW}Upgrading to v${VERSION}... just a moment${STD}"; echo; sleep 2
17 |
18 | # Pull latest Docker Compose
19 |
20 | COMPOSE_VERSION=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep 'tag_name' | cut -d\" -f4)
21 | sudo sh -c "curl -L https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose"
22 | sudo chmod +x /usr/local/bin/docker-compose
23 |
24 | # Finalizing upgrade
25 |
26 | echo; echo "${GREEN}Upgrade to v${VERSION} complete... proceeding${STD}"; echo
27 |
28 | fi
29 |
30 | echo ${VERSION} > ${CONFIGVARS}/version
31 |
--------------------------------------------------------------------------------
/scripts/nginx/00---Core:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/nginx/01-header.yaml:
--------------------------------------------------------------------------------
1 | version: "3.9"
2 | #
3 | # Gooby - Based on Kelinger's OmniStream
4 | #
5 | services:
6 |
--------------------------------------------------------------------------------
/scripts/nginx/02-oauth.yaml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/nginx/03-proxy.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Main NGINX web proxy service
3 | #
4 | nginx-proxy:
5 | restart: always
6 | image: jwilder/nginx-proxy:alpine
7 | container_name: nginx-proxy
8 | hostname: nginx-proxy
9 | ports:
10 | - 80:80
11 | - 443:443
12 | volumes:
13 | - ${CONFIGS}/Docker/nginx/vhost.d:/etc/nginx/vhost.d
14 | - /usr/share/nginx/html
15 | - /var/run/docker.sock:/tmp/docker.sock:ro
16 | - ${CONFIGS}/Docker/certs:/etc/nginx/certs
17 | - ${CONFIGS}/Docker/security:/etc/nginx/htpasswd
18 | healthcheck:
19 | test: ["CMD-SHELL", "netstat -ntlp | grep :80"]
20 | interval: 10s
21 | timeout: 2s
22 | retries: 3
23 | #
24 | # Certificate handling
25 | #
26 | letsencrypt-nginx-proxy-companion:
27 | restart: always
28 | image: jrcs/letsencrypt-nginx-proxy-companion
29 | container_name: letsencrypt
30 | hostname: letsencrypt
31 | environment:
32 | - ACME_CA_URI=https://acme-v02.api.letsencrypt.org/directory
33 | volumes:
34 | - /var/run/docker.sock:/var/run/docker.sock:ro
35 | - ${CONFIGS}/Docker/acme.sh:/etc/acme.sh
36 | volumes_from:
37 | - nginx-proxy
38 | healthcheck:
39 | test: ["CMD-SHELL", "pidof letsencrypt_service"]
40 | interval: 10s
41 | timeout: 2s
42 | retries: 3
43 |
--------------------------------------------------------------------------------
/scripts/nginx/04-watchtower.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Watchtower - Cloud Monitoring Service
3 | #
4 | watchtower:
5 | restart: unless-stopped
6 | image: containrrr/watchtower
7 | container_name: watchtower
8 | hostname: watchtower
9 | domainname: ${MYDOMAIN}
10 | volumes:
11 | - /var/run/docker.sock:/var/run/docker.sock
12 | environment:
13 | - "WATCHTOWER_SCHEDULE=0 0 1 * * *"
14 |
--------------------------------------------------------------------------------
/scripts/nginx/05-autoheal.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Autoheal - Repair corrupt containers automatically
3 | #
4 | autoheal:
5 | restart: unless-stopped
6 | image: willfarrell/autoheal
7 | container_name: autoheal
8 | hostname: autoheal
9 | domainname: ${MYDOMAIN}
10 | volumes:
11 | - /var/run/docker.sock:/var/run/docker.sock
12 | environment:
13 | - AUTOHEAL_CONTAINER_LABEL=all
14 |
--------------------------------------------------------------------------------
/scripts/nginx/10---Organizers:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/nginx/11-organizr.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Organizr - Default web site
3 | #
4 | Organizr:
5 | restart: always
6 | image: organizr/organizr:latest
7 | container_name: organizr
8 | hostname: menu
9 | depends_on:
10 | nginx-proxy:
11 | condition: service_healthy
12 | letsencrypt-nginx-proxy-companion:
13 | condition: service_started
14 | volumes:
15 | - ${CONFIGS}/Organizr:/config
16 | environment:
17 | - PUID=${USERID}
18 | - PGID=${GROUPID}
19 | - VIRTUAL_HOST=menu.${MYDOMAIN}
20 | - VIRTUAL_PORT=80
21 | - VIRTUAL_NETWORK=nginx-proxy
22 | - TZ=${TIMEZONE}
23 | - LETSENCRYPT_HOST=menu.${MYDOMAIN}
24 | - LETSENCRYPT_EMAIL=${MYEMAIL}
25 | healthcheck:
26 | test: ["CMD-SHELL", "netstat -ntlp | grep :80"]
27 | interval: 10s
28 | timeout: 2s
29 | retries: 3
30 |
--------------------------------------------------------------------------------
/scripts/nginx/12-ombi.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Ombi - Content request and user management
3 | #
4 | ombi:
5 | restart: unless-stopped
6 | image: linuxserver/ombi
7 | container_name: ombi
8 | hostname: ombi
9 | cpu_shares: 1024
10 | volumes:
11 | - /etc/localtime:/etc/localtime:ro
12 | - /bin/netstat:/bin/netstat
13 | - ${CONFIGS}/Ombi:/config
14 | - ${MEDIA}:/Media
15 | environment:
16 | - PUID=${USERID}
17 | - PGID=${GROUPID}
18 | - TZ=${TIMEZONE}
19 | - UMASK_SET=022
20 | - VIRTUAL_HOST=ombi.${MYDOMAIN}
21 | - VIRTUAL_PORT=3579
22 | - VIRTUAL_NETWORK=nginx-proxy
23 | - LETSENCRYPT_HOST=ombi.${MYDOMAIN}
24 | - LETSENCRYPT_EMAIL=${MYEMAIL}
25 | healthcheck:
26 | test: ["CMD-SHELL", "netstat -ntlp | grep :3579"]
27 | interval: 10s
28 | timeout: 2s
29 | retries: 3
30 |
--------------------------------------------------------------------------------
/scripts/nginx/13-monitorr.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Monitorr - webfront to live display the status of any webapp or service
3 | #
4 | monitorr:
5 | restart: unless-stopped
6 | image: monitorr/monitorr
7 | container_name: monitorr
8 | hostname: monitorr
9 | cpu_shares: 1024
10 | depends_on:
11 | nginx-proxy:
12 | condition: service_healthy
13 | letsencrypt-nginx-proxy-companion:
14 | condition: service_started
15 | volumes:
16 | - /etc/localtime:/etc/localtime:ro
17 | - ${CONFIGS}/Monitorr:/app
18 | environment:
19 | - PUID=${USERID}
20 | - PGID=${GROUPID}
21 | - TZ=${TIMEZONE}
22 | - VIRTUAL_HOST=monitorr.${MYDOMAIN}
23 | - VIRTUAL_PORT=80
24 | - VIRTUAL_NETWORK=nginx-proxy
25 | - LETSENCRYPT_HOST=monitorr.${MYDOMAIN}
26 | - LETSENCRYPT_EMAIL=${MYEMAIL}
27 | healthcheck:
28 | test: ["CMD-SHELL", "netstat -ntlp | grep :80"]
29 | interval: 10s
30 | timeout: 2s
31 | retries: 3
32 |
--------------------------------------------------------------------------------
/scripts/nginx/14-portainer.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Portainer - manages the Docker environment
3 | #
4 | portainer:
5 | restart: always
6 | image: portainer/portainer-ce
7 | container_name: portainer
8 | hostname: portainer
9 | cpu_shares: 1024
10 | depends_on:
11 | nginx-proxy:
12 | condition: service_healthy
13 | letsencrypt-nginx-proxy-companion:
14 | condition: service_started
15 | volumes:
16 | - /etc/localtime:/etc/localtime:ro
17 | - /var/run/docker.sock:/var/run/docker.sock
18 | - ${CONFIGS}/Portainer:/data
19 | environment:
20 | - VIRTUAL_HOST=portainer.${MYDOMAIN}
21 | - VIRTUAL_NETWORK=nginx-proxy
22 | - VIRTUAL_PORT=9000
23 | - LETSENCRYPT_HOST=portainer.${MYDOMAIN}
24 | - LETSENCRYPT_EMAIL=${MYEMAIL}
25 |
--------------------------------------------------------------------------------
/scripts/nginx/20---Streamers:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/nginx/21-plex-beta.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Plex - Media streaming server beta
3 | #
4 | plex:
5 | restart: unless-stopped
6 | image: plexinc/pms-docker:beta
7 | container_name: plex
8 | hostname: plex
9 | cpu_shares: 8192
10 | ports:
11 | - 8443:32400
12 | volumes:
13 | - /etc/localtime:/etc/localtime:ro
14 | - ${CONFIGS}/Plex:/config
15 | - /tmp:/transcode
16 | - /bin/netstat:/bin/netstat:ro
17 | - ${MEDIA}:/Media
18 | environment:
19 | - ADVERTISE_IP=https://plex.${MYDOMAIN}
20 | - PUID=${USERID}
21 | - PGID=${GROUPID}
22 | - PLEX_CLAIM=${PLEXCLAIM}
23 | - TZ=${TIMEZONE}
24 | - VIRTUAL_HOST=plex.${MYDOMAIN}
25 | - VIRTUAL_PORT=32400
26 | - VIRTUAL_PROTO=https
27 | - VIRTUAL_NETWORK=nginx-proxy
28 | - LETSENCRYPT_HOST=plex.${MYDOMAIN}
29 | - LETSENCRYPT_EMAIL=${MYEMAIL}
30 | healthcheck:
31 | test: ["CMD-SHELL", "netstat -ntlp | grep :32400 && mountpoint /Media"]
32 | interval: 10s
33 | timeout: 2s
34 | retries: 3
35 |
--------------------------------------------------------------------------------
/scripts/nginx/21-plex-hw.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Plex - Media streaming server with Intel hardware GPU
3 | #
4 | plex:
5 | privileged: true
6 | restart: unless-stopped
7 | image: plexinc/pms-docker
8 | container_name: plex
9 | hostname: plex
10 | cpu_shares: 8192
11 | ports:
12 | - 8443:32400
13 | volumes:
14 | - /etc/localtime:/etc/localtime:ro
15 | - ${CONFIGS}/Plex:/config
16 | - /tmp:/transcode
17 | - /bin/netstat:/bin/netstat:ro
18 | - ${MEDIA}:/Media
19 | environment:
20 | - ADVERTISE_IP=https://plex.${MYDOMAIN}
21 | - PUID=${USERID}
22 | - PGID=${GROUPID}
23 | - PLEX_CLAIM=${PLEXCLAIM}
24 | - TZ=${TIMEZONE}
25 | - VIRTUAL_HOST=plex.${MYDOMAIN}
26 | - VIRTUAL_PORT=32400
27 | - VIRTUAL_PROTO=https
28 | - VIRTUAL_NETWORK=nginx-proxy
29 | - LETSENCRYPT_HOST=plex.${MYDOMAIN}
30 | - LETSENCRYPT_EMAIL=${MYEMAIL}
31 | devices:
32 | - /dev/dri:/dev/dri
33 | healthcheck:
34 | test: ["CMD-SHELL", "netstat -ntlp | grep :32400 && mountpoint /Media"]
35 | interval: 10s
36 | timeout: 2s
37 | retries: 3
38 |
--------------------------------------------------------------------------------
/scripts/nginx/21-plex.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Plex - Media streaming server
3 | #
4 | plex:
5 | restart: unless-stopped
6 | image: plexinc/pms-docker
7 | container_name: plex
8 | hostname: plex
9 | cpu_shares: 8192
10 | ports:
11 | - 8443:32400
12 | volumes:
13 | - /etc/localtime:/etc/localtime:ro
14 | - ${CONFIGS}/Plex:/config
15 | - /tmp:/transcode
16 | - /bin/netstat:/bin/netstat:ro
17 | - ${MEDIA}:/Media
18 | environment:
19 | - ADVERTISE_IP=https://plex.${MYDOMAIN}
20 | - PUID=${USERID}
21 | - PGID=${GROUPID}
22 | - PLEX_CLAIM=${PLEXCLAIM}
23 | - TZ=${TIMEZONE}
24 | - VIRTUAL_HOST=plex.${MYDOMAIN}
25 | - VIRTUAL_PORT=32400
26 | - VIRTUAL_PROTO=https
27 | - VIRTUAL_NETWORK=nginx-proxy
28 | - LETSENCRYPT_HOST=plex.${MYDOMAIN}
29 | - LETSENCRYPT_EMAIL=${MYEMAIL}
30 | healthcheck:
31 | test: ["CMD-SHELL", "netstat -ntlp | grep :32400 && mountpoint /Media"]
32 | interval: 10s
33 | timeout: 2s
34 | retries: 3
35 |
--------------------------------------------------------------------------------
/scripts/nginx/22-emby-beta.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Emby - Media streaming server beta version
3 | #
4 | emby:
5 | restart: unless-stopped
6 | image: emby/embyserver:beta
7 | container_name: emby
8 | hostname: emby
9 | cpu_shares: 8192
10 | environment:
11 | - UID=${USERID}
12 | - GID=${GROUPID}
13 | - GIDLIST=${GPUGIDS}
14 | - TZ=${TIMEZONE}
15 | - VIRTUAL_HOST=emby.${MYDOMAIN}
16 | - VIRTUAL_PORT=8096
17 | - VIRTUAL_PROTO=http
18 | - VIRTUAL_NETWORK=nginx-proxy
19 | - LETSENCRYPT_HOST=emby.${MYDOMAIN}
20 | - LETSENCRYPT_EMAIL=${MYEMAIL}
21 | volumes:
22 | - ${CONFIGS}/Emby:/config
23 | - ${MEDIA}:/Media
24 | - /etc/localtime:/etc/localtime:ro
25 | - /tmp:/transcode
26 | # devices:
27 | # - /dev/dri:/dev/dri
28 | healthcheck:
29 | test: ["CMD-SHELL", "netstat -ntlp | grep :8096"]
30 | interval: 10s
31 | timeout: 2s
32 | retries: 3
33 | blkio_config:
34 | weight: 600
35 | #device_read_bps:
36 | #- path: /dev/md1
37 | #rate: '200mb'
38 | #device_write_bps:
39 | #- path: /dev/md1
40 | #rate: '200mb'
41 |
--------------------------------------------------------------------------------
/scripts/nginx/22-emby-hw.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Emby - Media streaming server with Intel hardware GPU
3 | #
4 | emby:
5 | restart: unless-stopped
6 | image: emby/embyserver:latest
7 | container_name: emby
8 | hostname: emby
9 | cpu_shares: 8192
10 | environment:
11 | - UID=${USERID}
12 | - GID=${GROUPID}
13 | - GIDLIST=${GPUGIDS}
14 | - TZ=${TIMEZONE}
15 | - VIRTUAL_HOST=emby.${MYDOMAIN}
16 | - VIRTUAL_PORT=8096
17 | - VIRTUAL_PROTO=http
18 | - VIRTUAL_NETWORK=nginx-proxy
19 | - LETSENCRYPT_HOST=emby.${MYDOMAIN}
20 | - LETSENCRYPT_EMAIL=${MYEMAIL}
21 | volumes:
22 | - ${CONFIGS}/Emby:/config
23 | - ${MEDIA}:/Media
24 | - /etc/localtime:/etc/localtime:ro
25 | - /tmp:/transcode
26 | devices:
27 | - /dev/dri:/dev/dri
28 | healthcheck:
29 | test: ["CMD-SHELL", "netstat -ntlp | grep :8096"]
30 | interval: 10s
31 | timeout: 2s
32 | retries: 3
33 | blkio_config:
34 | weight: 600
35 | #device_read_bps:
36 | #- path: /dev/md1
37 | #rate: '200mb'
38 | #device_write_bps:
39 | #- path: /dev/md1
40 | #rate: '200mb'
41 |
--------------------------------------------------------------------------------
/scripts/nginx/22-emby.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Emby - Media streaming server
3 | #
4 | emby:
5 | restart: unless-stopped
6 | image: emby/embyserver:latest
7 | container_name: emby
8 | hostname: emby
9 | cpu_shares: 8192
10 | environment:
11 | - UID=${USERID}
12 | - GID=${GROUPID}
13 | - GIDLIST=${GPUGIDS}
14 | - TZ=${TIMEZONE}
15 | - VIRTUAL_HOST=emby.${MYDOMAIN}
16 | - VIRTUAL_PORT=8096
17 | - VIRTUAL_PROTO=http
18 | - VIRTUAL_NETWORK=nginx-proxy
19 | - LETSENCRYPT_HOST=emby.${MYDOMAIN}
20 | - LETSENCRYPT_EMAIL=${MYEMAIL}
21 | volumes:
22 | - ${CONFIGS}/Emby:/config
23 | - ${MEDIA}:/Media
24 | - /etc/localtime:/etc/localtime:ro
25 | - /tmp:/transcode
26 | # devices:
27 | # - /dev/dri:/dev/dri
28 | healthcheck:
29 | test: ["CMD-SHELL", "netstat -ntlp | grep :8096"]
30 | interval: 10s
31 | timeout: 2s
32 | retries: 3
33 | blkio_config:
34 | weight: 600
35 | #device_read_bps:
36 | #- path: /dev/md1
37 | #rate: '200mb'
38 | #device_write_bps:
39 | #- path: /dev/md1
40 | #rate: '200mb'
41 |
--------------------------------------------------------------------------------
/scripts/nginx/23-jellyfin-beta.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Jellyfin - The Free Software Media System beta version
3 | #
4 | jellyfin:
5 | restart: unless-stopped
6 | image: jellyfin/jellyfin:unstable
7 | container_name: jellyfin
8 | hostname: jellyfin
9 | cpu_shares: 8192
10 | volumes:
11 | - ${CONFIGS}/Jellyfin:/config
12 | - ${MEDIA}:/Media
13 | - /tmp:/cache
14 | environment:
15 | - UID=${USERID}
16 | - GID=${GROUPID}
17 | - GIDLIST=${GPUGIDS}
18 | - TZ=${TIMEZONE}
19 | - VIRTUAL_HOST=jellyfin.${MYDOMAIN}
20 | - VIRTUAL_PORT=8096
21 | - VIRTUAL_PROTO=http
22 | - VIRTUAL_NETWORK=nginx-proxy
23 | - LETSENCRYPT_HOST=jellyfin.${MYDOMAIN}
24 | - LETSENCRYPT_EMAIL=${MYEMAIL}
25 | # devices:
26 | # - /dev/dri:/dev/dri
27 |
--------------------------------------------------------------------------------
/scripts/nginx/23-jellyfin.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Jellyfin - The Free Software Media System
3 | #
4 | jellyfin:
5 | restart: unless-stopped
6 | image: jellyfin/jellyfin:latest
7 | container_name: jellyfin
8 | hostname: jellyfin
9 | cpu_shares: 8192
10 | volumes:
11 | - ${CONFIGS}/Jellyfin:/config
12 | - ${MEDIA}:/Media
13 | - /tmp:/cache
14 | environment:
15 | - UID=${USERID}
16 | - GID=${GROUPID}
17 | - GIDLIST=${GPUGIDS}
18 | - TZ=${TIMEZONE}
19 | - VIRTUAL_HOST=jellyfin.${MYDOMAIN}
20 | - VIRTUAL_PORT=8096
21 | - VIRTUAL_PROTO=http
22 | - VIRTUAL_NETWORK=nginx-proxy
23 | - LETSENCRYPT_HOST=jellyfin.${MYDOMAIN}
24 | - LETSENCRYPT_EMAIL=${MYEMAIL}
25 | # devices:
26 | # - /dev/dri:/dev/dri
27 |
--------------------------------------------------------------------------------
/scripts/nginx/25-tautulli.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Tautulli - Reports on Plex stats
3 | #
4 | tautulli:
5 | restart: unless-stopped
6 | image: linuxserver/tautulli:latest
7 | container_name: tautulli
8 | hostname: tautulli
9 | cpu_shares: 1024
10 | depends_on:
11 | nginx-proxy:
12 | condition: service_healthy
13 | letsencrypt-nginx-proxy-companion:
14 | condition: service_started
15 | volumes:
16 | - /etc/localtime:/etc/localtime:ro
17 | - ${CONFIGS}/Tautulli:/config
18 | - ${CONFIGS}/Plex/Library/Application Support/Plex Media Server/Logs:/logs:ro
19 | environment:
20 | - PUID=${USERID}
21 | - PGID=${GROUPID}
22 | - TZ=${TIMEZONE}
23 | - VIRTUAL_HOST=tautulli.${MYDOMAIN}
24 | - VIRTUAL_PORT=8181
25 | - VIRTUAL_NETWORK=nginx-proxy
26 | - LETSENCRYPT_HOST=tautulli.${MYDOMAIN}
27 | - LETSENCRYPT_EMAIL=${MYEMAIL}
28 | healthcheck:
29 | test: ["CMD-SHELL", "netstat -ntlp | grep :8181"]
30 | interval: 10s
31 | timeout: 2s
32 | retries: 3
33 |
--------------------------------------------------------------------------------
/scripts/nginx/26-embystat.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # EmbyStat - Reports on Emby stats
3 | #
4 | embystat:
5 | restart: unless-stopped
6 | image: linuxserver/embystat
7 | container_name: embystat
8 | hostname: embystat
9 | cpu_shares: 1024
10 | depends_on:
11 | nginx-proxy:
12 | condition: service_healthy
13 | letsencrypt-nginx-proxy-companion:
14 | condition: service_started
15 | volumes:
16 | - /etc/localtime:/etc/localtime:ro
17 | - /bin/netstat:/bin/netstat:ro
18 | - ${CONFIGS}/EmbyStat:/config
19 | environment:
20 | - PUID=${USERID}
21 | - PGID=${GROUPID}
22 | - TZ=${TIMEZONE}
23 | - UMASK_SET=022
24 | - VIRTUAL_HOST=embystat.${MYDOMAIN}
25 | - VIRTUAL_PORT=6555
26 | - VIRTUAL_NETWORK=nginx-proxy
27 | - LETSENCRYPT_HOST=embystat.${MYDOMAIN}
28 | - LETSENCRYPT_EMAIL=${MYEMAIL}
29 | healthcheck:
30 | test: ["CMD-SHELL", "netstat -ntlp | grep :6555"]
31 | interval: 10s
32 | timeout: 2s
33 | retries: 3
34 |
--------------------------------------------------------------------------------
/scripts/nginx/30---Usenet:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/nginx/31-nzbget.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # NZBget - Usenet Downloader
3 | #
4 | nzbget:
5 | restart: unless-stopped
6 | image: linuxserver/nzbget
7 | container_name: nzbget
8 | hostname: nzbget
9 | cpu_shares: 2048
10 | depends_on:
11 | nginx-proxy:
12 | condition: service_healthy
13 | letsencrypt-nginx-proxy-companion:
14 | condition: service_started
15 | volumes:
16 | - ${CONFIGS}/NZBget:/config
17 | - ${DOWNLOADS}:/Downloads
18 | - ${HOME}/logs:/logs
19 | environment:
20 | - PGID=${GROUPID}
21 | - PUID=${USERID}
22 | - VIRTUAL_HOST=nzbget.${MYDOMAIN}
23 | - VIRTUAL_PORT=6789
24 | - VIRTUAL_NETWORK=nginx-proxy
25 | - LETSENCRYPT_HOST=nzbget.${MYDOMAIN}
26 | - LETSENCRYPT_EMAIL=${MYEMAIL}
27 | healthcheck:
28 | test: ["CMD-SHELL", "netstat -ntlp | grep :6789"]
29 | interval: 10s
30 | timeout: 2s
31 | retries: 3
32 | blkio_config:
33 | weight: 150
34 | #device_read_bps:
35 | #- path: /dev/md1
36 | #rate: '50mb'
37 | #device_write_bps:
38 | #- path: /dev/md1
39 | #rate: '50mb'
40 |
--------------------------------------------------------------------------------
/scripts/nginx/32-sabnzbd.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # SABnzbd - Usenet Downloader
3 | #
4 | sabnzbd:
5 | restart: unless-stopped
6 | image: linuxserver/sabnzbd
7 | container_name: sabnzbd
8 | hostname: sabnzbd
9 | cpu_shares: 2048
10 | depends_on:
11 | nginx-proxy:
12 | condition: service_healthy
13 | letsencrypt-nginx-proxy-companion:
14 | condition: service_started
15 | volumes:
16 | - ${CONFIGS}/SABnzbd:/config
17 | - ${DOWNLOADS}:/Downloads
18 | - ${MEDIA}:/Media
19 | - ${LOGS}:/logs
20 | - /bin/netstat:/bin/netstat:ro
21 | environment:
22 | - PGID=${GROUPID}
23 | - PUID=${USERID}
24 | - TZ=${TIMEZONE}
25 | - VIRTUAL_HOST=sabnzbd.${MYDOMAIN}
26 | - VIRTUAL_PORT=8080
27 | - VIRTUAL_NETWORK=nginx-proxy
28 | - LETSENCRYPT_HOST=sabnzbd.${MYDOMAIN}
29 | - LETSENCRYPT_EMAIL=${MYEMAIL}
30 | healthcheck:
31 | test: ["CMD-SHELL", "netstat -ntlp | grep :8080"]
32 | interval: 10s
33 | timeout: 2s
34 | retries: 3
35 | blkio_config:
36 | weight: 150
37 | #device_read_bps:
38 | #- path: /dev/md1
39 | #rate: '50mb'
40 | #device_write_bps:
41 | #- path: /dev/md1
42 | #rate: '50mb'
43 |
--------------------------------------------------------------------------------
/scripts/nginx/40---Torrent:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/nginx/41-deluge.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Deluge - Torrent download engine
3 | #
4 | deluge:
5 | restart: unless-stopped
6 | image: lscr.io/linuxserver/deluge
7 | container_name: deluge
8 | hostname: deluge
9 | cpu_shares: 1024
10 | ports:
11 | - 55955:55955/tcp
12 | - 55955:55955/udp
13 | - 58846:58846/tcp
14 | volumes:
15 | - /etc/localtime:/etc/localtime:ro
16 | - ${CONFIGS}/Deluge:/config
17 | - ${DOWNLOADS}:/Downloads
18 | - ${MEDIA}:/Media
19 | environment:
20 | - PUID=${USERID}
21 | - PGID=${GROUPID}
22 | - TZ=${TIMEZONE}
23 | - UMASK=022
24 | - VIRTUAL_HOST=deluge.${MYDOMAIN}
25 | - VIRTUAL_PORT=8112
26 | - VIRTUAL_NETWORK=nginx-proxy
27 | - LETSENCRYPT_HOST=deluge.${MYDOMAIN}
28 | - LETSENCRYPT_EMAIL=${MYEMAIL}
29 |
--------------------------------------------------------------------------------
/scripts/nginx/45-rtorrent.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # rTorrent - Torrent download engine
3 | #
4 | rtorrent:
5 | restart: unless-stopped
6 | image: linuxserver/rutorrent
7 | container_name: rtorrent
8 | hostname: rtorrent
9 | cpu_shares: 1024
10 | ports:
11 | - 51413:51413
12 | - 6881:6881/udp
13 | - 5000:5000
14 | volumes:
15 | - /etc/localtime:/etc/localtime:ro
16 | - ${CONFIGS}/rTorrent:/config
17 | - ${DOWNLOADS}/rtorrent:/Downloads
18 | - ${MEDIA}:/Media
19 | environment:
20 | - PUID=${USERID}
21 | - PGID=${GROUPID}
22 | - TZ=${TIMEZONE}
23 | - UMASK_SET=022
24 | - VIRTUAL_HOST=rtorrent.${MYDOMAIN}
25 | - VIRTUAL_PORT=80
26 | - VIRTUAL_NETWORK=nginx-proxy
27 | - LETSENCRYPT_HOST=rtorrent.${MYDOMAIN}
28 | - LETSENCRYPT_EMAIL=${MYEMAIL}
29 | healthcheck:
30 | test: ["CMD-SHELL", "netstat -ntlp | grep :80"]
31 | interval: 10s
32 | timeout: 2s
33 | retries: 3
34 |
--------------------------------------------------------------------------------
/scripts/nginx/50---Catalog:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/nginx/51-radarr-beta.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Radarr Beta - Movie catalog and management
3 | #
4 | radarr:
5 | restart: unless-stopped
6 | image: linuxserver/radarr:nightly
7 | container_name: radarr
8 | hostname: radarr
9 | cpu_shares: 2048
10 | depends_on:
11 | nginx-proxy:
12 | condition: service_healthy
13 | letsencrypt-nginx-proxy-companion:
14 | condition: service_started
15 | #deluge:
16 | #condition: service_healthy
17 | volumes:
18 | - /etc/localtime:/etc/localtime:ro
19 | - ${CONFIGS}/Radarr:/config
20 | - ${HOME}/logs:/config/logs
21 | - ${MEDIA}:/Media
22 | - ${DOWNLOADS}:/Downloads
23 | environment:
24 | - PGID=${GROUPID}
25 | - PUID=${USERID}
26 | - TZ=${TIMEZONE}
27 | - VIRTUAL_HOST=radarr.${MYDOMAIN}
28 | - VIRTUAL_PORT=7878
29 | - VIRTUAL_NETWORK=nginx-proxy
30 | - LETSENCRYPT_HOST=radarr.${MYDOMAIN}
31 | - LETSENCRYPT_EMAIL=${MYEMAIL}
32 | # healthcheck:
33 | # test: ["CMD-SHELL", "netstat -ntlp | grep :7878 && mountpoint /Media"]
34 | # interval: 10s
35 | # timeout: 2s
36 | # retries: 3
37 |
--------------------------------------------------------------------------------
/scripts/nginx/51-radarr.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Radarr - Movie catalog and management
3 | #
4 | radarr:
5 | restart: unless-stopped
6 | image: linuxserver/radarr:latest
7 | container_name: radarr
8 | hostname: radarr
9 | cpu_shares: 2048
10 | depends_on:
11 | nginx-proxy:
12 | condition: service_healthy
13 | letsencrypt-nginx-proxy-companion:
14 | condition: service_started
15 | #deluge:
16 | #condition: service_healthy
17 | volumes:
18 | - /etc/localtime:/etc/localtime:ro
19 | - ${CONFIGS}/Radarr:/config
20 | - ${HOME}/logs:/config/logs
21 | - ${MEDIA}:/Media
22 | - ${DOWNLOADS}:/Downloads
23 | environment:
24 | - PGID=${GROUPID}
25 | - PUID=${USERID}
26 | - TZ=${TIMEZONE}
27 | - VIRTUAL_HOST=radarr.${MYDOMAIN}
28 | - VIRTUAL_PORT=7878
29 | - VIRTUAL_NETWORK=nginx-proxy
30 | - LETSENCRYPT_HOST=radarr.${MYDOMAIN}
31 | - LETSENCRYPT_EMAIL=${MYEMAIL}
32 | # healthcheck:
33 | # test: ["CMD-SHELL", "netstat -ntlp | grep :7878 && mountpoint /Media"]
34 | # interval: 10s
35 | # timeout: 2s
36 | # retries: 3
37 |
--------------------------------------------------------------------------------
/scripts/nginx/52-sonarr.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Sonarr - TV Show catalog and management preview
3 | #
4 | sonarr:
5 | restart: unless-stopped
6 | image: linuxserver/sonarr:latest
7 | container_name: sonarr
8 | hostname: sonarr
9 | cpu_shares: 2048
10 | depends_on:
11 | nginx-proxy:
12 | condition: service_healthy
13 | letsencrypt-nginx-proxy-companion:
14 | condition: service_started
15 | #deluge:
16 | #condition: service_healthy
17 | volumes:
18 | - /etc/localtime:/etc/localtime:ro
19 | - ${CONFIGS}/Sonarr:/config
20 | - ${HOME}/logs:/config/logs
21 | - ${MEDIA}:/Media
22 | - ${DOWNLOADS}:/Downloads
23 | - /bin/netstat:/bin/netstat:ro
24 | environment:
25 | - PGID=${GROUPID}
26 | - PUID=${USERID}
27 | - TZ=${TIMEZONE}
28 | - VIRTUAL_HOST=sonarr.${MYDOMAIN}
29 | - VIRTUAL_PORT=8989
30 | - VIRTUAL_NETWORK=nginx-proxy
31 | - LETSENCRYPT_HOST=sonarr.${MYDOMAIN}
32 | - LETSENCRYPT_EMAIL=${MYEMAIL}
33 | healthcheck:
34 | test: ["CMD-SHELL", "netstat -ntlp | grep :8989 && mountpoint /Media"]
35 | interval: 10s
36 | timeout: 2s
37 | retries: 3
38 | blkio_config:
39 | weight: 150
40 | #device_read_bps:
41 | #- path: /dev/md1
42 | #rate: '50mb'
43 | #device_write_bps:
44 | #- path: /dev/md1
45 | #rate: '50mb'
46 |
--------------------------------------------------------------------------------
/scripts/nginx/53-lidarr.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Lidarr - Music catalog and management
3 | #
4 | lidarr:
5 | restart: unless-stopped
6 | image: linuxserver/lidarr
7 | container_name: lidarr
8 | hostname: lidarr
9 | cpu_shares: 2048
10 | depends_on:
11 | nginx-proxy:
12 | condition: service_healthy
13 | letsencrypt-nginx-proxy-companion:
14 | condition: service_started
15 | #deluge:
16 | #condition: service_healthy
17 | volumes:
18 | - /etc/localtime:/etc/localtime:ro
19 | - ${CONFIGS}/Lidarr:/config
20 | - ${HOME}/logs:/config/logs
21 | - ${MEDIA}:/Media
22 | - ${DOWNLOADS}:/Downloads
23 | - /bin/netstat:/bin/netstat:ro
24 | environment:
25 | - PGID=${GROUPID}
26 | - PUID=${USERID}
27 | - TZ=${TIMEZONE}
28 | - VIRTUAL_HOST=lidarr.${MYDOMAIN}
29 | - VIRTUAL_PORT=8686
30 | - VIRTUAL_NETWORK=nginx-proxy
31 | - LETSENCRYPT_HOST=lidarr.${MYDOMAIN}
32 | - LETSENCRYPT_EMAIL=${MYEMAIL}
33 | healthcheck:
34 | test: ["CMD-SHELL", "netstat -ntlp | grep :8686 && mountpoint /Media"]
35 | interval: 10s
36 | timeout: 2s
37 | retries: 3
38 | blkio_config:
39 | weight: 150
40 | #device_read_bps:
41 | #- path: /dev/md1
42 | #rate: '50mb'
43 | #device_write_bps:
44 | #- path: /dev/md1
45 | #rate: '50mb'
46 |
--------------------------------------------------------------------------------
/scripts/nginx/56-jackett.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Jackett - Download proxy server
3 | #
4 | jackett:
5 | restart: unless-stopped
6 | image: linuxserver/jackett
7 | container_name: jackett
8 | hostname: jackett
9 | cpu_shares: 1024
10 | volumes:
11 | - /etc/localtime:/etc/localtime:ro
12 | - ${CONFIGS}/Jackett:/config
13 | - ${MEDIA}:/Media
14 | - ${DOWNLOADS}:/Downloads
15 | environment:
16 | - PUID=${USERID}
17 | - PGID=${GROUPID}
18 | - TZ=${TIMEZONE}
19 | - UMASK_SET=022
20 | - VIRTUAL_HOST=jackett.${MYDOMAIN}
21 | - VIRTUAL_PORT=9117
22 | - VIRTUAL_NETWORK=nginx-proxy
23 | - LETSENCRYPT_HOST=jackett.${MYDOMAIN}
24 | - LETSENCRYPT_EMAIL=${MYEMAIL}
25 | healthcheck:
26 | test: ["CMD-SHELL", "netstat -ntlp | grep :9117"]
27 | interval: 10s
28 | timeout: 2s
29 | retries: 3
30 |
--------------------------------------------------------------------------------
/scripts/nginx/59-radarr4k-beta.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Radarr4K Beta - Movie catalog and management 4K version
3 | #
4 | radarr4k:
5 | restart: unless-stopped
6 | image: linuxserver/radarr:preview
7 | container_name: radarr4k
8 | hostname: radarr4k
9 | cpu_shares: 2048
10 | ports:
11 | - 7879:7878
12 | depends_on:
13 | nginx-proxy:
14 | condition: service_healthy
15 | letsencrypt-nginx-proxy-companion:
16 | condition: service_started
17 | #deluge:
18 | #condition: service_healthy
19 | volumes:
20 | - /etc/localtime:/etc/localtime:ro
21 | - ${CONFIGS}/Radarr4K:/config
22 | - ${HOME}/logs:/config/logs
23 | - ${MEDIA}:/Media
24 | - ${DOWNLOADS}:/Downloads
25 | environment:
26 | - PGID=${GROUPID}
27 | - PUID=${USERID}
28 | - TZ=${TIMEZONE}
29 | - VIRTUAL_HOST=radarr4k.${MYDOMAIN}
30 | # - VIRTUAL_PORT=7879
31 | - VIRTUAL_NETWORK=nginx-proxy
32 | - LETSENCRYPT_HOST=radarr4k.${MYDOMAIN}
33 | - LETSENCRYPT_EMAIL=${MYEMAIL}
34 | # healthcheck:
35 | # test: ["CMD-SHELL", "netstat -ntlp | grep :7878 && mountpoint /Media"]
36 | # interval: 10s
37 | # timeout: 2s
38 | # retries: 3
39 |
--------------------------------------------------------------------------------
/scripts/nginx/59-radarr4k.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Radarr4K - Movie catalog and management 4K version
3 | #
4 | radarr4k:
5 | restart: unless-stopped
6 | image: linuxserver/radarr:preview
7 | container_name: radarr4k
8 | hostname: radarr4k
9 | cpu_shares: 2048
10 | ports:
11 | - 7879:7878
12 | depends_on:
13 | nginx-proxy:
14 | condition: service_healthy
15 | letsencrypt-nginx-proxy-companion:
16 | condition: service_started
17 | #deluge:
18 | #condition: service_healthy
19 | volumes:
20 | - /etc/localtime:/etc/localtime:ro
21 | - ${CONFIGS}/Radarr4K:/config
22 | - ${HOME}/logs:/config/logs
23 | - ${MEDIA}:/Media
24 | - ${DOWNLOADS}:/Downloads
25 | environment:
26 | - PGID=${GROUPID}
27 | - PUID=${USERID}
28 | - TZ=${TIMEZONE}
29 | - VIRTUAL_HOST=radarr4k.${MYDOMAIN}
30 | # - VIRTUAL_PORT=7879
31 | - VIRTUAL_NETWORK=nginx-proxy
32 | - LETSENCRYPT_HOST=radarr4k.${MYDOMAIN}
33 | - LETSENCRYPT_EMAIL=${MYEMAIL}
34 | # healthcheck:
35 | # test: ["CMD-SHELL", "netstat -ntlp | grep :7878 && mountpoint /Media"]
36 | # interval: 10s
37 | # timeout: 2s
38 | # retries: 3
39 |
--------------------------------------------------------------------------------
/scripts/nginx/60---Utils:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/nginx/61-nextcloud.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # NextCloud - Self hosted cloud
3 | #
4 | nextcloud:
5 | restart: unless-stopped
6 | image: nextcloud:latest
7 | container_name: nextcloud
8 | hostname: nextcloud
9 | depends_on:
10 | nginx-proxy:
11 | condition: service_healthy
12 | letsencrypt-nginx-proxy-companion:
13 | condition: service_started
14 | mariadb:
15 | condition: service_started
16 | redis:
17 | condition: service_started
18 | volumes:
19 | - ${CONFIGS}/Nextcloud:/var/www/html
20 | - ${MEDIA}:/Media
21 | - /etc/localtime:/etc/localtime:ro
22 | - /bin/netstat:/bin/netstat:ro
23 | environment:
24 | - PGID=${GROUPID}
25 | - PUID=${USERID}
26 | - TZ=${TIMEZONE}
27 | - REDIS_HOST=redis
28 | - VIRTUAL_HOST=nextcloud.${MYDOMAIN}
29 | - VIRTUAL_PORT=80
30 | - VIRTUAL_NETWORK=nginx-proxy
31 | - LETSENCRYPT_HOST=nextcloud.${MYDOMAIN}
32 | - LETSENCRYPT_EMAIL=${MYEMAIL}
33 | healthcheck:
34 | test: ["CMD-SHELL", "netstat -ntlp | grep :80"]
35 | interval: 10s
36 | timeout: 2s
37 | retries: 3
38 |
--------------------------------------------------------------------------------
/scripts/nginx/62-netdata.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # NetData - System monitoring and graphs
3 | #
4 | netdata:
5 | restart: always
6 | image: netdata/netdata
7 | container_name: netdata
8 | hostname: netdata.${MYDOMAIN}
9 | cpu_shares: 1024
10 | depends_on:
11 | - letsencrypt-nginx-proxy-companion
12 | cap_add:
13 | - SYS_PTRACE
14 | security_opt:
15 | - apparmor:unconfined
16 | volumes:
17 | - /proc:/host/proc:ro
18 | - /sys:/host/sys:ro
19 | - /var/run/docker.sock:/var/run/docker.sock:rw
20 | - /etc/localtime:/etc/localtime:ro
21 | environment:
22 | - PGID=999
23 | - TZ=${TIMEZONE}
24 | - VIRTUAL_HOST=netdata.${MYDOMAIN}
25 | - VIRTUAL_PORT=19999
26 | - VIRTUAL_NETWORK=nginx-proxy
27 | - LETSENCRYPT_HOST=netdata.${MYDOMAIN}
28 | - LETSENCRYPT_EMAIL=${MYEMAIL}
29 | healthcheck:
30 | test: ["CMD-SHELL", "netstat -ntlp | grep :19999"]
31 | interval: 10s
32 | timeout: 2s
33 | retries: 3
34 |
--------------------------------------------------------------------------------
/scripts/nginx/63-speedtest.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Speed test server (web based) for testing server to client speeds
3 | #
4 | speedtest:
5 | restart: always
6 | image: openspeedtest/latest
7 | container_name: speedtest
8 | hostname: speedtest.${MYDOMAIN}
9 | depends_on:
10 | nginx-proxy:
11 | condition: service_healthy
12 | environment:
13 | - TZ=${TIMEZONE}
14 | - VIRTUAL_HOST=speedtest.${MYDOMAIN}
15 | - VIRTUAL_PORT=3000
16 | - VIRTUAL_NETWORK=nginx-proxy
17 | - LETSENCRYPT_HOST=speedtest.${MYDOMAIN}
18 | - LETSENCRYPT_EMAIL=${MYEMAIL}
19 | healthcheck:
20 | test: ["CMD-SHELL", "netstat -ntlp | grep :3000"]
21 | interval: 10s
22 | timeout: 2s
23 | retries: 3
24 |
--------------------------------------------------------------------------------
/scripts/nginx/70---Database:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/nginx/71-mysql.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # MySQL - MySQL database server
3 | #
4 | # Coming soon
5 |
--------------------------------------------------------------------------------
/scripts/nginx/72-mariadb.yaml:
--------------------------------------------------------------------------------
1 |
2 | #
3 | # MariaDB - MariaDB database server
4 | #
5 | mariadb:
6 | restart: unless-stopped
7 | image: linuxserver/mariadb
8 | container_name: mariadb
9 | hostname: mariadb
10 | volumes:
11 | - ${CONFIGS}/MariaDB:/config
12 | - /etc/localtime:/etc/localtime:ro
13 | - /bin/netstat:/bin/netstat:ro
14 | environment:
15 | - MYSQL_ROOT_PASSWORD=
16 | ports:
17 | - 3306:3306
18 | healthcheck:
19 | test: ["CMD-SHELL", "netstat -ntlp | grep :3306"]
20 | interval: 10s
21 | timeout: 2s
22 | retries: 3
23 |
--------------------------------------------------------------------------------
/scripts/nginx/73-postgres.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # PostgreSQL - Postgres database server
3 | #
4 | postgres:
5 | restart: unless-stopped
6 | image: postgres:latest
7 | container_name: postgres
8 | hostname: postgres
9 | volumes:
10 | - ${CONFIGS}/Postgres:/var/lib/postgresql/data
11 | - /etc/localtime:/etc/localtime:ro
12 | - /bin/netstat:/bin/netstat:ro
13 | environment:
14 | - POSTGRES_PASSWORD=
15 | ports:
16 | - 5432:5432
17 | healthcheck:
18 | test: ["CMD-SHELL", "netstat -ntlp | grep :5432"]
19 | interval: 10s
20 | timeout: 2s
21 | retries: 3
22 |
23 | pgadmin:
24 | restart: unless-stopped
25 | image: dockage/phppgadmin
26 | container_name: pgadmin
27 | depends_on:
28 | nginx-proxy:
29 | condition: service_healthy
30 | letsencrypt-nginx-proxy-companion:
31 | condition: service_started
32 | postgres:
33 | condition: service_healthy
34 | volumes:
35 | - ${CONFIGS}/Web:/var/www/html
36 | environment:
37 | - PHP_PG_ADMIN_SERVER_DESC=PostgreSQL
38 | - PHP_PG_ADMIN_SERVER_HOST=postgres
39 | - PHP_PG_ADMIN_SERVER_PORT=5432
40 | - PHP_PG_ADMIN_SERVER_SSL_MODE=allow
41 | - PHP_PG_ADMIN_SERVER_DEFAULT_DB=template1
42 | - PHP_PG_ADMIN_SERVER_PG_DUMP_PATH=/usr/bin/pg_dump
43 | - PHP_PG_ADMIN_SERVER_PG_DUMPALL_PATH=/usr/bin/pg_dumpall
44 | - PHP_PG_ADMIN_DEFAULT_LANG=auto
45 | - PHP_PG_ADMIN_AUTO_COMPLETE=default on
46 | - PHP_PG_ADMIN_EXTRA_LOGIN_SECURITY=false
47 | - PHP_PG_ADMIN_OWNED_ONLY=false
48 | - PHP_PG_ADMIN_SHOW_COMMENTS=true
49 | - PHP_PG_ADMIN_SHOW_ADVANCED=false
50 | - PHP_PG_ADMIN_SHOW_SYSTEM=false
51 | - PHP_PG_ADMIN_MIN_PASSWORD_LENGTH=1
52 | - PHP_PG_ADMIN_LEFT_WIDTH=200
53 | - PHP_PG_ADMIN_THEME=default
54 | - PHP_PG_ADMIN_SHOW_OIDS=false
55 | - PHP_PG_ADMIN_MAX_ROWS=30
56 | - PHP_PG_ADMIN_MAX_CHARS=50
57 | - PHP_PG_ADMIN_USE_XHTML_STRICT=false
58 | - PHP_PG_ADMIN_HELP_BASE=http://www.postgresql.org/docs/%s/interactive/
59 | - PHP_PG_ADMIN_AJAX_REFRESH=3
60 | - VIRTUAL_HOST=pgadmin.${MYDOMAIN}
61 | - VIRTUAL_PORT=80
62 | - VIRTUAL_NETWORK=nginx-proxy
63 | - TZ=${TIMEZONE}
64 | - LETSENCRYPT_HOST=pgadmin.${MYDOMAIN}
65 | - LETSENCRYPT_EMAIL=${MYEMAIL}
66 | healthcheck:
67 | test: ["CMD-SHELL", "netstat -ntlp | grep :80"]
68 | interval: 10s
69 | timeout: 2s
70 | retries: 3
71 |
--------------------------------------------------------------------------------
/scripts/nginx/75-redis.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Redis - Redis database server
3 | #
4 | redis:
5 | restart: unless-stopped
6 | image: redis:latest
7 | container_name: redis
8 | hostname: redis
9 | volumes:
10 | - ${CONFIGS}/Redis:/data
11 | - /etc/localtime:/etc/localtime:ro
12 | - /bin/netstat:/bin/netstat:ro
13 | environment:
14 | - PUID=${USERID}
15 | - PGID=${GROUPID}
16 | - TZ=${TIMEZONE}
17 | ports:
18 | - 6379:6379
19 | healthcheck:
20 | test: ["CMD-SHELL", "netstat -ntlp | grep :6379"]
21 | interval: 10s
22 | timeout: 2s
23 | retries: 3
24 |
25 | redis-commander:
26 | restart: unless-stopped
27 | image: rediscommander/redis-commander:latest
28 | container_name: redis-commander
29 | hostname: redis
30 | volumes:
31 | - ${CONFIGS}/Redis:/data
32 | - /etc/localtime:/etc/localtime:ro
33 | - /bin/netstat:/bin/netstat:ro
34 | environment:
35 | - REDIS_HOSTS=local:redis:6379
36 | healthcheck:
37 | test: ["CMD-SHELL", "netstat -ntlp | grep :8081"]
38 | interval: 10s
39 | timeout: 2s
40 | retries: 3
41 |
--------------------------------------------------------------------------------
/scripts/nginx/80---Web:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/nginx/81-phpapache.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # PHP - Apache web server
3 | #
4 | php:
5 | restart: always
6 | image: php:apache
7 | container_name: php
8 | hostname: web
9 | depends_on:
10 | nginx-proxy:
11 | condition: service_healthy
12 | letsencrypt-nginx-proxy-companion:
13 | condition: service_started
14 | volumes:
15 | - ${CONFIGS}/Web:/var/www/html
16 | environment:
17 | - PUID=${USERID}
18 | - PGID=${GROUPID}
19 | - VIRTUAL_HOST=web.${MYDOMAIN}
20 | - VIRTUAL_PORT=80
21 | - VIRTUAL_NETWORK=nginx-proxy
22 | - TZ=${TIMEZONE}
23 | - LETSENCRYPT_HOST=web.${MYDOMAIN}
24 | - LETSENCRYPT_EMAIL=${MYEMAIL}
25 |
--------------------------------------------------------------------------------
/scripts/nginx/90---Core:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/nginx/99-footer.yaml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/services/mergerfs.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=MergerFS overlay writable storage and local mount
3 | After=syslog.target local-fs.target network.target rclonefs.service
4 |
5 | [Service]
6 | Type=forking
7 | User=GOOBYUSER
8 | Group=GOOBYUSER
9 | EnvironmentFile=/var/local/Gooby/Docker/.env
10 |
11 | ExecStartPre=/bin/mkdir -p ${UPLOADS} ${MEDIA} ${LOCALFILES}
12 | ExecStart=/usr/bin/mergerfs \
13 | -o use_ino,hard_remove,auto_cache,sync_read,allow_other,category.action=all,category.create=ff \
14 | ${UPLOADS}:${LOCALFILES}:${RCLONEMOUNT} ${MEDIA}
15 | ExecStop=/bin/fusermount -uz ${MEDIA}
16 | ExecStop=/bin/rmdir ${MEDIA}
17 | Restart=always
18 |
19 | [Install]
20 | WantedBy=default.target
21 |
--------------------------------------------------------------------------------
/scripts/services/rclonefs.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=Mount Google Drive (Rclone)
3 | After=syslog.target local-fs.target network.target
4 |
5 | [Service]
6 | EnvironmentFile=/var/local/Gooby/Docker/.env
7 |
8 | Type=simple
9 | User=GOOBYUSER
10 | Group=GOOBYUSER
11 | ExecStartPre=/bin/mkdir -p ${RCLONEMOUNT}
12 | ExecStart=/usr/bin/rclone mount \
13 | --allow-other \
14 | --buffer-size 0M \
15 | --dir-cache-time 96h \
16 | --gid ${USERID} \
17 | --log-level INFO \
18 | --log-file ${HOMEDIR}/logs/rclone.log \
19 | --timeout 1h \
20 | --tpslimit 10 \
21 | --tpslimit-burst 10 \
22 | --uid ${GROUPID} \
23 | --umask 002 \
24 | --user-agent GOOBYUSER \
25 | --rc \
26 | --rc-pass ${RCLONEPASSWORD} \
27 | --rc-user ${RCLONEUSERNAME} \
28 | --config ${RCLONEHOME}/rclone.conf \
29 | ${RCLONESERVICE}:${RCLONEFOLDER} ${RCLONEMOUNT}
30 | ExecStop=/bin/fusermount -uz ${RCLONEMOUNT}
31 | ExecStop=/bin/rmdir ${RCLONEMOUNT}
32 | Restart=always
33 |
34 | [Install]
35 | WantedBy=default.target unionfs.service mergerfs.service
36 |
--------------------------------------------------------------------------------
/scripts/services/traefik.toml:
--------------------------------------------------------------------------------
1 |
2 | #debug = true
3 |
4 | logLevel = "ERROR" #DEBUG, INFO, WARN, ERROR, FATAL, PANIC
5 | InsecureSkipVerify = true
6 | defaultEntryPoints = ["https", "http"]
7 |
8 | # WEB interface of Traefik - it will show web page with overview of frontend and backend configurations
9 | [web]
10 | entryPoint = "traefik"
11 | dashboard = true
12 | address = ":8080"
13 | #usersFile = "/etc/traefik/security"
14 |
15 | # Force HTTPS
16 | [entryPoints]
17 | [entryPoints.http]
18 | address = ":80"
19 | [entryPoints.http.redirect]
20 | entryPoint = "https"
21 | [entryPoints.https]
22 | address = ":443"
23 | [entryPoints.https.tls]
24 |
25 | [file]
26 | watch = true
27 | filename = "/etc/traefik/rules.toml"
28 |
29 | # Let's encrypt configuration
30 | [acme]
31 | email = "GOOBYEMAIL"
32 | storage="/etc/traefik/acme/acme.json"
33 | entryPoint = "https"
34 | acmeLogging=true
35 | onDemand = false #create certificate when container is created
36 | [acme.dnsChallenge]
37 | provider = "cloudflare"
38 | delayBeforeCheck = 0
39 | [[acme.domains]]
40 | main = "GOOBYDOMAIN"
41 | [[acme.domains]]
42 | main = "*.GOOBYDOMAIN"
43 |
44 | # Connection to docker host system (docker.sock)
45 | [docker]
46 | endpoint = "unix:///var/run/docker.sock"
47 | domain = "GOOBYDOMAIN"
48 | watch = true
49 | exposedbydefault = true
50 |
--------------------------------------------------------------------------------
/scripts/traefik/00---Core:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/traefik/01-header.yaml:
--------------------------------------------------------------------------------
1 | version: "3.9"
2 | #
3 | # Gooby - Based on Kelinger's OmniStream
4 | #
5 | services:
6 |
--------------------------------------------------------------------------------
/scripts/traefik/02-oauth.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # OAuth - Forward Authentication
3 | #
4 | oauth:
5 | image: thomseddon/traefik-forward-auth:latest
6 | container_name: oauth
7 | hostname: oauth
8 | domainname: ${MYDOMAIN}
9 | restart: unless-stopped
10 | networks:
11 | - Gooby
12 | security_opt:
13 | - no-new-privileges:true
14 | environment:
15 | PROVIDERS_GOOGLE_CLIENT_ID: ""
16 | PROVIDERS_GOOGLE_CLIENT_SECRET: ""
17 | SECRET:
18 | COOKIE_DOMAIN: ${MYDOMAIN}
19 | INSECURE_COOKIE: "false"
20 | AUTH_HOST: oauth.${MYDOMAIN}
21 | URL_PATH: /_oauth
22 | WHITELIST: ""
23 | LOG_LEVEL: info
24 | LIFETIME: 2592000 # 30 days
25 | DEFAULT_ACTION: auth
26 | DEFAULT_PROVIDER: google
27 | labels:
28 | - "omni=oauth,${MYDOMAIN},yes,yes,yes"
29 | - "traefik.enable=true"
30 | ## HTTP Routers
31 | - "traefik.http.routers.oauth-rtr.entrypoints=https"
32 | - "traefik.http.routers.oauth-rtr.rule=Host(`oauth.${MYDOMAIN}`)"
33 | ## Middlewares
34 | - "traefik.http.routers.oauth-rtr.middlewares=chain-oauth@file"
35 | ## HTTP Services
36 | - "traefik.http.routers.oauth-rtr.service=oauth-svc"
37 | - "traefik.http.services.oauth-svc.loadbalancer.server.port=4181"
38 |
--------------------------------------------------------------------------------
/scripts/traefik/03-proxy.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Traefik - Maps containers to public FQDNs accessible via https with valid certs
3 | #
4 | traefik:
5 | image: traefik:alpine
6 | container_name: traefik
7 | hostname: traefik
8 | domainname: ${MYDOMAIN}
9 | restart: always
10 | ports:
11 | - "80:80"
12 | - "443:443"
13 | environment:
14 | - CLOUDFLARE_EMAIL=${CF_EMAIL}
15 | - CLOUDFLARE_API_KEY=${CF_KEY}
16 | labels:
17 | - "traefik.enable=true"
18 | - "traefik.backend=traefik"
19 | - "traefik.frontend.rule=Host:traefik.${MYDOMAIN}"
20 | - "traefik.port=8080"
21 | - "traefik.docker.network=Gooby"
22 | - "traefik.frontend.headers.SSLRedirect=true"
23 | - "traefik.frontend.headers.STSSeconds=315360000"
24 | - "traefik.frontend.headers.browserXSSFilter=true"
25 | - "traefik.frontend.headers.contentTypeNosniff=true"
26 | - "traefik.frontend.headers.forceSTSHeader=true"
27 | - "traefik.frontend.headers.SSLHost=${MYDOMAIN}"
28 | - "traefik.frontend.headers.STSIncludeSubdomains=true"
29 | - "traefik.frontend.headers.STSPreload=true"
30 | - "traefik.frontend.headers.frameDeny=true"
31 | - "traefik.frontend.auth.basic.usersFile=/etc/traefik/security"
32 | volumes:
33 | - /var/run/docker.sock:/var/run/docker.sock:ro
34 | - ${CONFIGS}/Docker/traefik:/etc/traefik
35 | networks:
36 | - Gooby
37 | healthcheck:
38 | test: ["CMD-SHELL", "netstat -ntlp | grep :443"]
39 | interval: 10s
40 | timeout: 2s
41 | retries: 3
42 |
--------------------------------------------------------------------------------
/scripts/traefik/04-watchtower.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Watchtower - Cloud Monitoring Service
3 | #
4 | watchtower:
5 | image: containrrr/watchtower
6 | container_name: watchtower
7 | hostname: watchtower
8 | domainname: ${MYDOMAIN}
9 | restart: unless-stopped
10 | volumes:
11 | - /var/run/docker.sock:/var/run/docker.sock
12 | networks:
13 | - Gooby
14 |
--------------------------------------------------------------------------------
/scripts/traefik/05-autoheal.yaml:
--------------------------------------------------------------------------------
1 | autoheal:
2 | image: willfarrell/autoheal
3 | container_name: autoheal
4 | hostname: autoheal
5 | domainname: ${MYDOMAIN}
6 | restart: unless-stopped
7 | environment:
8 | - AUTOHEAL_CONTAINER_LABEL=all
9 | volumes:
10 | - /var/run/docker.sock:/var/run/docker.sock
11 | networks:
12 | - Gooby
13 |
--------------------------------------------------------------------------------
/scripts/traefik/10---Organizers:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/traefik/11-organizr.yaml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/traefik/12-ombi.yaml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/traefik/13-monitorr.yaml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/traefik/14-portainer.yaml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/traefik/20---Streamers:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/traefik/21-plex-beta.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Plex - Media streaming server beta
3 | #
4 | plex:
5 | image: plexinc/pms-docker:beta
6 | #image: linuxserver/plex
7 | container_name: plex
8 | hostname: plex
9 | domainname: ${MYDOMAIN}
10 | restart: unless-stopped
11 | depends_on:
12 | traefik:
13 | condition: service_healthy
14 | environment:
15 | - ADVERTISE_IP=https://plex.${MYDOMAIN}
16 | - PUID=${USERID}
17 | - PGID=${GROUPID}
18 | - TZ=${TIMEZONE}
19 | - VERSION=latest
20 | - UMASK_SET=022
21 | labels:
22 | - "traefik.enable=true"
23 | - "traefik.backend=plex"
24 | - "traefik.frontend.rule=Host:plex.${MYDOMAIN}"
25 | - "traefik.port=32400"
26 | - "traefik.protocol=https"
27 | - "traefik.docker.network=gooby"
28 | - "traefik.frontend.headers.SSLRedirect=true"
29 | - "traefik.frontend.headers.STSSeconds=315360000"
30 | - "traefik.frontend.headers.browserXSSFilter=true"
31 | - "traefik.frontend.headers.contentTypeNosniff=true"
32 | - "traefik.frontend.headers.forceSTSHeader=true"
33 | - "traefik.frontend.headers.SSLHost=${MYDOMAIN}"
34 | - "traefik.frontend.headers.STSIncludeSubdomains=true"
35 | - "traefik.frontend.headers.STSPreload=true"
36 | - "traefik.frontend.headers.frameDeny=true"
37 | volumes:
38 | - /etc/localtime:/etc/localtime:ro
39 | - ${CONFIGS}/Plex:/config
40 | - /tmp:/transcode
41 | - /bin/netstat:/bin/netstat:ro
42 | - ${MEDIA}:/Media
43 | # devices:
44 | # - /dev/dri:/dev/dri
45 | networks:
46 | - Gooby
47 | cpu_shares: 8192
48 | blkio_config:
49 | weight: 600
50 | healthcheck:
51 | test: ["CMD-SHELL", "netstat -ntlp | grep :32400 && mountpoint /Media"]
52 | interval: 10s
53 | timeout: 2s
54 | retries: 3
55 |
--------------------------------------------------------------------------------
/scripts/traefik/21-plex-hw.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Plex - Media streaming server with Intel hardware GPU
3 | #
4 | plex:
5 | privileged: true
6 | image: plexinc/pms-docker
7 | #image: linuxserver/plex
8 | container_name: plex
9 | hostname: plex
10 | domainname: ${MYDOMAIN}
11 | restart: unless-stopped
12 | depends_on:
13 | traefik:
14 | condition: service_healthy
15 | environment:
16 | - ADVERTISE_IP=https://plex.${MYDOMAIN}
17 | - PUID=${USERID}
18 | - PGID=${GROUPID}
19 | - TZ=${TIMEZONE}
20 | - VERSION=latest
21 | - UMASK_SET=022
22 | labels:
23 | - "traefik.enable=true"
24 | - "traefik.backend=plex"
25 | - "traefik.frontend.rule=Host:plex.${MYDOMAIN}"
26 | - "traefik.port=32400"
27 | - "traefik.protocol=https"
28 | - "traefik.docker.network=gooby"
29 | - "traefik.frontend.headers.SSLRedirect=true"
30 | - "traefik.frontend.headers.STSSeconds=315360000"
31 | - "traefik.frontend.headers.browserXSSFilter=true"
32 | - "traefik.frontend.headers.contentTypeNosniff=true"
33 | - "traefik.frontend.headers.forceSTSHeader=true"
34 | - "traefik.frontend.headers.SSLHost=${MYDOMAIN}"
35 | - "traefik.frontend.headers.STSIncludeSubdomains=true"
36 | - "traefik.frontend.headers.STSPreload=true"
37 | - "traefik.frontend.headers.frameDeny=true"
38 | volumes:
39 | - /etc/localtime:/etc/localtime:ro
40 | - ${CONFIGS}/Plex:/config
41 | - /tmp:/transcode
42 | - /bin/netstat:/bin/netstat:ro
43 | - ${MEDIA}:/Media
44 | devices:
45 | - /dev/dri:/dev/dri
46 | networks:
47 | - Gooby
48 | cpu_shares: 8192
49 | blkio_config:
50 | weight: 600
51 | healthcheck:
52 | test: ["CMD-SHELL", "netstat -ntlp | grep :32400 && mountpoint /Media"]
53 | interval: 10s
54 | timeout: 2s
55 | retries: 3
56 |
--------------------------------------------------------------------------------
/scripts/traefik/21-plex.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Plex - Media streaming server
3 | #
4 | plex:
5 | image: plexinc/pms-docker
6 | #image: linuxserver/plex
7 | container_name: plex
8 | hostname: plex
9 | domainname: ${MYDOMAIN}
10 | restart: unless-stopped
11 | depends_on:
12 | traefik:
13 | condition: service_healthy
14 | environment:
15 | - ADVERTISE_IP=https://plex.${MYDOMAIN}
16 | - PUID=${USERID}
17 | - PGID=${GROUPID}
18 | - TZ=${TIMEZONE}
19 | - VERSION=latest
20 | - UMASK_SET=022
21 | labels:
22 | - "traefik.enable=true"
23 | - "traefik.backend=plex"
24 | - "traefik.frontend.rule=Host:plex.${MYDOMAIN}"
25 | - "traefik.port=32400"
26 | - "traefik.protocol=https"
27 | - "traefik.docker.network=gooby"
28 | - "traefik.frontend.headers.SSLRedirect=true"
29 | - "traefik.frontend.headers.STSSeconds=315360000"
30 | - "traefik.frontend.headers.browserXSSFilter=true"
31 | - "traefik.frontend.headers.contentTypeNosniff=true"
32 | - "traefik.frontend.headers.forceSTSHeader=true"
33 | - "traefik.frontend.headers.SSLHost=${MYDOMAIN}"
34 | - "traefik.frontend.headers.STSIncludeSubdomains=true"
35 | - "traefik.frontend.headers.STSPreload=true"
36 | - "traefik.frontend.headers.frameDeny=true"
37 | volumes:
38 | - /etc/localtime:/etc/localtime:ro
39 | - ${CONFIGS}/Plex:/config
40 | - /tmp:/transcode
41 | - /bin/netstat:/bin/netstat:ro
42 | - ${MEDIA}:/Media
43 | # devices:
44 | # - /dev/dri:/dev/dri
45 | networks:
46 | - Gooby
47 | cpu_shares: 8192
48 | blkio_config:
49 | weight: 600
50 | healthcheck:
51 | test: ["CMD-SHELL", "netstat -ntlp | grep :32400 && mountpoint /Media"]
52 | interval: 10s
53 | timeout: 2s
54 | retries: 3
55 |
--------------------------------------------------------------------------------
/scripts/traefik/22-emby-beta.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Emby - Media streaming server beta
3 | #
4 | emby:
5 | image: emby/embyserver:beta
6 | container_name: emby
7 | hostname: emby
8 | domainname: ${MYDOMAIN}
9 | restart: unless-stopped
10 | depends_on:
11 | traefik:
12 | condition: service_healthy
13 | environment:
14 | - ADVERTISE_IP=https://emby.${MYDOMAIN}
15 | - UID=${USERID}
16 | - GID=${GROUPID}
17 | - GIDLIST=${GPUGIDS}
18 | labels:
19 | - "traefik.enable=true"
20 | - "traefik.backend=emby"
21 | - "traefik.frontend.rule=Host:emby.${MYDOMAIN}"
22 | - "traefik.port=8096"
23 | - "traefik.protocol=http"
24 | - "traefik.docker.network=gooby"
25 | - "traefik.frontend.headers.SSLRedirect=true"
26 | - "traefik.frontend.headers.STSSeconds=315360000"
27 | - "traefik.frontend.headers.browserXSSFilter=true"
28 | - "traefik.frontend.headers.contentTypeNosniff=true"
29 | - "traefik.frontend.headers.forceSTSHeader=true"
30 | - "traefik.frontend.headers.SSLHost=${MYDOMAIN}"
31 | - "traefik.frontend.headers.STSIncludeSubdomains=true"
32 | - "traefik.frontend.headers.STSPreload=true"
33 | - "traefik.frontend.headers.frameDeny=true"
34 | volumes:
35 | - ${CONFIGS}/Emby:/config
36 | - ${MEDIA}:/Media
37 | - /etc/localtime:/etc/localtime:ro
38 | - /tmp:/transcode
39 | # devices:
40 | # - /dev/dri:/dev/dri
41 | networks:
42 | - Gooby
43 | cpu_shares: 8192
44 | blkio_config:
45 | weight: 600
46 | healthcheck:
47 | test: ["CMD-SHELL", "netstat -ntlp | grep :8920"]
48 | interval: 10s
49 | timeout: 2s
50 | retries: 3
51 |
--------------------------------------------------------------------------------
/scripts/traefik/22-emby-hw.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Emby - Media streaming server with Intel hardware GPU
3 | #
4 | emby:
5 | image: emby/embyserver
6 | container_name: emby
7 | hostname: emby
8 | domainname: ${MYDOMAIN}
9 | restart: unless-stopped
10 | depends_on:
11 | traefik:
12 | condition: service_healthy
13 | environment:
14 | - ADVERTISE_IP=https://emby.${MYDOMAIN}
15 | - UID=${USERID}
16 | - GID=${GROUPID}
17 | - GIDLIST=${GPUGIDS}
18 | labels:
19 | - "traefik.enable=true"
20 | - "traefik.backend=emby"
21 | - "traefik.frontend.rule=Host:emby.${MYDOMAIN}"
22 | - "traefik.port=8096"
23 | - "traefik.protocol=http"
24 | - "traefik.docker.network=gooby"
25 | - "traefik.frontend.headers.SSLRedirect=true"
26 | - "traefik.frontend.headers.STSSeconds=315360000"
27 | - "traefik.frontend.headers.browserXSSFilter=true"
28 | - "traefik.frontend.headers.contentTypeNosniff=true"
29 | - "traefik.frontend.headers.forceSTSHeader=true"
30 | - "traefik.frontend.headers.SSLHost=${MYDOMAIN}"
31 | - "traefik.frontend.headers.STSIncludeSubdomains=true"
32 | - "traefik.frontend.headers.STSPreload=true"
33 | - "traefik.frontend.headers.frameDeny=true"
34 | volumes:
35 | - ${CONFIGS}/Emby:/config
36 | - ${MEDIA}:/Media
37 | - /etc/localtime:/etc/localtime:ro
38 | - /tmp:/transcode
39 | devices:
40 | - /dev/dri:/dev/dri
41 | networks:
42 | - Gooby
43 | cpu_shares: 8192
44 | blkio_config:
45 | weight: 600
46 | healthcheck:
47 | test: ["CMD-SHELL", "netstat -ntlp | grep :8920"]
48 | interval: 10s
49 | timeout: 2s
50 | retries: 3
51 |
--------------------------------------------------------------------------------
/scripts/traefik/22-emby.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Emby - Media streaming server
3 | #
4 | emby:
5 | image: emby/embyserver
6 | container_name: emby
7 | hostname: emby
8 | domainname: ${MYDOMAIN}
9 | restart: unless-stopped
10 | depends_on:
11 | traefik:
12 | condition: service_healthy
13 | environment:
14 | - ADVERTISE_IP=https://emby.${MYDOMAIN}
15 | - UID=${USERID}
16 | - GID=${GROUPID}
17 | - GIDLIST=${GPUGIDS}
18 | labels:
19 | - "traefik.enable=true"
20 | - "traefik.backend=emby"
21 | - "traefik.frontend.rule=Host:emby.${MYDOMAIN}"
22 | - "traefik.port=8096"
23 | - "traefik.protocol=http"
24 | - "traefik.docker.network=gooby"
25 | - "traefik.frontend.headers.SSLRedirect=true"
26 | - "traefik.frontend.headers.STSSeconds=315360000"
27 | - "traefik.frontend.headers.browserXSSFilter=true"
28 | - "traefik.frontend.headers.contentTypeNosniff=true"
29 | - "traefik.frontend.headers.forceSTSHeader=true"
30 | - "traefik.frontend.headers.SSLHost=${MYDOMAIN}"
31 | - "traefik.frontend.headers.STSIncludeSubdomains=true"
32 | - "traefik.frontend.headers.STSPreload=true"
33 | - "traefik.frontend.headers.frameDeny=true"
34 | volumes:
35 | - ${CONFIGS}/Emby:/config
36 | - ${MEDIA}:/Media
37 | - /etc/localtime:/etc/localtime:ro
38 | - /tmp:/transcode
39 | # devices:
40 | # - /dev/dri:/dev/dri
41 | networks:
42 | - Gooby
43 | cpu_shares: 8192
44 | blkio_config:
45 | weight: 600
46 | healthcheck:
47 | test: ["CMD-SHELL", "netstat -ntlp | grep :8920"]
48 | interval: 10s
49 | timeout: 2s
50 | retries: 3
51 |
--------------------------------------------------------------------------------
/scripts/traefik/23-jellyfin.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Jellyfin - The Free Software Media System
3 | #
4 | jellyfin:
5 | image: jellyfin/jellyfin
6 | container_name: jellyfin
7 | hostname: jellyfin
8 | domainname: ${MYDOMAIN}
9 | restart: unless-stopped
10 | depends_on:
11 | traefik:
12 | condition: service_healthy
13 | environment:
14 | - ADVERTISE_IP=https://jellyfin.${MYDOMAIN}
15 | - UID=${USERID}
16 | - GID=${GROUPID}
17 | - GIDLIST=${GPUGIDS}
18 | labels:
19 | - "traefik.enable=true"
20 | - "traefik.backend=jellyfin"
21 | - "traefik.frontend.rule=Host:jellyfin.${MYDOMAIN}"
22 | - "traefik.port=8096"
23 | - "traefik.protocol=http"
24 | - "traefik.docker.network=gooby"
25 | - "traefik.frontend.headers.SSLRedirect=true"
26 | - "traefik.frontend.headers.STSSeconds=315360000"
27 | - "traefik.frontend.headers.browserXSSFilter=true"
28 | - "traefik.frontend.headers.contentTypeNosniff=true"
29 | - "traefik.frontend.headers.forceSTSHeader=true"
30 | - "traefik.frontend.headers.SSLHost=${MYDOMAIN}"
31 | - "traefik.frontend.headers.STSIncludeSubdomains=true"
32 | - "traefik.frontend.headers.STSPreload=true"
33 | - "traefik.frontend.headers.frameDeny=true"
34 | volumes:
35 | - ${CONFIGS}/Jellyfin:/config
36 | - ${MEDIA}:/Media
37 | - /etc/localtime:/etc/localtime:ro
38 | - /tmp:/cache
39 | # devices:
40 | # - /dev/dri:/dev/dri
41 | networks:
42 | - Gooby
43 | cpu_shares: 8192
44 | blkio_config:
45 | weight: 600
46 | healthcheck:
47 | test: ["CMD-SHELL", "netstat -ntlp | grep :8920"]
48 | interval: 10s
49 | timeout: 2s
50 | retries: 3
51 |
--------------------------------------------------------------------------------
/scripts/traefik/25-tautulli.yaml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/traefik/26-embystat.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # EmbyStat - Reports on Emby stats
3 | #
4 | embystat:
5 | image: linuxserver/embystat
6 | container_name: embystat
7 | hostname: embystat
8 | domainname: ${MYDOMAIN}
9 | restart: unless-stopped
10 | depends_on:
11 | traefik:
12 | condition: service_healthy
13 | environment:
14 | - PUID=${USERID}
15 | - PGID=${GROUPID}
16 | - TZ=${TIMEZONE}
17 | labels:
18 | - "traefik.enable=true"
19 | - "traefik.backend=embystat"
20 | - "traefik.frontend.rule=Host:embystat.${MYDOMAIN}"
21 | - "traefik.port=6555"
22 | - "traefik.docker.network=omninet"
23 | #- "traefik.frontend.headers.SSLHost=${MYDOMAIN}"
24 | - "traefik.frontend.headers.SSLRedirect=true"
25 | - "traefik.frontend.headers.STSSeconds=315360000"
26 | - "traefik.frontend.headers.browserXSSFilter=true"
27 | - "traefik.frontend.headers.contentTypeNosniff=true"
28 | - "traefik.frontend.headers.forceSTSHeader=true"
29 | - "traefik.frontend.headers.SSLHost=${MYDOMAIN}"
30 | - "traefik.frontend.headers.STSIncludeSubdomains=true"
31 | - "traefik.frontend.headers.STSPreload=true"
32 | - "traefik.frontend.headers.frameDeny=true"
33 | volumes:
34 | - /etc/localtime:/etc/localtime:ro
35 | - /bin/netstat:/bin/netstat:ro
36 | - ${CONFIGS}/EmbyStat:/config
37 | networks:
38 | - Gooby
39 | cpu_shares: 1024
40 | healthcheck:
41 | test: ["CMD-SHELL", "netstat -ntlp | grep :6555"]
42 | interval: 10s
43 | timeout: 2s
44 | retries: 3
45 |
--------------------------------------------------------------------------------
/scripts/traefik/30---Usenet:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/traefik/31-nzbget.yaml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/traefik/32-sabnzbd.yaml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/traefik/40---Torrent:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/traefik/41-deluge.yaml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/traefik/45-rtorrent.yaml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/traefik/50---Catalog:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/traefik/51-radarr-beta.yaml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/traefik/51-radarr.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Radarr - Movie catalog and management
3 | #
4 | radarr:
5 | image: linuxserver/radarr
6 | container_name: radarr
7 | hostname: radarr
8 | domainname: ${MYDOMAIN}
9 | restart: unless-stopped
10 | depends_on:
11 | traefik:
12 | condition: service_healthy
13 | environment:
14 | - PGID=${GROUPID}
15 | - PUID=${USERID}
16 | - TZ=${TIMEZONE}
17 | labels:
18 | - "traefik.enable=true"
19 | - "traefik.backend=radarr"
20 | - "traefik.frontend.rule=Host:radarr.${MYDOMAIN}"
21 | - "traefik.port=7878"
22 | - "traefik.docker.network=gooby"
23 | - "traefik.frontend.headers.SSLRedirect=true"
24 | - "traefik.frontend.headers.STSSeconds=315360000"
25 | - "traefik.frontend.headers.browserXSSFilter=true"
26 | - "traefik.frontend.headers.contentTypeNosniff=true"
27 | - "traefik.frontend.headers.forceSTSHeader=true"
28 | - "traefik.frontend.headers.SSLHost=${MYDOMAIN}"
29 | - "traefik.frontend.headers.STSIncludeSubdomains=true"
30 | - "traefik.frontend.headers.STSPreload=true"
31 | - "traefik.frontend.headers.frameDeny=true"
32 | volumes:
33 | - /etc/localtime:/etc/localtime:ro
34 | - ${CONFIGS}/Radarr:/config
35 | - ${LOGS}:/config/logs
36 | - ${MEDIA}:/Media
37 | - /bin/netstat:/bin/netstat:ro
38 | - /usr/bin/killall:/usr/bin/killall:ro
39 | networks:
40 | - gooby
41 | cpu_shares: 2048
42 | blkio_config:
43 | weight: 150
44 | healthcheck:
45 | test: ["CMD-SHELL", "netstat -ntlp | grep :7878 && mountpoint /Media"]
46 | interval: 10s
47 | timeout: 2s
48 | retries: 3
49 |
--------------------------------------------------------------------------------
/scripts/traefik/52-sonarr.yaml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/traefik/53-lidarr.yaml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/traefik/56-jackett.yaml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/traefik/59-radarr4k-beta.yaml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/traefik/59-radarr4k.yaml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/traefik/60---Utils:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/traefik/61-nextcloud.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # NextCloud - Cloud File Server
3 | #
4 | nextcloud:
5 | image: nextcloud:latest
6 | container_name: ${NEXTCLOUDNAME}
7 | hostname: ${NEXTCLOUDNAME}
8 | domainname: ${MYDOMAIN}
9 | restart: unless-stopped
10 | depends_on:
11 | - traefik
12 | - mariadb
13 | - redis
14 | environment:
15 | - PGID=${GROUPID}
16 | - PUID=${USERID}
17 | - TZ=${TIMEZONE}
18 | - NEXTCLOUD_TRUSTED_DOMAINS=nextcloud.${MYDOMAIN}
19 | - REDIS_HOST=redis
20 | labels:
21 | - "omni=nextcloud,${MYDOMAIN},yes,yes,yes"
22 | - "traefik.enable=true"
23 | ## HTTP Routers
24 | - "traefik.http.routers.nextcloud-rtr.entrypoints=https"
25 | - "traefik.http.routers.nextcloud-rtr.rule=Host(`nextcloud.${MYDOMAIN}`)"
26 | ## Middlewares
27 | - "traefik.http.routers.nextcloud-rtr.middlewares=chain-no-auth@file"
28 | ## HTTP Services
29 | - "traefik.http.routers.nextcloud-rtr.service=nextcloud-svc"
30 | - "traefik.http.services.nextcloud-svc.loadbalancer.server.port=80"
31 | volumes:
32 | - ${CONFIGS}/NextCloud:/var/www/html
33 | - ${MEDIA}:/Media
34 | - /etc/localtime:/etc/localtime:ro
35 | - /bin/netstat:/bin/netstat:ro
36 | networks:
37 | - Gooby
38 | healthcheck:
39 | test: ["CMD-SHELL", "netstat -ntlp | grep :80"]
40 | interval: 10s
41 | timeout: 2s
42 | retries: 3
43 |
--------------------------------------------------------------------------------
/scripts/traefik/62-netdata.yaml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/traefik/63-speedtest.yaml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/traefik/70---Database:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/traefik/71-mysql.yaml:
--------------------------------------------------------------------------------
1 | mysql:
2 | image: mysql
3 | container_name: mysql
4 | hostname: mysql
5 | domainname: ${MYDOMAIN}
6 | restart: unless-stopped
7 | environment:
8 | MYSQL_DATABASE: '[databasenamehere]'
9 | MYSQL_USER: '[youruserhere]'
10 | MYSQL_PASSWORD: '[yourpasswordhere]'
11 | MYSQL_ROOT_PASSWORD: '[yourrootpasswordhere]'
12 | ports:
13 | - 3306:3306
14 | volumes:
15 | - ${CONFIGS}/MySQL:/var/lib/mysql
16 | - /etc/localtime:/etc/localtime:ro
17 | - /bin/netstat:/bin/netstat:ro
18 | labels:
19 | - "omni=mysql,${MYDOMAIN},yes,yes,no"
20 | networks:
21 | - OmniNet
22 | healthcheck:
23 | test: ["CMD-SHELL", "netstat -ntlp | grep :3306"]
24 | interval: 10s
25 | timeout: 2s
26 | retries: 3
27 |
--------------------------------------------------------------------------------
/scripts/traefik/72-mariadb.yaml:
--------------------------------------------------------------------------------
1 | mariadb:
2 | image: linuxserver/mariadb
3 | container_name: mariadb
4 | hostname: mariadb
5 | domainname: ${MYDOMAIN}
6 | restart: always
7 | depends_on:
8 | - traefik
9 | volumes:
10 | - ${CONFIGS}/Mariadb:/config
11 | - /etc/localtime:/etc/localtime:ro
12 | - /bin/netstat:/bin/netstat:ro
13 | networks:
14 | - Gooby
15 | ports:
16 | - target: 3306
17 | published: 3306
18 | protocol: tcp
19 | mode: host
20 | environment:
21 | - MYSQL_ROOT_PASSWORD=[yourpasswordhere]
22 | - PUID=${USERID}
23 | - PGID=${GROUPID}
24 | - TZ=${TIMEZONE}
25 | labels:
26 | - "omni=mariadb,${MYDOMAIN},yes,yes,no"
27 | healthcheck:
28 | test: ["CMD-SHELL", "netstat -ntlp | grep :3306"]
29 | interval: 10s
30 | timeout: 2s
31 | retries: 3
32 |
--------------------------------------------------------------------------------
/scripts/traefik/73-postgres.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # PostgreSQL - Postgres database server
3 | #
4 | postgres:
5 | restart: unless-stopped
6 | image: postgres:latest
7 | container_name: postgres
8 | hostname: postgres
9 | volumes:
10 | - ${CONFIGS}/Postgres:/var/lib/postgresql/data
11 | - /etc/localtime:/etc/localtime:ro
12 | - /bin/netstat:/bin/netstat:ro
13 | environment:
14 | - POSTGRES_PASSWORD=
15 | networks:
16 | - gooby
17 | healthcheck:
18 | test: ["CMD-SHELL", "netstat -ntlp | grep :5432"]
19 | interval: 10s
20 | timeout: 2s
21 | retries: 3
22 |
23 | pgadmin:
24 | restart: unless-stopped
25 | image: dockage/phppgadmin
26 | container_name: pgadmin
27 | depends_on:
28 | traefik:
29 | condition: service_healthy
30 | postgres:
31 | condition: service_healthy
32 | environment:
33 | - PHP_PG_ADMIN_SERVER_DESC=PostgreSQL
34 | - PHP_PG_ADMIN_SERVER_HOST=postgres
35 | - PHP_PG_ADMIN_SERVER_PORT=5432
36 | - PHP_PG_ADMIN_SERVER_SSL_MODE=allow
37 | - PHP_PG_ADMIN_SERVER_DEFAULT_DB=template1
38 | - PHP_PG_ADMIN_SERVER_PG_DUMP_PATH=/usr/bin/pg_dump
39 | - PHP_PG_ADMIN_SERVER_PG_DUMPALL_PATH=/usr/bin/pg_dumpall
40 | - PHP_PG_ADMIN_DEFAULT_LANG=auto
41 | - PHP_PG_ADMIN_AUTO_COMPLETE=default on
42 | - PHP_PG_ADMIN_EXTRA_LOGIN_SECURITY=false
43 | - PHP_PG_ADMIN_OWNED_ONLY=false
44 | - PHP_PG_ADMIN_SHOW_COMMENTS=true
45 | - PHP_PG_ADMIN_SHOW_ADVANCED=false
46 | - PHP_PG_ADMIN_SHOW_SYSTEM=false
47 | - PHP_PG_ADMIN_MIN_PASSWORD_LENGTH=1
48 | - PHP_PG_ADMIN_LEFT_WIDTH=200
49 | - PHP_PG_ADMIN_THEME=default
50 | - PHP_PG_ADMIN_SHOW_OIDS=false
51 | - PHP_PG_ADMIN_MAX_ROWS=30
52 | - PHP_PG_ADMIN_MAX_CHARS=50
53 | - PHP_PG_ADMIN_USE_XHTML_STRICT=false
54 | - PHP_PG_ADMIN_HELP_BASE=http://www.postgresql.org/docs/%s/interactive/
55 | - PHP_PG_ADMIN_AJAX_REFRESH=3
56 | networks:
57 | - Gooby
58 | labels:
59 | - "traefik.enable=true"
60 | - "traefik.backend=pgadmin"
61 | - "traefik.frontend.rule=Host:pgadmin.${MYDOMAIN}"
62 | - "traefik.port=80"
63 | - "traefik.docker.network=traefik_proxy"
64 | healthcheck:
65 | test: ["CMD-SHELL", "netstat -ntlp | grep :80"]
66 | interval: 10s
67 | timeout: 2s
68 | retries: 3
69 |
--------------------------------------------------------------------------------
/scripts/traefik/75-redis.yaml:
--------------------------------------------------------------------------------
1 | redis:
2 | image: redis:latest
3 | container_name: redis
4 | hostname: redis
5 | domainname: ${MYDOMAIN}
6 | restart: always
7 | depends_on:
8 | - traefik
9 | networks:
10 | - Gooby
11 | ports:
12 | - "6379:6379"
13 | volumes:
14 | - ${CONFIGS}/Redis:/data
15 | - /etc/localtime:/etc/localtime:ro
16 | - /bin/netstat:/bin/netstat:ro
17 | labels:
18 | - "omni=redis,${MYDOMAIN},no,no,no"
19 | healthcheck:
20 | test: ["CMD-SHELL", "netstat -ntlp | grep :6379"]
21 | interval: 10s
22 | timeout: 2s
23 | retries: 3
24 |
25 | redis-commander:
26 | image: rediscommander/redis-commander:latest
27 | container_name: redis-commander
28 | hostname: redis-commander
29 | domainname: ${MYDOMAIN}
30 | restart: always
31 | depends_on:
32 | - traefik
33 | networks:
34 | - Gooby
35 | environment:
36 | - REDIS_HOSTS=local:redis:6379
37 | labels:
38 | - "omni=redis-commander,${MYDOMAIN},yes,yes,yes"
39 | - "traefik.enable=true"
40 | ## HTTP Routers
41 | - "traefik.http.routers.redis-rtr.entrypoints=https"
42 | - "traefik.http.routers.redis-rtr.rule=Host(`redis-commander.${MYDOMAIN}`)"
43 | ## Middlewares
44 | - "traefik.http.routers.redis-rtr.middlewares=chain-oauth@file"
45 | ## HTTP Services
46 | - "traefik.http.routers.redis-rtr.service=redis-svc"
47 | - "traefik.http.services.redis-svc.loadbalancer.server.port=8081"
48 | healthcheck:
49 | test: ["CMD-SHELL", "netstat -ntlp | grep :8081"]
50 | interval: 10s
51 | timeout: 2s
52 | retries: 3
53 |
--------------------------------------------------------------------------------
/scripts/traefik/80---Web:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/traefik/81-phpapache.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # PHP - Apache web server
3 | #
4 | php:
5 | restart: always
6 | image: php:apache
7 | container_name: php
8 | hostname: web
9 | depends_on:
10 | traefik:
11 | condition: service_healthy
12 | volumes:
13 | - ${CONFIGS}/Web:/var/www/html
14 | - /bin/netstat:/bin/netstat:ro
15 | networks:
16 | - Gooby
17 | labels:
18 | - "traefik.enable=true"
19 | - "traefik.backend=web"
20 | - "traefik.frontend.rule=Host:web.${MYDOMAIN}"
21 | - "traefik.port=80"
22 | - "traefik.protocol=http"
23 | healthcheck:
24 | web: ["CMD-SHELL", "netstat -ntlp | grep :80"]
25 | interval: 10s
26 | timeout: 2s
27 | retries: 3
28 |
--------------------------------------------------------------------------------
/scripts/traefik/90---Core:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/scripts/traefik/99-footer.yaml:
--------------------------------------------------------------------------------
1 | networks:
2 | Gooby:
3 | external:
4 | name: Gooby
5 | default:
6 | driver: bridge
7 |
--------------------------------------------------------------------------------