diff --git a/README.md b/README.md index 35bf502..e4e66a3 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ Not every stack is tested to fully work. - [ ] mariadb-common (prototype state) - [ ] mastodon (didn't work when tried to set up) - [x] Murmur (Mumble server) +- [ ] Open Streaming Platform (prototype) - [x] OpenVPN - [ ] Postgres Common (prototype state) - [x] Proxy MTProto diff --git a/open-streaming-platform/.env.dist b/open-streaming-platform/.env.dist new file mode 100644 index 0000000..aa64ef5 --- /dev/null +++ b/open-streaming-platform/.env.dist @@ -0,0 +1,12 @@ +# Container variables +DB_URL=sqlite:///db/database.db +FLASK_SECRET=CHANGE_ME +FLASK_SALT=CHANGE_ME +OSP_ALLOWREGISTRATION=False +OSP_REQUIREVERIFICATION=False +TZ=Europe/Moscow + +# Volumes +STORAGE_DIR=./storage +DATABASE_DIR=./database +NGINX_DIR=./nginx \ No newline at end of file diff --git a/open-streaming-platform/database/.gitignore b/open-streaming-platform/database/.gitignore new file mode 100644 index 0000000..c96a04f --- /dev/null +++ b/open-streaming-platform/database/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore \ No newline at end of file diff --git a/open-streaming-platform/docker-compose.yml b/open-streaming-platform/docker-compose.yml new file mode 100644 index 0000000..0c7cec5 --- /dev/null +++ b/open-streaming-platform/docker-compose.yml @@ -0,0 +1,24 @@ +# https://gitlab.com/Deamos/flask-nginx-rtmp-manager/-/blob/master/docker-compose.yml +version: '3.4' +services: + redis: + image: redis + container_name: ospredis + expose: + - 6379 + app: + image: deamos/openstreamingplatform + restart: always + ports: + - '1935:1935' + - 'localhost:8585:80' + - 'localhost:8553:443' + environment: + - REDIS_HOST="ospredis" + - REDIS_PORT=6379 + - REDIS_PASSWORD="" + env_file: .env + volumes: + - "${STORAGE_DIR}:/var/www" + - "${DATABASE_DIR}:/opt/osp/db" + - "${NGINX_DIR}:/usr/local/nginx/conf" diff --git a/open-streaming-platform/etc/nginx/sites-available/osp.domain.tld.conf.dist b/open-streaming-platform/etc/nginx/sites-available/osp.domain.tld.conf.dist new file mode 100644 index 0000000..e9de52b --- /dev/null +++ b/open-streaming-platform/etc/nginx/sites-available/osp.domain.tld.conf.dist @@ -0,0 +1,28 @@ +server { + listen 443 ssl http2; + server_name osp.server.tld; + + #access_log /var/log/nginx/osp.server.tld.access.gz main buffer=16k gzip=9 flush=5m; + error_log /var/log/nginx/osp.server.tld.error; + + charset utf-8; + + auth_basic "Authentication needed"; + auth_basic_user_file /var/www/osp.server.tld/.htpasswd; + + location / { + proxy_pass http://127.0.0.1:8585; + } + + #include config/gzip.conf; + + # Wildcard certificate config + #include ssl/server.tld.conf; + #include config/ssl.conf; +} + +server { + listen 80; + server_name osp.server.tld; + return 301 https://osp.server.tld$request_uri; +} \ No newline at end of file diff --git a/open-streaming-platform/nginx/.gitignore b/open-streaming-platform/nginx/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/open-streaming-platform/nginx/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/open-streaming-platform/storage/.gitignore b/open-streaming-platform/storage/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/open-streaming-platform/storage/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore