UNMAINTAINED

This commit is contained in:
hoellen
2018-01-22 22:30:12 +01:00
parent 792ab407e1
commit afd3d476fd
49 changed files with 0 additions and 192 deletions

View File

@ -0,0 +1,32 @@
FROM alpine:3.6
ARG VERSION=6.2
ENV UID=991 GID=991
WORKDIR /libresonic
RUN echo "@community https://nl.alpinelinux.org/alpine/v3.6/community" >> /etc/apk/repositories \
&& apk -U upgrade && apk add \
ffmpeg \
su-exec \
libressl \
ca-certificates \
openjdk8-jre@community \
tini \
&& wget -q https://github.com/Libresonic/libresonic/releases/download/v${VERSION}/libresonic-v${VERSION}.war -O libresonic.war \
&& rm -f /var/cache/apk/*
COPY run.sh /usr/local/bin/run.sh
RUN chmod +x /usr/local/bin/run.sh
EXPOSE 4040
VOLUME /data /musics /playlists /podcasts
LABEL description="Open source media streamer" \
libresonic="Libresonic v$VERSION" \
maintainer="Wonderfall <wonderfall@targaryen.house>"
CMD ["run.sh"]

View File

@ -0,0 +1,42 @@
## wonderfall/libresonic
![](https://img.targaryen.house/wMkrBCxj/Fv8JINdd.png)
#### What is Libresonic?
Libresonic is an open-source web-based media streamer and jukebox. Supports MP3, OGG, AAC and other streamable audio and video formats. Indeed, this build comes with **transcoding abilities**. More info here : https://libresonic.github.io/
#### Build-time variables
- **VERSION** : version of libresonic
#### Environment variables
- **GID** : subsonic group id.
- **UID** : subsonic user id.
- **HTTPS_PORT** : set if you access Libresonic through HTTPS *(default : 0 = disabled)*
#### Volumes
- **/musics** : your music files
- **/data** : subsonic data
#### Port
- 4040
#### Reverse proxy
https://github.com/Wonderfall/dockerfiles/tree/master/reverse
https://github.com/hardware/mailserver/wiki/Reverse-proxy-configuration
Libresonic does not support SSL/TLS by itself. If you want to use Libresonic through https, this is what I'm using :
```
location / {
proxy_pass http://libresonic:4040;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header Host $http_host;
proxy_max_temp_file_size 0;
proxy_redirect http:// https://;
}
```

View File

@ -0,0 +1,22 @@
#!/bin/sh
mkdir -p /data/transcode
ln -s /usr/bin/ffmpeg /data/transcode/ffmpeg
ln -s /usr/bin/lame /data/transcode/lame
chown -R $UID:$GID /data /playlists /libresonic
exec su-exec $UID:$GID tini -- \
java -Xmx256m \
-Dserver.host=0.0.0.0 \
-Dserver.port=4040 \
-Dserver.contextPath=/ \
-Dlibresonic.home=/data \
-Dlibresonic.host=0.0.0.0 \
-Dlibresonic.port=4040 \
-Dlibresonic.contextPath=/ \
-Dlibresonic.defaultMusicFolder=/musics \
-Dlibresonic.defaultPodcastFolder=/podcasts \
-Dlibresonic.defaultPlaylistFolder=/playlists \
-Djava.awt.headless=true \
-jar libresonic.war

View File

@ -0,0 +1,58 @@
FROM alpine:edge
ARG LYCHEE_VERSION=3.1.6
ENV UID=991 GID=991
RUN echo "@testing https://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
&& BUILD_DEPS=" \
imagemagick-dev \
tar \
libressl \
ca-certificates \
build-base \
autoconf \
pcre-dev \
libtool" \
&& apk -U upgrade && apk add \
${BUILD_DEPS} \
nginx \
php7.1-mbstring@testing \
php7.1-fpm@testing \
php7.1-exif@testing \
php7.1-gd@testing \
php7.1-json@testing \
php7.1-mysqli@testing \
php7.1-zip@testing \
php7.1-session@testing \
php7.1-pear@testing \
php7.1-dev@testing \
s6 \
su-exec \
imagemagick \
&& pecl install imagick \
&& echo "extension=imagick.so" > /etc/php7.1/conf.d/imagick.ini \
&& sed -i -e "s/max_execution_time = 30/max_execution_time = 200/g" \
-e "s/post_max_size = 8M/post_max_size = 100M/g" \
-e "s/upload_max_filesize = 2M/upload_max_filesize = 20M/g" \
-e "s/memory_limit = 256M/memory_limit = 512M/g" \
/etc/php7.1/php.ini \
&& mkdir /lychee && cd /lychee \
&& wget -qO- https://github.com/electerious/Lychee/archive/v${LYCHEE_VERSION}.tar.gz | tar xz --strip 1 \
&& apk del ${BUILD_DEPS} php7.1-pear php7.1-dev \
&& rm -rf /var/cache/apk/* /tmp/*
COPY nginx.conf /etc/nginx/nginx.conf
COPY php-fpm.conf /etc/php7.1/php-fpm.conf
COPY s6.d /etc/s6.d
COPY run.sh /usr/local/bin/run.sh
RUN chmod +x /usr/local/bin/run.sh /etc/s6.d/*/* /etc/s6.d/.s6-svscan/*
VOLUME /lychee/uploads /lychee/data
EXPOSE 8888
LABEL maintainer="Wonderfall <wonderfall@targaryen.house>"
CMD ["run.sh"]

View File

@ -0,0 +1,26 @@
## wonderfall/lychee
![](http://lychee.electerious.com/assets/images/showcase.jpg)
#### What is this?
Lychee is a free photo-management tool, which runs on your server or web-space. Installing is a matter of seconds. Upload, manage and share photos like from a native application. Lychee comes with everything you need and all your photos are stored securely.
#### Features
- Based on Alpine Linux.
- nginx + PHP7.
- Active Imagemagick + pecl ext.
#### Build-time variables
- **LYCHEE_VERSION** : version of Lychee.
- **IMAGICK_EXT_VERSION** : version of imagick pecl extension.
#### Environment variables
- **UID** : lychee user id *(default : 991)*.
- **GID** : lychee group id *(default : 991)*.
#### Volumes
- **/lychee/uploads** : uploads.
- **/lychee/data** : data files.
#### Ports
- **8888** [(reverse proxy!)](https://github.com/hardware/mailserver/wiki/Reverse-proxy-configuration)

View File

@ -0,0 +1,88 @@
worker_processes auto;
pid /tmp/nginx.pid;
daemon off;
events {
worker_connections 1024;
use epoll;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log off;
error_log /tmp/ngx_error.log error;
sendfile on;
keepalive_timeout 15;
keepalive_disable msie6;
keepalive_requests 100;
tcp_nopush on;
tcp_nodelay on;
server_tokens off;
fastcgi_temp_path /tmp/fastcgi 1 2;
client_body_temp_path /tmp/client_body 1 2;
proxy_temp_path /tmp/proxy 1 2;
uwsgi_temp_path /tmp/uwsgi 1 2;
scgi_temp_path /tmp/scgi 1 2;
gzip on;
gzip_comp_level 5;
gzip_min_length 512;
gzip_buffers 4 8k;
gzip_proxied any;
gzip_vary on;
gzip_disable "msie6";
gzip_types
text/css
text/javascript
text/xml
text/plain
text/x-component
application/javascript
application/x-javascript
application/json
application/xml
application/rss+xml
application/vnd.ms-fontobject
font/truetype
font/opentype
image/svg+xml;
server {
listen 8888;
root /lychee;
index index.php index.html;
client_max_body_size 100M;
location / {
try_files $uri $uri/ /index.html;
}
location ~* \.(?:ico|css|js|gif|jpe?g|png|ttf|woff)\$ {
access_log off;
expires 30d;
add_header Pragma public;
add_header Cache-Control "public, mustrevalidate, proxy-revalidate";
}
location ~ \.php$ {
fastcgi_split_path_info ^(.*\.php)(/.*)?$;
fastcgi_pass unix:/tmp/php-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors off;
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;
}
location ~ /\.ht {
deny all;
}
}
}

View File

@ -0,0 +1,11 @@
[global]
daemonize = no
[www]
listen = /tmp/php-fpm.sock
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
chdir = /

View File

@ -0,0 +1,4 @@
#!/bin/sh
mkdir /lychee/uploads/big /lychee/uploads/import /lychee/uploads/medium /lychee/uploads/thumb
chown -R $UID:$GID /lychee /etc/nginx /etc/php7.1 /var/log /var/lib/nginx /tmp /etc/s6.d
exec su-exec $UID:$GID /bin/s6-svscan /etc/s6.d

View File

@ -0,0 +1,3 @@
#!/bin/sh
exit 0

View File

@ -0,0 +1,2 @@
#!/bin/sh
exec nginx

View File

@ -0,0 +1,2 @@
#!/bin/sh
exec php-fpm7.1

View File

@ -0,0 +1,93 @@
FROM alpine:3.6
ARG VERSION=master
ARG REPOSITORY=tootsuite/mastodon
ARG LIBICONV_VERSION=1.15
ENV UID=991 GID=991 \
RUN_DB_MIGRATIONS=true \
SIDEKIQ_WORKERS=5 \
RAILS_SERVE_STATIC_FILES=true \
RAILS_ENV=production \
NODE_ENV=production \
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/mastodon/bin
WORKDIR /mastodon
# Install dependencies
RUN apk -U upgrade \
&& apk add \
ca-certificates \
ffmpeg \
file \
git \
icu-libs \
imagemagick \
libidn \
libpq \
libressl \
nodejs-current-npm \
nodejs-current \
protobuf \
ruby \
ruby-bigdecimal \
ruby-io-console \
ruby-irb \
ruby-json \
s6 \
su-exec \
# Install build dependencies
&& apk add -t build-dependencies \
build-base \
icu-dev \
libffi-dev \
libidn-dev \
libtool \
postgresql-dev \
protobuf-dev \
python \
ruby-dev \
ruby-rdoc \
tar \
yarn \
# Update CA certificates
&& update-ca-certificates \
# Install GNU Libiconv
&& wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${LIBICONV_VERSION}.tar.gz -O /tmp/libiconv-${LIBICONV_VERSION}.tar.gz \
&& mkdir /tmp/src && tar xzf /tmp/libiconv-${LIBICONV_VERSION}.tar.gz -C /tmp/src \
&& cd /tmp/src/libiconv-${LIBICONV_VERSION} \
&& ./configure --prefix=/usr/local \
&& make -j$(getconf _NPROCESSORS_ONLN) && make install && libtool --finish /usr/local/lib \
# Install Mastodon
&& cd /mastodon \
&& wget -qO- https://github.com/${REPOSITORY}/archive/${VERSION}.tar.gz | tar xz --strip 1 \
&& gem install bundler \
&& bundle install -j$(getconf _NPROCESSORS_ONLN) --deployment --clean --no-cache --without test development \
&& yarn --ignore-optional --pure-lockfile \
# Precompile Mastodon assets
&& SECRET_KEY_BASE=$(rake secret) SMTP_FROM_ADDRESS= rake assets:precompile \
&& mv public/assets /tmp/assets && mv public/packs /tmp/packs \
# Clean
&& npm -g cache clean && yarn cache clean \
&& apk del build-dependencies \
&& rm -rf /var/cache/apk/* /tmp/src
COPY rootfs /
RUN chmod +x /usr/local/bin/* /etc/s6.d/*/* /etc/s6.d/.s6-svscan/*
VOLUME /mastodon/public/system /mastodon/public/assets /mastodon/public/packs /mastodon/log
EXPOSE 3000 4000
LABEL maintainer="Wonderfall <wonderfall@targaryen.house>" \
description="A GNU Social-compatible microblogging server"
ENTRYPOINT ["/usr/local/bin/run"]
CMD ["/bin/s6-svscan", "/etc/s6.d"]

View File

@ -0,0 +1,93 @@
FROM alpine:3.6
ARG VERSION=v1.6.0
ARG REPOSITORY=tootsuite/mastodon
ARG LIBICONV_VERSION=1.15
ENV UID=991 GID=991 \
RUN_DB_MIGRATIONS=true \
SIDEKIQ_WORKERS=5 \
RAILS_SERVE_STATIC_FILES=true \
RAILS_ENV=production \
NODE_ENV=production \
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/mastodon/bin
WORKDIR /mastodon
# Install dependencies
RUN apk -U upgrade \
&& apk add \
ca-certificates \
ffmpeg \
file \
git \
icu-libs \
imagemagick \
libidn \
libpq \
libressl \
nodejs-current-npm \
nodejs-current \
protobuf \
ruby \
ruby-bigdecimal \
ruby-io-console \
ruby-irb \
ruby-json \
s6 \
su-exec \
# Install build dependencies
&& apk add -t build-dependencies \
build-base \
icu-dev \
libffi-dev \
libidn-dev \
libtool \
postgresql-dev \
protobuf-dev \
python \
ruby-dev \
ruby-rdoc \
tar \
yarn \
# Update CA certificates
&& update-ca-certificates \
# Install GNU Libiconv
&& wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${LIBICONV_VERSION}.tar.gz -O /tmp/libiconv-${LIBICONV_VERSION}.tar.gz \
&& mkdir /tmp/src && tar xzf /tmp/libiconv-${LIBICONV_VERSION}.tar.gz -C /tmp/src \
&& cd /tmp/src/libiconv-${LIBICONV_VERSION} \
&& ./configure --prefix=/usr/local \
&& make -j$(getconf _NPROCESSORS_ONLN) && make install && libtool --finish /usr/local/lib \
# Install Mastodon
&& cd /mastodon \
&& wget -qO- https://github.com/${REPOSITORY}/archive/${VERSION}.tar.gz | tar xz --strip 1 \
&& gem install bundler \
&& bundle install -j$(getconf _NPROCESSORS_ONLN) --deployment --clean --no-cache --without test development \
&& yarn --ignore-optional --pure-lockfile \
# Precompile Mastodon assets
&& SECRET_KEY_BASE=$(rake secret) SMTP_FROM_ADDRESS= rake assets:precompile \
&& mv public/assets /tmp/assets && mv public/packs /tmp/packs \
# Clean
&& npm -g cache clean && yarn cache clean \
&& apk del build-dependencies \
&& rm -rf /var/cache/apk/* /tmp/src
COPY rootfs /
RUN chmod +x /usr/local/bin/* /etc/s6.d/*/* /etc/s6.d/.s6-svscan/*
VOLUME /mastodon/public/system /mastodon/public/assets /mastodon/public/packs /mastodon/log
EXPOSE 3000 4000
LABEL maintainer="Wonderfall <wonderfall@targaryen.house>" \
description="A GNU Social-compatible microblogging server"
ENTRYPOINT ["/usr/local/bin/run"]
CMD ["/bin/s6-svscan", "/etc/s6.d"]

View File

@ -0,0 +1,96 @@
FROM alpine:3.6
ARG VERSION=v1.6.0
ARG REPOSITORY=tootsuite/mastodon
ARG LIBICONV_VERSION=1.15
ENV UID=991 GID=991 \
RUN_DB_MIGRATIONS=true \
SIDEKIQ_WORKERS=5 \
RAILS_SERVE_STATIC_FILES=true \
RAILS_ENV=production \
NODE_ENV=production \
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/mastodon/bin
WORKDIR /mastodon
COPY targaryen /tmp/targaryen
# Install dependencies
RUN apk -U upgrade \
&& apk add \
ca-certificates \
ffmpeg \
file \
git \
icu-libs \
imagemagick \
libidn \
libpq \
libressl \
nodejs-current-npm \
nodejs-current \
protobuf \
ruby \
ruby-bigdecimal \
ruby-io-console \
ruby-irb \
ruby-json \
s6 \
su-exec \
# Install build dependencies
&& apk add -t build-dependencies \
build-base \
icu-dev \
libffi-dev \
libidn-dev \
libtool \
postgresql-dev \
protobuf-dev \
python \
ruby-dev \
ruby-rdoc \
tar \
yarn \
# Update CA certificates
&& update-ca-certificates \
# Install GNU Libiconv
&& wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${LIBICONV_VERSION}.tar.gz -O /tmp/libiconv-${LIBICONV_VERSION}.tar.gz \
&& mkdir /tmp/src && tar xzf /tmp/libiconv-${LIBICONV_VERSION}.tar.gz -C /tmp/src \
&& cd /tmp/src/libiconv-${LIBICONV_VERSION} \
&& ./configure --prefix=/usr/local \
&& make -j$(getconf _NPROCESSORS_ONLN) && make install && libtool --finish /usr/local/lib \
# Install Mastodon
&& cd /mastodon \
&& wget -qO- https://github.com/${REPOSITORY}/archive/${VERSION}.tar.gz | tar xz --strip 1 \
&& cp -R /tmp/targaryen/* . && chmod +x targaryen.sh && ./targaryen.sh \
&& gem install bundler \
&& bundle install -j$(getconf _NPROCESSORS_ONLN) --deployment --clean --no-cache --without test development \
&& yarn --ignore-optional --pure-lockfile \
# Precompile Mastodon assets
&& SECRET_KEY_BASE=$(rake secret) SMTP_FROM_ADDRESS= rake assets:precompile \
&& mv public/assets /tmp/assets && mv public/packs /tmp/packs \
# Clean
&& npm -g cache clean --force && yarn cache clean \
&& apk del build-dependencies \
&& rm -rf /var/cache/apk/* /tmp/src
COPY rootfs /
RUN chmod +x /usr/local/bin/* /etc/s6.d/*/* /etc/s6.d/.s6-svscan/*
VOLUME /mastodon/public/system /mastodon/public/assets /mastodon/public/packs /mastodon/log
EXPOSE 3000 4000
LABEL maintainer="Wonderfall <wonderfall@targaryen.house>" \
description="A GNU Social-compatible microblogging server"
ENTRYPOINT ["/usr/local/bin/run"]
CMD ["/bin/s6-svscan", "/etc/s6.d"]

View File

@ -0,0 +1,65 @@
## wonderfall/mastodon
![Mastodon](https://github.com/tootsuite/mastodon/blob/master/app/javascript/images/mastodon-getting-started.png?raw=true)
A GNU Social-compatible microblogging server : https://github.com/tootsuite/mastodon
#### Why this image?
This image is not the official one. The main difference you can notice is that all processes (web, streaming, sidekiq) are running in a single container, thanks to s6 (a supervision suite). Therefore it's easier to deploy, but not recommended for scaling on more than one machine.
#### Features
- Based on Alpine Linux 3.6.
- As lightweight as possible.
- All-in-one container (s6).
- Assets are precompiled.
- Database migrations can be run at startup.
- No root processes.
#### Docker Hub tags
- **master** : latest code for adventurers (builds daily on Docker Hub)
- **stable** : latest stable version (builds weekly on Docker Hub)
- **targaryen** : Targaryen-themed stable version (builds weekly on Docker Hub)
#### Build-time variables
- **VERSION** : version of Mastodon, can be `v1.4.1` or `master`. *(default : master)*
- **REPOSITORY** : location of the code *(default : tootsuite/mastodon)*
#### Environment variables you should change
- **UID** : mastodon user id *(default : 991)*
- **GID** : mastodon group id *(default : 991)*
- **RUN_DB_MIGRATIONS** : run `rake db:migrate` at startup *(default : true)*
- **SIDEKIQ_WORKERS** : number of Sidekiq workers *(default : 5)*
- Other environment variables : https://github.com/tootsuite/mastodon/blob/master/.env.production.sample
#### Volumes
- **/mastodon/public/system** : shit like media attachments, avatars, etc.
- **/mastodon/public/assets** : Mastodon assets
- **/mastodon/public/packs** : Mastodon assets
- **/mastodon/log** : Mastodon logfiles (mount if you prefer to)
#### Ports
- **3000** : Mastodon web
- **4000** : Mastodon streaming
#### docker-compose sample
```
mastodon:
image: wonderfall/mastodon:stable
restart: always
container_name: mastodon
env_file: /home/docker/mastodon/.env.production
environment:
- WEB_CONCURRENCY=16
- MAX_THREADS=20
- SIDEKIQ_WORKERS=25
- RUN_DB_MIGRATIONS=true
links:
- mastodon-pgb
- mastodon-redis
volumes:
- /home/docker/mastodon/public/system:/mastodon/public/system
- /home/docker/mastodon/public/assets:/mastodon/public/assets
- /home/docker/mastodon/public/packs:/mastodon/public/packs
```

View File

@ -0,0 +1,2 @@
#!/bin/sh
exit 0

View File

@ -0,0 +1,3 @@
#!/bin/sh
cd /mastodon
exec bundle exec sidekiq -c $SIDEKIQ_WORKERS -q default -q push -q pull -q mailers > ./log/sidekiq.log 2>&1

View File

@ -0,0 +1,3 @@
#!/bin/sh
cd /mastodon
exec npm run start > ./log/streaming.log 2>&1

View File

@ -0,0 +1,3 @@
#!/bin/sh
cd /mastodon
exec bundle exec puma -C config/puma.rb > ./log/web.log 2>&1

View File

@ -0,0 +1,56 @@
#!/bin/sh
### 1. Adds local user (UID and GID are provided from environment variables).
### 2. Moves precompiled assets into them.
### 3. Updates permissions, except for ./public/system (should be chown on previous installations).
### NOTE : this can take a long time if overlay2 is the storage-driver (issue #3194).
### 4. If $RUN_DB_MIGRATIONS is set to true, runs the database migrations task.
### 5. Executes the command as that user.
echo "
---------------------------------------------
_____ _ _
| |___ ___| |_ ___ _| |___ ___
| | | | .'|_ -| _| . | . | . | |
|_|_|_|__,|___|_| |___|___|___|_|_|
A GNU Social-compatible microblogging server
https://github.com/tootsuite/mastodon
17j2g7vpgHhLuXhN4bueZFCvdxxieyRVWd
---------------------------------------------
UID/GID settings
---------------------------------------------
User ID : ${UID}
Group ID : ${GID}
---------------------------------------------
Logs location
---------------------------------------------
Sidekiq : /mastodon/log/sidekiq.log
Streaming : /mastodon/log/streaming.log
Web : /mastodon/log/web.log
---------------------------------------------
"
echo "Creating mastodon user..."
addgroup -g ${GID} mastodon &>/dev/null
adduser -h /mastodon -s /bin/sh -D -G mastodon -u ${UID} mastodon &>/dev/null
echo "Moving assets to volumes..."
cp -r /tmp/assets/* public/assets &>/dev/null
cp -r /tmp/packs/* public/packs &>/dev/null
echo "Updating permissions, this can take a while..."
find /mastodon -path /mastodon/public/system -prune -o -not -user mastodon -not -group mastodon -print0 | xargs -0 chown -f mastodon:mastodon
chown -R mastodon:mastodon /etc/s6.d
if [ "$RUN_DB_MIGRATIONS" == "true" ]; then
echo "Running database migrations task..."
su-exec mastodon:mastodon rake db:migrate
fi
echo "Executing process(es)..."
if [ '$@' == '' ]; then
exec su-exec mastodon:mastodon /bin/s6-svscan /etc/s6.d
else
exec su-exec mastodon:mastodon "$@"
fi

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 306 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 306 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -0,0 +1,29 @@
// Commonly used web colors
$black: #000000; // Black
$white: #ffffff; // White
$success-green: #79bd9a; // Padua
$error-red: #df405a; // Cerise
$warning-red: #ff5050; // Sunset Orange
$gold-star: #ca8f04; // Dark Goldenrod
// Values from the classic Mastodon UI
$classic-base-color: #282828; // Midnight Grey
$classic-primary-color: #c89b9b; // Echo Red
$classic-secondary-color: #e8d9d9; // Pattens Red
$classic-highlight-color: #d92b2b; // Summer RedSky
// Variables for defaults in UI
$base-shadow-color: $black !default;
$base-overlay-background: $black !default;
$base-border-color: $white !default;
$simple-background-color: $white !default;
$primary-text-color: $white !default;
$valid-value-color: $success-green !default;
$error-value-color: $error-red !default;
// Tell UI to use selected colors
$ui-base-color: $classic-base-color !default; // Darkest
$ui-base-lighter-color: lighten($ui-base-color, 26%) !default; // Lighter darkest
$ui-primary-color: $classic-primary-color !default; // Lighter
$ui-secondary-color: $classic-secondary-color !default; // Lightest
$ui-highlight-color: $classic-highlight-color !default; // Vibrant

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

View File

@ -0,0 +1,18 @@
#!/bin/sh
### Increase number of characters / toot
sed -i -e 's/500/800/g' \
app/javascript/mastodon/features/compose/components/compose_form.js \
app/validators/status_length_validator.rb \
storybook/stories/character_counter.story.js \
config/locales/*.yml
### Increase bio length
sed -i -e 's/160/400/g' \
app/javascript/packs/public.js \
app/models/account.rb \
app/views/settings/profiles/show.html.haml
### Dragon emoji
sed -i -e 's/1f602/1f432/g' \
app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js

View File

@ -0,0 +1,120 @@
FROM alpine:3.6
ARG RTORRENT_VER=0.9.6
ARG LIBTORRENT_VER=0.13.6
ARG MEDIAINFO_VER=0.7.99
ARG FILEBOT_VER=4.7.9
ARG CHROMAPRINT_VER=1.4.2
ARG LIBZEN_VER=0.4.37
ARG FLOOD_VER=1.0.0
ARG BUILD_CORES
ENV UID=991 GID=991 \
FLOOD_SECRET=supersecret \
CONTEXT_PATH=/ \
RTORRENT_SCGI=0 \
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
ENV FILEBOT_RENAME_METHOD="symlink" \
FILEBOT_RENAME_MOVIES="{n} ({y})" \
FILEBOT_RENAME_SERIES="{n}/Season {s.pad(2)}/{s00e00} - {t}" \
FILEBOT_RENAME_ANIMES="{n}/{e.pad(3)} - {t}" \
FILEBOT_RENAME_MUSICS="{artist}/{album}/{fn}"
RUN NB_CORES=${BUILD_CORES-`getconf _NPROCESSORS_CONF`} \
&& apk -U upgrade \
&& apk add -t build-dependencies \
build-base \
git \
libtool \
automake \
autoconf \
wget \
tar \
xz \
zlib-dev \
cppunit-dev \
libressl-dev \
ncurses-dev \
curl-dev \
binutils \
&& apk add \
ca-certificates \
curl \
ncurses \
libressl \
gzip \
zip \
zlib \
unrar \
s6 \
su-exec \
python \
nodejs \
nodejs-npm \
openjdk8-jre \
java-jna-native \
&& cd /tmp && mkdir libtorrent rtorrent \
&& cd libtorrent && wget -qO- https://github.com/rakshasa/libtorrent/archive/${LIBTORRENT_VER}.tar.gz | tar xz --strip 1 \
&& cd ../rtorrent && wget -qO- https://github.com/rakshasa/rtorrent/archive/${RTORRENT_VER}.tar.gz | tar xz --strip 1 \
&& cd /tmp \
&& git clone https://github.com/mirror/xmlrpc-c.git \
&& git clone https://github.com/Rudde/mktorrent.git \
&& git clone https://github.com/acoustid/chromaprint.git \
&& cd /tmp/mktorrent && make -j ${NB_CORES} && make install \
&& cd /tmp/xmlrpc-c/stable && ./configure && make -j ${NB_CORES} && make install \
&& cd /tmp/libtorrent && ./autogen.sh && ./configure && make -j ${NB_CORES} && make install \
&& cd /tmp/rtorrent && ./autogen.sh && ./configure --with-xmlrpc-c && make -j ${NB_CORES} && make install \
&& cd /tmp \
&& wget -q http://mediaarea.net/download/binary/mediainfo/${MEDIAINFO_VER}/MediaInfo_CLI_${MEDIAINFO_VER}_GNU_FromSource.tar.gz \
&& wget -q http://mediaarea.net/download/binary/libmediainfo0/${MEDIAINFO_VER}/MediaInfo_DLL_${MEDIAINFO_VER}_GNU_FromSource.tar.gz \
&& wget -q https://github.com/MediaArea/ZenLib/archive/v${LIBZEN_VER}.tar.gz -O libzen.tar.gz \
&& tar xzf MediaInfo_DLL_${MEDIAINFO_VER}_GNU_FromSource.tar.gz \
&& tar xzf MediaInfo_CLI_${MEDIAINFO_VER}_GNU_FromSource.tar.gz \
&& tar xzf libzen.tar.gz \
&& cd /tmp/ZenLib-${LIBZEN_VER}/Project/GNU/Library \
&& ./autogen.sh && ./configure --prefix=/usr --enable-shared --disable-static && make && make install \
&& cd /tmp/MediaInfo_DLL_GNU_FromSource && ./SO_Compile.sh \
&& cd /tmp/MediaInfo_DLL_GNU_FromSource/ZenLib/Project/GNU/Library && make install \
&& cd /tmp/MediaInfo_DLL_GNU_FromSource/MediaInfoLib/Project/GNU/Library && make install \
&& cd /tmp/MediaInfo_CLI_GNU_FromSource && ./CLI_Compile.sh \
&& cd /tmp/MediaInfo_CLI_GNU_FromSource/MediaInfo/Project/GNU/CLI && make install \
&& strip -s /usr/local/bin/rtorrent \
&& strip -s /usr/local/bin/mktorrent \
&& strip -s /usr/local/bin/mediainfo \
&& mkdir /filebot && cd /filebot \
&& wget https://github.com/acoustid/chromaprint/releases/download/v${CHROMAPRINT_VER}/chromaprint-fpcalc-${CHROMAPRINT_VER}-linux-x86_64.tar.gz \
&& tar xvf chromaprint-fpcalc-${CHROMAPRINT_VER}-linux-x86_64.tar.gz \
&& mv chromaprint-fpcalc-${CHROMAPRINT_VER}-linux-x86_64/fpcalc /usr/local/bin \
&& strip -s /usr/local/bin/fpcalc \
&& wget -q https://netcologne.dl.sourceforge.net/project/filebot/filebot/FileBot_${FILEBOT_VER}/FileBot_${FILEBOT_VER}-portable.tar.xz \
&& tar xJf FileBot_${FILEBOT_VER}-portable.tar.xz && rm FileBot_${FILEBOT_VER}-portable.tar.xz \
&& mkdir /usr/flood && cd /usr/flood && wget -qO- https://github.com/jfurrow/flood/archive/v${FLOOD_VER}.tar.gz | tar xz --strip 1 \
&& npm install --production \
&& ln -sf /usr/local/lib/libmediainfo.so.0.0.0 /filebot/lib/x86_64/libmediainfo.so \
&& ln -sf /usr/local/lib/libzen.la /filebot/lib/x86_64/libzen.so \
&& ln -sf /usr/local/bin/mediainfo /usr/bin/mediainfo \
&& apk del build-dependencies \
&& rm -rf /var/cache/apk/* /tmp/*
COPY config.js /usr/flood/
COPY s6.d /etc/s6.d
COPY run.sh /usr/bin/
COPY postdl /usr/bin/
COPY postrm /usr/bin/
COPY config.js /usr/flood/
COPY rtorrent.rc /home/torrent/.rtorrent.rc
RUN chmod +x /usr/bin/* /etc/s6.d/*/* /etc/s6.d/.s6-svscan/*
VOLUME /data /flood-db
EXPOSE 3000 49184 49184/udp
LABEL description="BitTorrent client with WebUI front-end" \
rtorrent="rTorrent BiTorrent client v$RTORRENT_VER" \
libtorrent="libtorrent v$LIBTORRENT_VER" \
filebot="Filebot v$FILEBOT_VER" \
maintainer="Wonderfall <wonderfall@targaryen.house>"
CMD ["run.sh"]

View File

@ -0,0 +1,40 @@
## wonderfall/rtorrent-flood
![](https://camo.githubusercontent.com/d8f5cb502f06e0ea1cc171550c2bed035293c1a9/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6a6f686e667572726f772e636f6d2f73686172652f666c6f6f642d73637265656e73686f742d612d303630362e706e67)
#### Main features
- Based on Alpine Linux.
- rTorrent and libtorrent are compiled from source.
- Provides by default a solid configuration.
- [Filebot](http://www.filebot.net/) is included, and creates symlinks in `/data/Media`.
- [Flood](https://github.com/jfurrow/flood), a modern web UI for rTorrent with a Node.js backend and React frontend.
#### Build-time variables
- **RTORRENT_VER** : rtorrent version
- **LIBTORRENT_VER** : libtorrent version
- **MEDIAINFO_VER** : libmediainfo version
- **FILEBOT_VER** : filebot version
- **BUILD_CORES** : number of cores used during build
#### Environment variables
- **UID** : user id (default : 991)
- **GID** : group id (defaut : 991)
- **FLOOD_SECRET** : flood secret key (defaut : mysupersecretkey) (CHANGE IT)
- **CONTEXT_PATH** : context path (base_URI) (default : /)
- **RTORRENT_SCGI** : SCGI port (default : 0 for use local socket)
- **PKG_CONFIG_PATH** : `/usr/local/lib/pkgconfig` (don't touch)
### Note
Run this container with tty mode enabled. In your `docker-compose.yml`, add `tty: true`. If you don't do this, [rtorrent will use 100% of CPU](https://github.com/Wonderfall/dockerfiles/issues/156).
#### Ports
- **49184** (bind it).
- **3000** [(reverse proxy!)](https://github.com/hardware/mailserver/wiki/Reverse-proxy-configuration)
#### Tags
- **latest** : latest versions of rTorrent/libtorrent.
- Use **$RTORRENT_VER-$LIBTORRENT_VER** to get specific versions of rTorrent/libtorrent.
#### Volumes
- **/data** : your downloaded torrents, session files, symlinks...
- **/flood-db** : Flood databases.

View File

@ -0,0 +1,17 @@
const CONFIG = {
baseURI: '<CONTEXT_PATH>',
dbCleanInterval: 1000 * 60 * 60,
dbPath: '/flood-db/',
floodServerPort: 3000,
maxHistoryStates: 30,
pollInterval: 1000 * 5,
secret: '<FLOOD_SECRET>',
scgi: {
host: 'localhost',
port: 5000,
socket: true,
socketPath: '/tmp/rtorrent.sock'
}
};
module.exports = CONFIG;

View File

@ -0,0 +1,27 @@
#!/bin/sh
# rtorrent.rc
# system.method.set_key=event.download.finished,filebot,"execute={rtorrent-postprocess.sh,$d.get_base_path=,$d.get_name=,$d.get_custom1=}"
TORRENT_PATH="$1"
TORRENT_NAME="$2"
TORRENT_LABEL="$(echo $3 | tr '[:upper:]' '[:lower:]')"
case $TORRENT_LABEL in
films|movies|film|movie)
/filebot/filebot.sh --db TheMovieDB -script fn:amc --output "/data/Media" --action <FILEBOT_RENAME_METHOD> --conflict skip -non-strict --log-file amc.log --def excludeList=amc.excludes unsorted=y "movieFormat=/data/Media/Movies/<FILEBOT_RENAME_MOVIES>" "ut_dir=$TORRENT_PATH" "ut_kind=multi" "ut_title=$TORRENT_NAME" "ut_label=Movie" &
;;
music|musics|musique|musiques)
/filebot/filebot.sh --db ID3 -script fn:amc --output "/data/Media" --action <FILEBOT_RENAME_METHOD> --conflict skip -non-strict --log-file amc.log --def excludeList=amc.excludes unsorted=y music=y "musicFormat=/data/Media/Music/<FILEBOT_RENAME_MUSICS>" "ut_dir=$TORRENT_PATH" "ut_kind=multi" "ut_title=$TORRENT_NAME" "ut_label=Music" &
;;
tv|"tv show"|"tv shows"|series|serie)
/filebot/filebot.sh --db TheTVDB -script fn:amc --output "/data/Media" --action <FILEBOT_RENAME_METHOD> --conflict skip -non-strict --log-file amc.log --def excludeList=amc.excludes unsorted=y "seriesFormat=/data/Media/TV/<FILEBOT_RENAME_SERIES>" "ut_dir=$TORRENT_PATH" "ut_kind=multi" "ut_title=$TORRENT_NAME" "ut_label=TV Show" &
;;
anime|animes)
/filebot/filebot.sh --db AniDB -script fn:amc --output "/data/Media" --action <FILEBOT_RENAME_METHOD> --conflict skip -non-strict --log-file amc.log --def excludeList=amc.excludes unsorted=y "animeFormat=/data/Media/Animes/<FILEBOT_RENAME_ANIMES>" "ut_dir=$TORRENT_PATH" "ut_kind=multi" "ut_title=$TORRENT_NAME" "ut_label=Anime" &
;;
*)
/filebot/filebot.sh -script fn:amc --output "/data/Media" --action <FILEBOT_RENAME_METHOD> --conflict skip -non-strict --log-file amc.log --def excludeList=amc.excludes unsorted=y music=y "seriesFormat=/data/Media/TV/<FILEBOT_RENAME_SERIES>" "animeFormat=/data/Media/Animes/<FILEBOT_RENAME_ANIMES>" "movieFormat=/data/Media/Movies/<FILEBOT_RENAME_MOVIES>" "musicFormat=/data/Media/Music/<FILEBOT_RENAME_MUSICS>" "ut_dir=$TORRENT_PATH" "ut_kind=multi" "ut_title=$TORRENT_NAME" "ut_label=$TORRENT_LABEL" &
;;
esac

View File

@ -0,0 +1,11 @@
#!/bin/sh
(sleep 10; find /data/Media -type l | while read in; do
file "$in" | grep "broken symbolic link"
if [ $? -ne 1 ]; then
echo "Delete $in"
rm -f "$in"
fi
done
find /data/Media/ -type d -empty -exec rm -r {} \;) >> /tmp/postrm.log &

View File

@ -0,0 +1,28 @@
scgi_local = /tmp/rtorrent.sock
encoding_list = UTF-8
port_range = 49184-49184
port_random = no
check_hash = no
directory = /data/torrents
session = /data/.session
encryption = allow_incoming, try_outgoing, enable_retry
use_udp_trackers = yes
dht = off
peer_exchange = no
min_peers = 1
max_peers = 100
min_peers_seed = 1
max_peers_seed = 50
max_uploads = 15
network.xmlrpc.size_limit.set = 10000000
schedule = watch_directory,1,1,"load_start=/data/.watch/*.torrent"
schedule = untied_directory,5,5,"stop_untied=/data/.watch/*.torrent"
schedule = scgi_permission,0,0,"execute.nothrow=chmod,\"g+w,o=\",/tmp/rtorrent.sock"
schedule = insufficient_disk_space,1,30,close_low_diskspace=500M
system.method.set_key=event.download.finished,filebot,"execute={/usr/bin/postdl,$d.get_base_path=,$d.get_name=,$d.get_custom1=}"
system.method.set_key=event.download.erased,filebot_cleaner,"execute={/usr/bin/postrm}"

View File

@ -0,0 +1,30 @@
#!/bin/sh
mkdir -p /data/torrents
mkdir -p /data/.watch
mkdir -p /data/.session
mkdir -p /data/Media/Movies
mkdir -p /data/Media/TV
mkdir -p /data/Media/Animes
mkdir -p /data/Media/Music
sed -i -e "s|<FLOOD_SECRET>|$FLOOD_SECRET|g" \
-e "s|<CONTEXT_PATH>|$CONTEXT_PATH|g" /usr/flood/config.js
sed -i -e 's#<FILEBOT_RENAME_MOVIES>#'"$FILEBOT_RENAME_MOVIES"'#' \
-e 's#<FILEBOT_RENAME_METHOD>#'"$FILEBOT_RENAME_METHOD"'#' \
-e 's#<FILEBOT_RENAME_MUSICS>#'"$FILEBOT_RENAME_MUSICS"'#' \
-e 's#<FILEBOT_RENAME_SERIES>#'"$FILEBOT_RENAME_SERIES"'#' \
-e 's#<FILEBOT_RENAME_ANIMES>#'"$FILEBOT_RENAME_ANIMES"'#' /usr/bin/postdl
rm -f /data/.session/rtorrent.lock
chown -R $UID:$GID /data /home/torrent /tmp /filebot /usr/flood /flood-db /etc/s6.d
if [ ${RTORRENT_SCGI} -ne 0 ]; then
sed -i -e 's|^scgi_local.*$|scgi_port = 0.0.0.0:'${RTORRENT_SCGI}'|' /home/torrent/.rtorrent.rc
sed -i -e 's|socket: true,|socket: false,|' -e 's|port: 5000,|port: '${RTORRENT_SCGI}',|' /usr/flood/config.js
fi
exec su-exec $UID:$GID /bin/s6-svscan /etc/s6.d

View File

@ -0,0 +1,3 @@
#!/bin/sh
exit 0

View File

@ -0,0 +1,3 @@
#!/bin/sh
cd /usr/flood
exec /usr/flood/server/bin/www

View File

@ -0,0 +1,6 @@
#!/bin/sh
export TERM="xterm"
export HOME="/home/torrent"
export PWD="/home/torrent"
cd /home/torrent
exec rtorrent