Python 2.7 pip virtualenv git ffmpeg
apt-get update && \
apt-get install -y python-dev python-pip python-virtualenv git ffmpeg
set -e
mkdir -p /var/lib/socled
cd /var/lib/socled
git clone --depth 1 https://github.com/freddygood/socled.git app
cd app
virtualenv venv
. venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
deactivate
cat <<EOF > /var/lib/socled/app/config.py
thumbnails_url = 'http://example.com'
EOF
cd /var/lib/socled/app
. venv/bin/activate
uwsgi --ini uwsgi.ini
cp -v /var/lib/socled/app/socled.service /etc/systemd/system/
systemctl daemon-reload
systemctl enable socled.service
systemctl start socled.service
cp /var/lib/socled/app/socled.conf /etc/init/
start socled
systemctl restart auth_token.service
restart auth_token.service
systemctl reload auth_token.service
reload auth_token.service
upstream thumbnails {
server 127.0.0.1:8080;
}
uwsgi_cache_path /var/cache/nginx/thumbnails levels=1:1 use_temp_path=off keys_zone=thumbnails:1m max_size=1g inactive=24h;
location = /transcoderthumbnail {
include uwsgi_params;
uwsgi_pass thumbnails;
uwsgi_cache thumbnails;
uwsgi_cache_key $request_uri;
}