Initial commit

This commit is contained in:
dave 2015-01-11 15:44:19 -08:00
commit e93a180d9b
8 changed files with 209 additions and 0 deletions

46
Dockerfile Normal file
View File

@ -0,0 +1,46 @@
FROM ubuntu:14.04
MAINTAINER Dave P
# Create user (user/password is deluge)
RUN useradd --create-home --uid 1000 deluge ; \
echo "deluge:deluge" | chpasswd ; \
locale-gen en
# Install deluge
COPY auth /home/deluge/.config/deluge/
COPY core.conf /home/deluge/.config/deluge/
COPY web_plugin.conf /home/deluge/.config/deluge/
COPY web.conf /home/deluge/.config/
COPY run_deluge.sh /
RUN apt-get update ; \
apt-get -y install deluged deluge-web deluge-console ; \
chown -R deluge /home/deluge/.config ; \
chgrp -R deluge /home/deluge/.config ; \
chmod +x /run_deluge.sh
# Install SSH server
RUN mkdir /var/run/sshd ; \
apt-get -y install openssh-server
# Install supervisor, vnstat, & start script
RUN apt-get -y install supervisor vnstat
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY start /start
RUN chmod +x /start ; \
chown -R deluge /var/lib/vnstat ; \
chgrp -R deluge /var/lib/vnstat ; \
sed -i -e"s/^UnitMode\s0/UnitMode 1/" /etc/vnstat.conf ; \
sed -i -e"s/^RateUnit\s1/RateUnit 0/" /etc/vnstat.conf
# Expose ssh, deluge, peer, deluge-web
EXPOSE 22
EXPOSE 8112
#EXPOSE 8113
EXPOSE 58846
# REMEMBER TO MANUALLY SPECIFY A PEER PORT ON RUN
# Set boot command
CMD /start

1
auth Normal file
View File

@ -0,0 +1 @@
deluge:deluge:10

103
core.conf Normal file
View File

@ -0,0 +1,103 @@
{
"file": 1,
"format": 1
}{
"info_sent": 0.0,
"lsd": true,
"send_info": false,
"move_completed_path": "/home/deluge",
"enc_in_policy": 1,
"queue_new_to_top": false,
"ignore_limits_on_local_network": true,
"rate_limit_ip_overhead": true,
"daemon_port": 58846,
"natpmp": true,
"max_active_limit": 8,
"utpex": true,
"max_active_downloading": 3,
"max_active_seeding": 5,
"allow_remote": true,
"max_half_open_connections": 50,
"download_location": "/home/deluge",
"compact_allocation": false,
"max_upload_speed": -1.0,
"cache_expiry": 60,
"prioritize_first_last_pieces": false,
"auto_managed": true,
"enc_level": 2,
"max_connections_per_second": 20,
"dont_count_slow_torrents": false,
"random_outgoing_ports": true,
"max_upload_slots_per_torrent": -1,
"new_release_check": false,
"enc_out_policy": 1,
"outgoing_ports": [
0,
0
],
"seed_time_limit": 180,
"cache_size": 512,
"share_ratio_limit": 2.0,
"max_download_speed": -1.0,
"geoip_db_location": "/usr/share/GeoIP/GeoIP.dat",
"torrentfiles_location": "/home/deluge",
"stop_seed_at_ratio": false,
"peer_tos": "0x00",
"listen_interface": "",
"upnp": true,
"max_download_speed_per_torrent": -1,
"max_upload_slots_global": 4,
"enabled_plugins": [
"WebUi"
],
"random_port": false,
"autoadd_enable": false,
"max_connections_global": 200,
"enc_prefer_rc4": true,
"listen_ports": [
49013,
49013
],
"dht": true,
"stop_seed_ratio": 2.0,
"seed_time_ratio_limit": 7.0,
"max_upload_speed_per_torrent": -1,
"copy_torrent_file": false,
"del_copy_torrent_file": false,
"move_completed": false,
"proxies": {
"peer": {
"username": "",
"password": "",
"type": 0,
"hostname": "",
"port": 8080
},
"web_seed": {
"username": "",
"password": "",
"type": 0,
"hostname": "",
"port": 8080
},
"tracker": {
"username": "",
"password": "",
"type": 0,
"hostname": "",
"port": 8080
},
"dht": {
"username": "",
"password": "",
"type": 0,
"hostname": "",
"port": 8080
}
},
"add_paused": false,
"max_connections_per_torrent": -1,
"remove_seed_at_ratio": false,
"autoadd_location": "/home/deluge",
"plugins_location": "/home/deluge/.config/deluge/plugins"
}

5
run_deluge.sh Normal file
View File

@ -0,0 +1,5 @@
#!/bin/bash
cd /home/deluge/
su -c "/usr/bin/deluged --do-not-daemonize" deluge

5
start Normal file
View File

@ -0,0 +1,5 @@
#!/bin/bash
# start services
supervisord

19
supervisord.conf Normal file
View File

@ -0,0 +1,19 @@
[supervisord]
nodaemon=true
[program:sshd]
command=/usr/sbin/sshd -D
autorestart=true
[program:deluged]
autorestart=true
command=/run_deluge.sh
[program:cron]
command=/usr/sbin/cron -f
autorestart=true
[program:vnstatd]
command=/bin/su -c '/usr/sbin/vnstatd -n' deluge
autorestart=true

22
web.conf Normal file
View File

@ -0,0 +1,22 @@
{
"file": 1,
"format": 1
}{
"sidebar_show_zero": false,
"show_session_speed": false,
"pwd_sha1": "2ce1a410bcdcc53064129b6d950f2e9fee4edc1e",
"show_sidebar": true,
"sessions": {},
"enabled_plugins": [],
"base": "/",
"first_login": false,
"theme": "gray",
"pkey": "ssl/daemon.pkey",
"cert": "ssl/daemon.cert",
"session_timeout": 3600,
"https": false,
"default_daemon": "",
"sidebar_multiple_filters": true,
"pwd_salt": "c26ab3bbd8b137f99cd83c2c1c0963bcc1a35cad",
"port": 8112
}

8
web_plugin.conf Normal file
View File

@ -0,0 +1,8 @@
{
"file": 1,
"format": 1
}{
"ssl": false,
"enabled": true,
"port": 8112
}