mirror of
https://github.com/fastogt/fastocloud.git
synced 2025-03-09 23:18:50 +00:00
Release 1.4.4
This commit is contained in:
commit
310132c21d
363 changed files with 32789 additions and 0 deletions
38
build/build.py
Executable file
38
build/build.py
Executable file
|
@ -0,0 +1,38 @@
|
|||
#!/usr/bin/env python3
|
||||
import sys
|
||||
from pyfastogt import build_utils, system_info
|
||||
|
||||
|
||||
class BuildRequest(build_utils.BuildRequest):
|
||||
def __init__(self, platform, arch_name, dir_path, prefix_path):
|
||||
build_utils.BuildRequest.__init__(self, platform, arch_name, dir_path, prefix_path)
|
||||
|
||||
def build(self, build_type):
|
||||
cmake_flags = []
|
||||
self._build_via_cmake_double(cmake_flags, build_type)
|
||||
|
||||
|
||||
def print_usage():
|
||||
print("Usage:\n"
|
||||
"[required] argv[1] build type(release/debug)\n"
|
||||
"[optional] argv[2] prefix\n")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
argc = len(sys.argv)
|
||||
|
||||
if argc > 1:
|
||||
build_type = sys.argv[1]
|
||||
else:
|
||||
print_usage()
|
||||
sys.exit(1)
|
||||
|
||||
prefix = '/usr/local'
|
||||
if argc > 2:
|
||||
prefix = sys.argv[2]
|
||||
|
||||
host_os = system_info.get_os()
|
||||
arch_host_os = system_info.get_arch_name()
|
||||
|
||||
request = BuildRequest(host_os, arch_host_os, 'build_' + host_os, prefix)
|
||||
request.build(build_type)
|
1
build/env
Submodule
1
build/env
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit ce152395c8e6eeaf6e3a09f0529cea8b6057b00c
|
52
build/fast_build.sh
Normal file
52
build/fast_build.sh
Normal file
|
@ -0,0 +1,52 @@
|
|||
#!/bin/bash
|
||||
set -ex
|
||||
|
||||
# exports
|
||||
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
|
||||
|
||||
# variables
|
||||
USER=fastocloud
|
||||
|
||||
# update system
|
||||
if [[ "$OSTYPE" == "linux-gnu" ]]; then
|
||||
if [ -n "$(command -v yum)" ]; then
|
||||
yum update -y
|
||||
yum install -y git python3-setuptools python3-pip
|
||||
elif [ -n "$(command -v apt-get)" ]; then
|
||||
apt-get update
|
||||
apt-get install -y git python3-setuptools python3-pip --no-install-recommends
|
||||
else
|
||||
:
|
||||
fi
|
||||
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
:
|
||||
elif [[ "$OSTYPE" == "cygwin" ]]; then
|
||||
:
|
||||
elif [[ "$OSTYPE" == "msys" ]]; then
|
||||
:
|
||||
elif [[ "$OSTYPE" == "win32" ]]; then
|
||||
:
|
||||
elif [[ "$OSTYPE" == "freebsd"* ]]; then
|
||||
:
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
# sync modules
|
||||
git submodule update --init --recursive
|
||||
|
||||
# install pyfastogt
|
||||
git clone https://gitlab.com/fastogt/pyfastogt
|
||||
cd pyfastogt
|
||||
python3 setup.py install
|
||||
cd ../
|
||||
rm -rf pyfastogt
|
||||
|
||||
# build env for service
|
||||
./env/build_env.py
|
||||
|
||||
# build service
|
||||
./build.py release
|
||||
|
||||
# add user
|
||||
useradd -m -U -d /home/$USER $USER -s /bin/bash
|
92
build/nginx/default
Normal file
92
build/nginx/default
Normal file
|
@ -0,0 +1,92 @@
|
|||
##
|
||||
# You should look at the following URL's in order to grasp a solid understanding
|
||||
# of Nginx configuration files in order to fully unleash the power of Nginx.
|
||||
# https://www.nginx.com/resources/wiki/start/
|
||||
# https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
|
||||
# https://wiki.debian.org/Nginx/DirectoryStructure
|
||||
#
|
||||
# In most cases, administrators will remove this file from sites-enabled/ and
|
||||
# leave it as reference inside of sites-available where it will continue to be
|
||||
# updated by the nginx packaging team.
|
||||
#
|
||||
# This file will automatically load configuration files provided by other
|
||||
# applications, such as Drupal or Wordpress. These applications will be made
|
||||
# available underneath a path with that package name, such as /drupal8.
|
||||
#
|
||||
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
|
||||
##
|
||||
|
||||
# Default server configuration
|
||||
#
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
|
||||
# SSL configuration
|
||||
#
|
||||
# listen 443 ssl default_server;
|
||||
# listen [::]:443 ssl default_server;
|
||||
#
|
||||
# Note: You should disable gzip for SSL traffic.
|
||||
# See: https://bugs.debian.org/773332
|
||||
#
|
||||
# Read up on ssl_ciphers to ensure a secure configuration.
|
||||
# See: https://bugs.debian.org/765782
|
||||
#
|
||||
# Self signed certs generated by the ssl-cert package
|
||||
# Don't use them in a production server!
|
||||
#
|
||||
# include snippets/snakeoil.conf;
|
||||
|
||||
root /home/fastocloud/streamer;
|
||||
|
||||
# Add index.php to the list if you are using PHP
|
||||
index index.html index.htm index.nginx-debian.html;
|
||||
|
||||
server_name _;
|
||||
|
||||
location / {
|
||||
# First attempt to serve request as file, then
|
||||
# as directory, then fall back to displaying a 404.
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
|
||||
# pass PHP scripts to FastCGI server
|
||||
#
|
||||
#location ~ \.php$ {
|
||||
# include snippets/fastcgi-php.conf;
|
||||
#
|
||||
# # With php-fpm (or other unix sockets):
|
||||
# fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
|
||||
# # With php-cgi (or other tcp sockets):
|
||||
# fastcgi_pass 127.0.0.1:9000;
|
||||
#}
|
||||
|
||||
# deny access to .htaccess files, if Apache's document root
|
||||
# concurs with nginx's one
|
||||
#
|
||||
#location ~ /\.ht {
|
||||
# deny all;
|
||||
#}
|
||||
}
|
||||
|
||||
|
||||
# Virtual Host configuration for example.com
|
||||
#
|
||||
# You can move that to a different file under sites-available/ and symlink that
|
||||
# to sites-enabled/ to enable it.
|
||||
#
|
||||
#server {
|
||||
# listen 80;
|
||||
# listen [::]:80;
|
||||
#
|
||||
# server_name example.com;
|
||||
#
|
||||
# root /var/www/example.com;
|
||||
# index index.html;
|
||||
#
|
||||
# location / {
|
||||
# try_files $uri $uri/ =404;
|
||||
# }
|
||||
#}
|
||||
|
8
build/nginx_hls_debian.sh
Normal file
8
build/nginx_hls_debian.sh
Normal file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
set -ex
|
||||
|
||||
# update system
|
||||
apt-get update
|
||||
apt-get install -y nginx
|
||||
cp env/nginx/fastocloud /etc/nginx/sites-available/fastocloud
|
||||
systemctl restart nginx
|
Loading…
Add table
Add a link
Reference in a new issue