This example is part of this article.
This is an example for an HLS delivery with basic security. Nginx compiled with nginx-rtmp-module & secure-link is used as media server. Features:
- Domain filtering
- Referrer filtering
- Embed buster
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
RUBY_V = File.open("./.ruby-version") { |f| f.read }.chomp | |
$apt_script = <<SCRIPT | |
sudo apt-get update | |
sudo apt-get install -y git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev libmysqlclient-dev | |
SCRIPT |
postgresql: | |
image: sameersbn/postgresql:9.1-1 | |
environment: | |
- DB_USER=redmine | |
- DB_PASS=phatiphohsukeuwo | |
- DB_NAME=redmine_production | |
redmine: | |
image: sameersbn/redmine:2.6.1 | |
links: | |
- postgresql:postgresql |
#! /bin/bash | |
### BEGIN INIT INFO | |
# Provides: Click-AP | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Resque worker via init.d (assumes you have Ruby, and a plugin to allow wildcards in queue names) | |
# Description: starts YAKITORY-Queue using start-stop-daemon |
#user nobody; | |
worker_processes auto; | |
#error_log logs/error.log; | |
#error_log logs/error.log notice; | |
#error_log logs/error.log info; | |
pid logs/mvideo2.pid; | |
events { |
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: Click-AP | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the Yakitory server | |
# Description: starts yakitory using start-stop-daemon |
#!/bin/sh | |
# | |
# nginx - this script starts and stops the nginx daemin | |
# | |
# chkconfig: - 85 15 | |
# description: Nginx is an HTTP(S) server, HTTP(S) reverse | |
# processname: nginx | |
# config: /opt/nginx/conf/nginx.conf | |
# pidfile: /opt/nginx/logs/nginx.pid | |
# user: nginx |
This example is part of this article.
This is an example for an HLS delivery with basic security. Nginx compiled with nginx-rtmp-module & secure-link is used as media server. Features:
wget http://nginx.org/download/nginx-1.4.5.tar.gz | |
tar xzf nginx-1.4.5.tar.gz | |
wget http://zlib.net/zlib-1.2.8.tar.gz | |
tar xzf zlib-1.2.8.tar.gz | |
wget http://downloads.sourceforge.net/project/pcre/pcre/8.34/pcre-8.34.tar.bz2?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fpcre%2Ffiles%2Fpcre%2F8.34%2F&ts=1393362418&use_mirror=kent | |
mv pcre-8.34.tar.bz2\?r\=http\:%2F%2Fsourceforge.net%2Fprojects%2Fpcre%2Ffiles%2Fpcre%2F8.34%2F pcre-8.34.tar.bz2 | |
tar xjf pcre-8.34.tar.bz2 |
# Ubuntu 14.04 don't have nsenter - the straight forward way required me to install build tools and etc. | |
# I preferred to keep the system clean and install nsenter in a container and then copy the command to the host | |
# Note - its also possible to run nsenter from a container (didn't tried) https://github.com/jpetazzo/nsenter | |
# start a container | |
docker run --name nsenter -it ubuntu:14.04 bash | |
## in the docker | |
apt-get update | |
apt-get install git build-essential libncurses5-dev libslang2-dev gettext zlib1g-dev libselinux1-dev debhelper lsb-release pkg-config po-debconf autoconf automake autopoint libtool |
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: resque-web | |
# Required-Start: $syslog | |
# Required-Stop: $syslog | |
# Should-Start: $local_fs | |
# Should-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: web interface for resque processing |