mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-10 18:01:03 +01:00
addition of nextcloud and transmission based on linuxserver
This commit is contained in:
12
README.md
12
README.md
@@ -27,12 +27,22 @@ A Free Software Media System that puts you in control of managing and streaming
|
||||
- Forked from : https://github.com/petersendev/hassio-addons
|
||||
- Modifications : add smb and local disks mount
|
||||
|
||||
### [Transmission NAS](transmission/)
|
||||
### [Transmission NAS](transmission_nas/)
|
||||
The torrent client for Hass.io with OpenVPN support.
|
||||
- Based on latest transmission
|
||||
- Forked from : https://github.com/Alexwijn/hassio-addon-transmission
|
||||
- Modifications : add smb and local disks mount
|
||||
|
||||
### [Transmission](transmission/)
|
||||
The torrent client for Hass.io.
|
||||
- Based on linuxserver image
|
||||
|
||||
### [nextcloud](nextcloud/)
|
||||
A Nextcloud container, brought to you by LinuxServer.io.
|
||||
- Based on linuxserver image
|
||||
- Forked from : https://github.com/haberda/hassio_addons
|
||||
- Modifications : update based on images numbering instead of "latest"
|
||||
|
||||
### [Doublecommander NAS](doublecommander/)
|
||||
A free cross platform open source file manager with two panels side by side.
|
||||
- Based on latest linuxserver image
|
||||
|
||||
20
nextcloud/Dockerfile
Normal file
20
nextcloud/Dockerfile
Normal file
@@ -0,0 +1,20 @@
|
||||
ARG BUILD_FROM
|
||||
|
||||
FROM ${BUILD_FROM}
|
||||
|
||||
ENV NEXTCLOUD_PATH="/data/config/www/nextcloud"
|
||||
|
||||
# modify/copy files
|
||||
RUN sed -i "s|data|share/nextcloud|g" /etc/cont-init.d/*
|
||||
|
||||
RUN sed -i "s|config|data/config|g" /etc/cont-init.d/*
|
||||
|
||||
RUN sed -i "s|data|share/nextcloud|g" /etc/services.d/nginx/*
|
||||
|
||||
RUN sed -i "s|config|data/config|g" /etc/services.d/nginx/*
|
||||
|
||||
COPY root/ /
|
||||
|
||||
RUN ["chmod", "+x", "/defaults/nextcloud-perms.sh"]
|
||||
|
||||
VOLUME ["/share", "/ssl", "/data", "/media"]
|
||||
32
nextcloud/README.md
Normal file
32
nextcloud/README.md
Normal file
@@ -0,0 +1,32 @@
|
||||
[](https://nextcloud.com/)
|
||||
|
||||
# Nextcloud
|
||||
|
||||
Nextcloud Home Assistant add-on
|
||||
|
||||
# How to use this add-on
|
||||
|
||||
Install the add-on, choose your desired port, start.
|
||||
|
||||
After the add-on is started proceed to: https://[ip]:[port] and follow the setup process.
|
||||
|
||||
# How to add trusted domain
|
||||
Nextcloud requires a whitelist of trusted domains in order to access Nextcloud externally, or even internally from an address that is different from the domain it is initially assessed from. Normally this requires editing of a config file. If you have access to the add-on data storage (i.e. Supervised Installation) then the recommended method is to follow official documentation to add your domain.
|
||||
|
||||
If you are running HASSOS and have no access to edit this file you can add your domain from the web interface through a console app that allows access to the 'occ' command line.
|
||||
|
||||
To do this, log into the Nextcloud web interface as an admin user, click the top right user image icon to expand the menu. Select the Apps to go to the app installation page. On the app installation page install an app called 'OCC Web'.
|
||||
|
||||
Once installed return to the main page and launch OCCWeb.
|
||||
|
||||
When the console is displayed type:
|
||||
|
||||
> config:system:get trusted_domains
|
||||
|
||||
Warning: overwriting the domain you are currently using will make Nextcloud inaccessible and the add-on will have to be deleted and reinstalled. This will list the current trusted domains. The domains are numbered from 0 so if you have two domains that display the first is domain 0, the second is domain 1. To add another domain:
|
||||
|
||||
> config:system:set trusted_domains 2 --value=my.domain.com
|
||||
|
||||
Where the number 2 is the now new third domain position in the config file, and 'my.domain.com' is your domain. Type the first command again to see whether the new domain has indeed been added. If it has, you are done!
|
||||
|
||||
Based on the linuxserver image
|
||||
10
nextcloud/build.json
Normal file
10
nextcloud/build.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"squash": false,
|
||||
"build_from": {
|
||||
"aarch64": "linuxserver/nextcloud:arm64v8-20.0.3-ls110",
|
||||
"amd64": "linuxserver/nextcloud-20.0.3-ls110",
|
||||
"armhf": "linuxserver/nextcloud:arm32v7-20.0.3-ls110",
|
||||
"armv7": "linuxserver/nextcloud:arm32v7-20.0.3-ls110"
|
||||
},
|
||||
"args": {}
|
||||
}
|
||||
32
nextcloud/config.json
Normal file
32
nextcloud/config.json
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"name": "Nextcloud",
|
||||
"url": "https://github.com/alexbelgium/hassio_addons",
|
||||
"version": "20.0.3-ls110",
|
||||
"slug": "nextcloud",
|
||||
"ingress": false,
|
||||
"ingress_port": 0,
|
||||
"arch": [
|
||||
"aarch64",
|
||||
"amd64",
|
||||
"armv7"
|
||||
],
|
||||
"description": "Nextcloud for Home Assistant",
|
||||
"startup": "system",
|
||||
"boot": "manual",
|
||||
"auto_uart": true,
|
||||
"map": [
|
||||
"share:rw",
|
||||
"media:rw",
|
||||
"ssl:rw"
|
||||
],
|
||||
"options":{
|
||||
},
|
||||
"schema": {
|
||||
},
|
||||
"ports": {
|
||||
"443/tcp": 8099,
|
||||
"80/tcp": null
|
||||
},
|
||||
"webui": "https://[HOST]:[PORT:443]",
|
||||
"panel_icon": "mdi:cloud"
|
||||
}
|
||||
BIN
nextcloud/icon.png
Normal file
BIN
nextcloud/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.9 KiB |
BIN
nextcloud/logo.png
Normal file
BIN
nextcloud/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.9 KiB |
6
nextcloud/root/defaults/config.php
Normal file
6
nextcloud/root/defaults/config.php
Normal file
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
$CONFIG = array (
|
||||
'memcache.local' => '\OC\Memcache\APCu',
|
||||
'datadirectory' => '/share/nextcloud',
|
||||
);
|
||||
|
||||
121
nextcloud/root/defaults/default
Normal file
121
nextcloud/root/defaults/default
Normal file
@@ -0,0 +1,121 @@
|
||||
upstream php-handler {
|
||||
server 127.0.0.1:9000;
|
||||
}
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name _;
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name _;
|
||||
ssl_certificate /ssl/nextcloud/keys/cert.crt;
|
||||
ssl_certificate_key /ssl/nextcloud/keys/cert.key;
|
||||
|
||||
# Add headers to serve security related headers
|
||||
# Before enabling Strict-Transport-Security headers please read into this
|
||||
# topic first.
|
||||
#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
|
||||
#
|
||||
# WARNING: Only add the preload option once you read about
|
||||
# the consequences in https://hstspreload.org/. This option
|
||||
# will add the domain to a hardcoded list that is shipped
|
||||
# in all major browsers and getting removed from this list
|
||||
# could take several months.
|
||||
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
add_header X-XSS-Protection "1; mode=block";
|
||||
add_header X-Robots-Tag none;
|
||||
add_header X-Download-Options noopen;
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
add_header X-Permitted-Cross-Domain-Policies none;
|
||||
add_header Referrer-Policy no-referrer;
|
||||
fastcgi_hide_header X-Powered-By;
|
||||
root /data/config/www/nextcloud/;
|
||||
# display real ip in nginx logs when connected through reverse proxy via docker network
|
||||
set_real_ip_from 172.0.0.0/8;
|
||||
real_ip_header X-Forwarded-For;
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
location = /.well-known/carddav {
|
||||
return 301 $scheme://$host:$server_port/remote.php/dav;
|
||||
}
|
||||
location = /.well-known/caldav {
|
||||
return 301 $scheme://$host:$server_port/remote.php/dav;
|
||||
}
|
||||
location = /.well-known/webfinger {
|
||||
return 301 $scheme://$host:$server_port/public.php?service=webfinger;
|
||||
}
|
||||
location = /.well-known/host-meta {
|
||||
return 301 $scheme://$host:$server_port/public.php?service=host-meta;
|
||||
}
|
||||
location = /.well-known/host-meta.json {
|
||||
return 301 $scheme://$host:$server_port/public.php?service=host-meta-json;
|
||||
}
|
||||
client_max_body_size 10G;
|
||||
fastcgi_buffers 64 4K;
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_comp_level 4;
|
||||
gzip_min_length 256;
|
||||
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
|
||||
gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
|
||||
location / {
|
||||
rewrite ^ /index.php;
|
||||
}
|
||||
location ~ ^\/(?:build|tests|config|lib|3rdparty|templates|data)\/ {
|
||||
deny all;
|
||||
}
|
||||
location ~ ^\/(?:\.|autotest|occ|issue|indie|db_|console) {
|
||||
deny all;
|
||||
}
|
||||
location ~ ^\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+|.+\/richdocumentscode\/proxy)\.php(?:$|\/) {
|
||||
fastcgi_split_path_info ^(.+?\.php)(\/.*|)$;
|
||||
set $path_info $fastcgi_path_info;
|
||||
try_files $fastcgi_script_name =404;
|
||||
include /etc/nginx/fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $path_info;
|
||||
fastcgi_param HTTPS on;
|
||||
fastcgi_param modHeadersAvailable true;
|
||||
fastcgi_param front_controller_active true;
|
||||
fastcgi_pass php-handler;
|
||||
fastcgi_intercept_errors on;
|
||||
fastcgi_request_buffering off;
|
||||
}
|
||||
location ~ ^\/(?:updater|oc[ms]-provider)(?:$|\/) {
|
||||
try_files $uri/ =404;
|
||||
index index.php;
|
||||
}
|
||||
location ~ \.(?:css|js|woff2?|svg|gif|map)$ {
|
||||
try_files $uri /index.php$request_uri;
|
||||
add_header Cache-Control "public, max-age=15778463";
|
||||
# Add headers to serve security related headers
|
||||
# Before enabling Strict-Transport-Security headers please read into this
|
||||
# topic first.
|
||||
#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
|
||||
#
|
||||
# WARNING: Only add the preload option once you read about
|
||||
# the consequences in https://hstspreload.org/. This option
|
||||
# will add the domain to a hardcoded list that is shipped
|
||||
# in all major browsers and getting removed from this list
|
||||
# could take several months.
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
add_header X-XSS-Protection "1; mode=block";
|
||||
add_header X-Robots-Tag none;
|
||||
add_header X-Download-Options noopen;
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
add_header X-Permitted-Cross-Domain-Policies none;
|
||||
add_header Referrer-Policy no-referrer;
|
||||
access_log off;
|
||||
}
|
||||
location ~ \.(?:png|html|ttf|ico|jpg|jpeg|bcmap|mp4|webm)$ {
|
||||
try_files $uri /index.php$request_uri;
|
||||
access_log off;
|
||||
}
|
||||
}
|
||||
34
nextcloud/root/defaults/index.html
Normal file
34
nextcloud/root/defaults/index.html
Normal file
@@ -0,0 +1,34 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Welcome to our server</title>
|
||||
<style>
|
||||
body{
|
||||
font-family: Helvetica, Arial, sans-serif;
|
||||
}
|
||||
.message{
|
||||
width:330px;
|
||||
padding:20px 40px;
|
||||
margin:0 auto;
|
||||
background-color:#f9f9f9;
|
||||
border:1px solid #ddd;
|
||||
}
|
||||
center{
|
||||
margin:40px 0;
|
||||
}
|
||||
h1{
|
||||
font-size: 18px;
|
||||
line-height: 26px;
|
||||
}
|
||||
p{
|
||||
font-size: 12px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="message">
|
||||
<h1>Welcome to our server</h1>
|
||||
<p>The website is currently being setup under this address.</p>
|
||||
<p>For help and support, please contact: <a href="me@example.com">me@example.com</a></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
54
nextcloud/root/defaults/nextcloud-perms.sh
Normal file
54
nextcloud/root/defaults/nextcloud-perms.sh
Normal file
@@ -0,0 +1,54 @@
|
||||
#!/bin/bash
|
||||
|
||||
ocpath="${NEXTCLOUD_PATH}"
|
||||
htuser='abc'
|
||||
htgroup='abc'
|
||||
rootuser='root'
|
||||
|
||||
printf "Creating possible missing Directories\n"
|
||||
mkdir -p $ocpath/data
|
||||
mkdir -p $ocpath/assets
|
||||
mkdir -p $ocpath/updater
|
||||
mkdir -p $ocpath/apps
|
||||
mkdir -p $ocpath/assets
|
||||
mkdir -p $ocpath/config
|
||||
mkdir -p $ocpath/data
|
||||
mkdir -p $ocpath/themes
|
||||
mkdir -p /data/config/nextcloud/config
|
||||
mkdir -p /data/config/nextcloud/data
|
||||
mkdir -p /data/config/www/nextcloud/occ
|
||||
mkdir -p /share/nextcloud
|
||||
mkdir -p /ssl/nextcloud/keys
|
||||
|
||||
printf "chmod Files and Directories\n"
|
||||
#chmod -R 777 ${ocpath}
|
||||
find ${ocpath}/ -type f -exec chmod 0640 {} \;
|
||||
find ${ocpath}/ -type d -exec chmod 0750 {} \;
|
||||
|
||||
#find ${ocpath}/ -type f -print0 | xargs -0 chmod 0640
|
||||
#find ${ocpath}/ -type d -print0 | xargs -0 chmod 0750
|
||||
|
||||
printf "chown Directories\n"
|
||||
chown -R ${rootuser}:${htgroup} ${ocpath}/
|
||||
chown -R ${htuser}:${htgroup} ${ocpath}/apps/
|
||||
chown -R ${htuser}:${htgroup} ${ocpath}/assets/
|
||||
chown -R ${htuser}:${htgroup} ${ocpath}/config/
|
||||
chown -R ${htuser}:${htgroup} ${ocpath}/data/
|
||||
chown -R ${htuser}:${htgroup} ${ocpath}/themes/
|
||||
chown -R ${htuser}:${htgroup} ${ocpath}/updater/
|
||||
chown -R ${htuser}:${htgroup} /share/nextcloud
|
||||
chown -R ${htuser}:${htgroup} /ssl/nextcloud/keys
|
||||
|
||||
chmod +x ${ocpath}/occ
|
||||
|
||||
printf "chmod/chown .htaccess\n"
|
||||
if [ -f ${ocpath}/.htaccess ]
|
||||
then
|
||||
chmod 0644 ${ocpath}/.htaccess
|
||||
chown ${rootuser}:${htgroup} ${ocpath}/.htaccess
|
||||
fi
|
||||
if [ -f ${ocpath}/data/.htaccess ]
|
||||
then
|
||||
chmod 0644 ${ocpath}/data/.htaccess
|
||||
chown ${rootuser}:${htgroup} ${ocpath}/data/.htaccess
|
||||
fi
|
||||
102
nextcloud/root/defaults/nginx.conf
Normal file
102
nextcloud/root/defaults/nginx.conf
Normal file
@@ -0,0 +1,102 @@
|
||||
## Version 2018/08/16 - Changelog: https://github.com/linuxserver/docker-baseimage-alpine-nginx/commits/master/root/defaults/nginx.conf
|
||||
|
||||
user abc;
|
||||
worker_processes 4;
|
||||
pid /run/nginx.pid;
|
||||
include /etc/nginx/modules/*.conf;
|
||||
|
||||
events {
|
||||
worker_connections 768;
|
||||
# multi_accept on;
|
||||
}
|
||||
|
||||
http {
|
||||
|
||||
##
|
||||
# Basic Settings
|
||||
##
|
||||
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
keepalive_timeout 300;
|
||||
types_hash_max_size 2048;
|
||||
fastcgi_read_timeout 86400;
|
||||
# server_tokens off;
|
||||
|
||||
# server_names_hash_bucket_size 64;
|
||||
# server_name_in_redirect off;
|
||||
|
||||
client_max_body_size 0;
|
||||
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
##
|
||||
# Logging Settings
|
||||
##
|
||||
|
||||
access_log /data/config/log/nginx/access.log;
|
||||
error_log /data/config/log/nginx/error.log;
|
||||
|
||||
##
|
||||
# Gzip Settings
|
||||
##
|
||||
|
||||
gzip on;
|
||||
gzip_disable "msie6";
|
||||
|
||||
# gzip_vary on;
|
||||
# gzip_proxied any;
|
||||
# gzip_comp_level 6;
|
||||
# gzip_buffers 16 8k;
|
||||
# gzip_http_version 1.1;
|
||||
# gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
##
|
||||
# nginx-naxsi config
|
||||
##
|
||||
# Uncomment it if you installed nginx-naxsi
|
||||
##
|
||||
|
||||
#include /etc/nginx/naxsi_core.rules;
|
||||
|
||||
##
|
||||
# nginx-passenger config
|
||||
##
|
||||
# Uncomment it if you installed nginx-passenger
|
||||
##
|
||||
|
||||
#passenger_root /usr;
|
||||
#passenger_ruby /usr/bin/ruby;
|
||||
|
||||
##
|
||||
# Virtual Host Configs
|
||||
##
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
include /data/config/nginx/site-confs/*;
|
||||
|
||||
}
|
||||
|
||||
#mail {
|
||||
# # See sample authentication script at:
|
||||
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
|
||||
#
|
||||
# # auth_http localhost/auth.php;
|
||||
# # pop3_capabilities "TOP" "USER";
|
||||
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
|
||||
#
|
||||
# server {
|
||||
# listen localhost:110;
|
||||
# protocol pop3;
|
||||
# proxy on;
|
||||
# }
|
||||
#
|
||||
# server {
|
||||
# listen localhost:143;
|
||||
# protocol imap;
|
||||
# proxy on;
|
||||
# }
|
||||
#}
|
||||
daemon off;
|
||||
|
||||
9
nextcloud/root/defaults/root
Normal file
9
nextcloud/root/defaults/root
Normal file
@@ -0,0 +1,9 @@
|
||||
# do daily/weekly/monthly maintenance
|
||||
# min hour day month weekday command
|
||||
*/15 * * * * run-parts /etc/periodic/15min
|
||||
0 * * * * run-parts /etc/periodic/hourly
|
||||
0 2 * * * run-parts /etc/periodic/daily
|
||||
0 3 * * 6 run-parts /etc/periodic/weekly
|
||||
0 5 1 * * run-parts /etc/periodic/monthly
|
||||
# nextcloud cron
|
||||
*/5 * * * * s6-setuidgid abc php7 -f /data/config/www/nextcloud/cron.php
|
||||
39
nextcloud/root/etc/cont-init.d/10-adduser
Normal file
39
nextcloud/root/etc/cont-init.d/10-adduser
Normal file
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
PUID=${PUID:-911}
|
||||
PGID=${PGID:-911}
|
||||
|
||||
groupmod -o -g "$PGID" abc
|
||||
usermod -o -u "$PUID" abc
|
||||
mkdir -p /data/config
|
||||
mkdir -p /share/nextcloud
|
||||
echo '
|
||||
-------------------------------------
|
||||
_ ()
|
||||
| | ___ _ __
|
||||
| | / __| | | / \
|
||||
| | \__ \ | | | () |
|
||||
|_| |___/ |_| \__/
|
||||
|
||||
|
||||
Brought to you by linuxserver.io
|
||||
-------------------------------------'
|
||||
if [[ -f /donate.txt ]]; then
|
||||
echo '
|
||||
To support the app dev(s) visit:'
|
||||
cat /donate.txt
|
||||
fi
|
||||
echo '
|
||||
To support LSIO projects visit:
|
||||
https://www.linuxserver.io/donate/
|
||||
-------------------------------------
|
||||
GID/UID
|
||||
-------------------------------------'
|
||||
echo "
|
||||
User uid: $(id -u abc)
|
||||
User gid: $(id -g abc)
|
||||
-------------------------------------
|
||||
"
|
||||
chown abc:abc /app
|
||||
chown abc:abc /data/config
|
||||
chown abc:abc /defaults
|
||||
11
nextcloud/root/etc/cont-init.d/30-keygen
Normal file
11
nextcloud/root/etc/cont-init.d/30-keygen
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
/defaults/nextcloud-perms.sh
|
||||
SUBJECT="/C=US/ST=CA/L=Carlsbad/O=Linuxserver.io/OU=LSIO Server/CN=*"
|
||||
if [[ -f /ssl/nextcloud/keys/cert.key && -f /ssl/nextcloud/keys/cert.crt ]]; then
|
||||
echo "using keys found in /ssl/nextcloud/keys"
|
||||
else
|
||||
echo "generating self-signed keys in /ssl/nextcloud/keys, you can replace these with your own keys if required"
|
||||
openssl req -new -x509 -days 3650 -nodes -out /ssl/nextcloud/keys/cert.crt -keyout /ssl/nextcloud/keys/cert.key -subj "$SUBJECT"
|
||||
fi
|
||||
|
||||
|
||||
8
nextcloud/root/etc/cont-init.d/40-config
Normal file
8
nextcloud/root/etc/cont-init.d/40-config
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
# permissions
|
||||
chown abc:abc \
|
||||
/data/config/nextcloud/config \
|
||||
/data/config/nextcloud/data
|
||||
chown -R abc:abc \
|
||||
/var/lib/nginx
|
||||
21
nextcloud/root/etc/cont-init.d/50-install
Normal file
21
nextcloud/root/etc/cont-init.d/50-install
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
# create folders
|
||||
mkdir -p \
|
||||
"${NEXTCLOUD_PATH}" \
|
||||
/data/config/crontabs
|
||||
|
||||
# install app
|
||||
if [ ! -e "${NEXTCLOUD_PATH}/index.php" ]; then
|
||||
tar xf /app/nextcloud.tar.bz2 -C \
|
||||
"${NEXTCLOUD_PATH}" --strip-components=1
|
||||
chown abc:abc -R \
|
||||
"${NEXTCLOUD_PATH}"
|
||||
chmod +x "${NEXTCLOUD_PATH}/occ"
|
||||
fi
|
||||
|
||||
# set cronjob
|
||||
[[ ! -f /data/config/crontabs/root ]] && \
|
||||
cp /defaults/root /data/config/crontabs/root
|
||||
cp /data/config/crontabs/root /etc/crontabs/root
|
||||
|
||||
9
nextcloud/root/etc/cont-init.d/60-memcache
Normal file
9
nextcloud/root/etc/cont-init.d/60-memcache
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
# copy config
|
||||
[[ ! -f /data/config/www/nextcloud/config/config.php ]] && \
|
||||
cp /defaults/config.php /data/config/www/nextcloud/config/config.php
|
||||
|
||||
# permissions
|
||||
chown abc:abc \
|
||||
/data/config/www/nextcloud/config/config.php
|
||||
3
nextcloud/root/etc/services.d/cron/run
Normal file
3
nextcloud/root/etc/services.d/cron/run
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
/usr/sbin/crond -f -S -l 0 -c /etc/crontabs
|
||||
@@ -1,59 +1,7 @@
|
||||
ARG BUILD_FROM=hassioaddons/base:8.0.1
|
||||
# hadolint ignore=DL3006
|
||||
FROM ${BUILD_FROM}
|
||||
ARG BUILD_FROM
|
||||
FROM $BUILD_FROM
|
||||
|
||||
# Copy root filesystem
|
||||
COPY rootfs /
|
||||
# MOFIFY DATA PATH
|
||||
RUN sed -i "s|config|data|g" /etc/services.d/transmission/run
|
||||
|
||||
# Setup base
|
||||
RUN apk add --no-cache \
|
||||
coreutils \
|
||||
nginx \
|
||||
transmission-daemon \
|
||||
openvpn
|
||||
# Small hack needed for ingress support
|
||||
#
|
||||
# Transmission always uses "transmission" as a subdirectory in the URL, so the web interface can for instance be found at:
|
||||
#
|
||||
# http://<server>/transmission/web/
|
||||
#
|
||||
# The same goes for the RPC API, which is exposed under /transmission/rpc. When using ingress, this is not the case however
|
||||
# and "transmission" directory is not part of the URL. So transmission is basically served under the root (/), e.g.:
|
||||
#
|
||||
# http://10.0.10.110:8123/api/hassio_ingress/rQEi5X4zJFTmZ82ghplDjsx2AoK3r2lqx0zZHHjZ69Q/
|
||||
#
|
||||
# As the web UI uses a relative path when resolving the RPC endpoint, it basically becomes:
|
||||
#
|
||||
# http://10.0.10.110:8123/api/hassio_ingress/rQEi5X4zJFTmZ82ghplDjsx2AoK3r2lqx0zZHHjZ69Q/../rpc
|
||||
#
|
||||
# which obviously is:
|
||||
#
|
||||
# http://10.0.10.110:8123/api/hassio_ingress
|
||||
#
|
||||
# This will not work. The sed statement below changes the way the RPC endpoint is determined by keeping the regular endpoint
|
||||
# when accessing transmission as usual, but stripping the relative part when using ingress.
|
||||
RUN sed -i 's|'"'"'\.\./rpc'"'"'|window.location.pathname.endsWith("/web/") ? "../rpc" : "rpc"|' /usr/share/transmission/web/javascript/remote.js
|
||||
|
||||
# Build arugments
|
||||
ARG BUILD_ARCH
|
||||
ARG BUILD_DATE
|
||||
ARG BUILD_REF
|
||||
ARG BUILD_VERSION
|
||||
|
||||
# Labels
|
||||
LABEL \
|
||||
io.hass.name="Transmission" \
|
||||
io.hass.description="The torrent client for Hass.io with OpenVPN support" \
|
||||
io.hass.arch="${BUILD_ARCH}" \
|
||||
io.hass.type="addon" \
|
||||
io.hass.version=${BUILD_VERSION} \
|
||||
maintainer="Pierrick Rouxel <pierrickrouxel@addons.community>" \
|
||||
org.label-schema.description="The torrent client for Hass.io" \
|
||||
org.label-schema.build-date=${BUILD_DATE} \
|
||||
org.label-schema.name="Transmission" \
|
||||
org.label-schema.schema-version="1.0" \
|
||||
org.label-schema.url="https://github.com/pierrickrouxel" \
|
||||
org.label-schema.usage="https://github.com/pierrickrouxel/hassio-addon-transmission/tree/master/README.md" \
|
||||
org.label-schema.vcs-ref=${BUILD_REF} \
|
||||
org.label-schema.vcs-url="https://github.com/pierrickrouxel" \
|
||||
org.label-schema.vendor="Community Hass.io Addons"
|
||||
VOLUME [ "/data" ]
|
||||
|
||||
27
transmission/README.md
Normal file
27
transmission/README.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# Hassio Add-ons by alexbelgium: Transmission
|
||||
|
||||
## About
|
||||
|
||||
Transmission is designed for easy, powerful use. Transmission has the features you want from a BitTorrent client: encryption, a web interface, peer exchange, magnet links, DHT, <20>TP, UPnP and NAT-PMP port forwarding, webseed support, watch directories, tracker editing, global and per-torrent speed limits, and more.
|
||||
|
||||
This addon is based on the [docker image](https://github.com/linuxserver/transmission) from linuxserver.io.
|
||||
|
||||
## Installation
|
||||
|
||||
The installation of this add-on is pretty straightforward and not different in
|
||||
comparison to installing any other Hass.io add-on.
|
||||
|
||||
1. [Add my Hass.io add-ons repository][repository] to your Hass.io instance.
|
||||
1. Install this add-on.
|
||||
1. Click the `Save` button to store your configuration.
|
||||
1. Start the add-on.
|
||||
1. Check the logs of the add-on to see if everything went well.
|
||||
1. Carefully configure the add-on to your preferences, see the official documentation for for that.
|
||||
|
||||
|
||||
## Configuration
|
||||
|
||||
Webui can be found at `<your-ip>:9091`.
|
||||
|
||||
|
||||
[repository]: https://github.com/alexbelgium/hassio-addons
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"squash": false,
|
||||
"build_from": {
|
||||
"aarch64": "hassioaddons/base-aarch64:8.0.1",
|
||||
"amd64": "hassioaddons/base-amd64:8.0.1",
|
||||
"armhf": "hassioaddons/base-armhf:8.0.1",
|
||||
"armv7": "hassioaddons/base-armv7:8.0.1",
|
||||
"i386": "hassioaddons/base-i386:8.0.1"
|
||||
"armv7": "linuxserver/transmission:arm32v7-3.00-r0-ls69",
|
||||
"armhf": "linuxserver/transmission:arm32v7-3.00-r0-ls69",
|
||||
"aarch64": "linuxserver/code-server:arm64v8-3.00-r0-ls69",
|
||||
"amd64": "linuxserver/code-server:amd64-3.00-r0-ls69"
|
||||
},
|
||||
"squash": false,
|
||||
"args": {}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,67 +1,47 @@
|
||||
{
|
||||
"name": "Transmission NAS",
|
||||
"version": "1.2",
|
||||
"slug": "transmission",
|
||||
"description": "The torrent client for Hass.io with OpenVPN support",
|
||||
"url": "https://github.com/pierrickrouxel/hassio-addon-transmission",
|
||||
"webui": "http://[HOST]:[PORT:9091]/transmission/web/",
|
||||
"startup": "services",
|
||||
"ingress": "true",
|
||||
"ingress_port": 8099,
|
||||
"panel_icon": "mdi:progress-download",
|
||||
"panel_title": "Transmission",
|
||||
"arch": ["armhf", "armv7", "aarch64", "amd64", "i386"],
|
||||
"map": [
|
||||
"config:rw",
|
||||
"share:rw",
|
||||
"media:rw",
|
||||
"ssl"
|
||||
],
|
||||
"boot": "auto",
|
||||
"name": "Transmission",
|
||||
"version": "3.00-r0-ls69",
|
||||
"slug": "transmission",
|
||||
"description": "The torrent client for Hass.io",
|
||||
"url": "https://hub.docker.com/alexbelgium/transmission",
|
||||
"startup": "services",
|
||||
"arch": [
|
||||
"aarch64",
|
||||
"amd64",
|
||||
"armv7",
|
||||
"armhf"
|
||||
],
|
||||
"ports": {
|
||||
"9091/tcp": null,
|
||||
"9091/tcp": 9091,
|
||||
"51413/tcp": 51413,
|
||||
"51413/udp": 51413
|
||||
},
|
||||
"ports_description": {
|
||||
"9091/tcp": "Web UI port (Not required for Hass.io Ingress)",
|
||||
"9091/tcp": "Web UI port",
|
||||
"51413/tcp": "Peer port (setup port forwarding to this port)",
|
||||
"51413/udp": "Peer port (setup port forwarding to this port)"
|
||||
},
|
||||
"privileged": [
|
||||
"NET_ADMIN"
|
||||
],
|
||||
"devices": [
|
||||
"/dev/net/tun:/dev/net/tun:rwm"
|
||||
],
|
||||
"privileged": ["SYS_ADMIN", "DAC_READ_SEARCH"],
|
||||
"full_access": true,
|
||||
"hassio_api": true,
|
||||
"homeassistant_api": false,
|
||||
"host_network": false,
|
||||
"options": {
|
||||
"log_level": "info",
|
||||
"authentication_required": false,
|
||||
"username": "",
|
||||
"password": "",
|
||||
"localdisks": ["sda1"],
|
||||
"openvpn_enabled": false,
|
||||
"openvpn_config": "",
|
||||
"openvpn_username": "",
|
||||
"openvpn_password": ""
|
||||
},
|
||||
"schema": {
|
||||
"log_level": "match(^(trace|debug|info|notice|warning|error|fatal)$)",
|
||||
"authentication_required": "bool",
|
||||
"username": "str",
|
||||
"password": "str",
|
||||
"localdisks": ["str"],
|
||||
"openvpn_enabled": "bool",
|
||||
"openvpn_config": "str",
|
||||
"openvpn_username": "str",
|
||||
"openvpn_password": "str"
|
||||
},
|
||||
"environment": {
|
||||
"LOG_FORMAT": "{LEVEL}: {MESSAGE}"
|
||||
}
|
||||
"map": [
|
||||
"config:rw",
|
||||
"share:rw",
|
||||
"media:rw",
|
||||
"ssl"
|
||||
],
|
||||
"webui": "http://[HOST]:[PORT:8099]",
|
||||
"boot": "auto",
|
||||
"environment": {
|
||||
"PUID": 0,
|
||||
"PGID": 0
|
||||
},
|
||||
"options": {
|
||||
"PUID": 0,
|
||||
"PGID": 0,
|
||||
"TRANSMISSION_WEB_HOME": "/combustion-release/"
|
||||
},
|
||||
"schema": {
|
||||
"PUID": "int",
|
||||
"PGID": "int",
|
||||
"TRANSMISSION_WEB_HOME": "str?",
|
||||
"TZ": "str?"
|
||||
}
|
||||
}
|
||||
|
||||
59
transmission_nas/Dockerfile
Normal file
59
transmission_nas/Dockerfile
Normal file
@@ -0,0 +1,59 @@
|
||||
ARG BUILD_FROM=hassioaddons/base:8.0.1
|
||||
# hadolint ignore=DL3006
|
||||
FROM ${BUILD_FROM}
|
||||
|
||||
# Copy root filesystem
|
||||
COPY rootfs /
|
||||
|
||||
# Setup base
|
||||
RUN apk add --no-cache \
|
||||
coreutils \
|
||||
nginx \
|
||||
transmission-daemon \
|
||||
openvpn
|
||||
# Small hack needed for ingress support
|
||||
#
|
||||
# Transmission always uses "transmission" as a subdirectory in the URL, so the web interface can for instance be found at:
|
||||
#
|
||||
# http://<server>/transmission/web/
|
||||
#
|
||||
# The same goes for the RPC API, which is exposed under /transmission/rpc. When using ingress, this is not the case however
|
||||
# and "transmission" directory is not part of the URL. So transmission is basically served under the root (/), e.g.:
|
||||
#
|
||||
# http://10.0.10.110:8123/api/hassio_ingress/rQEi5X4zJFTmZ82ghplDjsx2AoK3r2lqx0zZHHjZ69Q/
|
||||
#
|
||||
# As the web UI uses a relative path when resolving the RPC endpoint, it basically becomes:
|
||||
#
|
||||
# http://10.0.10.110:8123/api/hassio_ingress/rQEi5X4zJFTmZ82ghplDjsx2AoK3r2lqx0zZHHjZ69Q/../rpc
|
||||
#
|
||||
# which obviously is:
|
||||
#
|
||||
# http://10.0.10.110:8123/api/hassio_ingress
|
||||
#
|
||||
# This will not work. The sed statement below changes the way the RPC endpoint is determined by keeping the regular endpoint
|
||||
# when accessing transmission as usual, but stripping the relative part when using ingress.
|
||||
RUN sed -i 's|'"'"'\.\./rpc'"'"'|window.location.pathname.endsWith("/web/") ? "../rpc" : "rpc"|' /usr/share/transmission/web/javascript/remote.js
|
||||
|
||||
# Build arugments
|
||||
ARG BUILD_ARCH
|
||||
ARG BUILD_DATE
|
||||
ARG BUILD_REF
|
||||
ARG BUILD_VERSION
|
||||
|
||||
# Labels
|
||||
LABEL \
|
||||
io.hass.name="Transmission" \
|
||||
io.hass.description="The torrent client for Hass.io with OpenVPN support" \
|
||||
io.hass.arch="${BUILD_ARCH}" \
|
||||
io.hass.type="addon" \
|
||||
io.hass.version=${BUILD_VERSION} \
|
||||
maintainer="Pierrick Rouxel <pierrickrouxel@addons.community>" \
|
||||
org.label-schema.description="The torrent client for Hass.io" \
|
||||
org.label-schema.build-date=${BUILD_DATE} \
|
||||
org.label-schema.name="Transmission" \
|
||||
org.label-schema.schema-version="1.0" \
|
||||
org.label-schema.url="https://github.com/pierrickrouxel" \
|
||||
org.label-schema.usage="https://github.com/pierrickrouxel/hassio-addon-transmission/tree/master/README.md" \
|
||||
org.label-schema.vcs-ref=${BUILD_REF} \
|
||||
org.label-schema.vcs-url="https://github.com/pierrickrouxel" \
|
||||
org.label-schema.vendor="Community Hass.io Addons"
|
||||
11
transmission_nas/build.json
Normal file
11
transmission_nas/build.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"squash": false,
|
||||
"build_from": {
|
||||
"aarch64": "hassioaddons/base-aarch64:8.0.1",
|
||||
"amd64": "hassioaddons/base-amd64:8.0.1",
|
||||
"armhf": "hassioaddons/base-armhf:8.0.1",
|
||||
"armv7": "hassioaddons/base-armv7:8.0.1",
|
||||
"i386": "hassioaddons/base-i386:8.0.1"
|
||||
},
|
||||
"args": {}
|
||||
}
|
||||
67
transmission_nas/config.json
Normal file
67
transmission_nas/config.json
Normal file
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"name": "Transmission NAS",
|
||||
"version": "1.2",
|
||||
"slug": "transmission_nas",
|
||||
"description": "The torrent client for Hass.io with OpenVPN support",
|
||||
"url": "https://github.com/pierrickrouxel/hassio-addon-transmission",
|
||||
"webui": "http://[HOST]:[PORT:9091]/transmission/web/",
|
||||
"startup": "services",
|
||||
"ingress": "true",
|
||||
"ingress_port": 8099,
|
||||
"panel_icon": "mdi:progress-download",
|
||||
"panel_title": "Transmission",
|
||||
"arch": ["armhf", "armv7", "aarch64", "amd64", "i386"],
|
||||
"map": [
|
||||
"config:rw",
|
||||
"share:rw",
|
||||
"media:rw",
|
||||
"ssl"
|
||||
],
|
||||
"boot": "auto",
|
||||
"ports": {
|
||||
"9091/tcp": null,
|
||||
"51413/tcp": 51413,
|
||||
"51413/udp": 51413
|
||||
},
|
||||
"ports_description": {
|
||||
"9091/tcp": "Web UI port (Not required for Hass.io Ingress)",
|
||||
"51413/tcp": "Peer port (setup port forwarding to this port)",
|
||||
"51413/udp": "Peer port (setup port forwarding to this port)"
|
||||
},
|
||||
"privileged": [
|
||||
"NET_ADMIN"
|
||||
],
|
||||
"devices": [
|
||||
"/dev/net/tun:/dev/net/tun:rwm"
|
||||
],
|
||||
"privileged": ["SYS_ADMIN", "DAC_READ_SEARCH"],
|
||||
"full_access": true,
|
||||
"hassio_api": true,
|
||||
"homeassistant_api": false,
|
||||
"host_network": false,
|
||||
"options": {
|
||||
"log_level": "info",
|
||||
"authentication_required": false,
|
||||
"username": "",
|
||||
"password": "",
|
||||
"localdisks": ["sda1"],
|
||||
"openvpn_enabled": false,
|
||||
"openvpn_config": "",
|
||||
"openvpn_username": "",
|
||||
"openvpn_password": ""
|
||||
},
|
||||
"schema": {
|
||||
"log_level": "match(^(trace|debug|info|notice|warning|error|fatal)$)",
|
||||
"authentication_required": "bool",
|
||||
"username": "str",
|
||||
"password": "str",
|
||||
"localdisks": ["str"],
|
||||
"openvpn_enabled": "bool",
|
||||
"openvpn_config": "str",
|
||||
"openvpn_username": "str",
|
||||
"openvpn_password": "str"
|
||||
},
|
||||
"environment": {
|
||||
"LOG_FORMAT": "{LEVEL}: {MESSAGE}"
|
||||
}
|
||||
}
|
||||
BIN
transmission_nas/icon.png
Normal file
BIN
transmission_nas/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
BIN
transmission_nas/logo.png
Normal file
BIN
transmission_nas/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
Reference in New Issue
Block a user