Merge branch 'master' of gitlab.com:pepa65/streamupload

This commit is contained in:
gitlab.com/pepa65 2022-09-08 17:14:34 +07:00
commit 9bf508deaa

View File

@ -38,16 +38,21 @@ For php functionality, install `php-fpm` (on deb-based systems:
basicauth { basicauth {
$user $hashpassword $user $hashpassword
} }
log {
output file /var/www/web.log
}
php_fastcgi unix//run/php/php-fpm.sock php_fastcgi unix//run/php/php-fpm.sock
request_header +X-User {http.auth.user.id}
root * $repopath/uploadpage root * $repopath/uploadpage
file_server file_server
} }
``` ```
* If the server IP has an DNS A record pointing to it, `:80` can be replaced * If the server IP has an DNS A record pointing to it, `:80` can be replaced
by the domainname with the A record. by the domainname with the A record.
* Replace `$user` with the desired username for authentication. * Replace `$user` with the desired username for authentication and replace
* Replace `$hashpassword` with the output of `caddy hash-password` which will `$hashpassword` with the output of `caddy hash-password` which will
ask for the password to be used for authentication. ask for the password to be used for authentication. Multiple users (on
separate lines) are allowed.
* Replace `$repopath` (see above in Install). * Replace `$repopath` (see above in Install).
* The value of `/run/php/php-fpm.sock` might need to be adjusted, depending * The value of `/run/php/php-fpm.sock` might need to be adjusted, depending
on the system used, it needs to be the unix socket for php. on the system used, it needs to be the unix socket for php.
@ -56,13 +61,6 @@ For php functionality, install `php-fpm` (on deb-based systems:
``` ```
#!/usr/bin/env bash #!/usr/bin/env bash
### Docker
After cloning this repo and `cd streamupload`, a docker image can be built
from the included `Dockerfile` by: `docker build -t streamupload .`.
In the case of running on a LAN and not having a DNS A record, start it with:
`docker run -d -p 8080:80 -v $PWD/uploadpage:/var/www/uploadpage streamupload`.
In case of a domainname, replace `8080:80` by `443:443`.
# Make sure internet is reachable # Make sure internet is reachable
while ! /usr/bin/ping -q -c 1 1.1.1.1 &>/dev/null while ! /usr/bin/ping -q -c 1 1.1.1.1 &>/dev/null
do sleep 1 do sleep 1
@ -76,6 +74,13 @@ sleep 1
``` ```
and make it executable: `chmod +x /root/Caddy`. and make it executable: `chmod +x /root/Caddy`.
### Docker
After cloning this repo and `cd streamupload`, a docker image can be built
from the included `Dockerfile` by: `docker build -t streamupload .`.
In the case of running on a LAN and not having a DNS A record, start it with:
`docker run -d -p 8080:80 -v $PWD/uploadpage:/var/www/uploadpage streamupload`.
In case of a domainname, replace `8080:80` by `443:443`.
## Usage ## Usage
* Get a streamkey for the target by scheduling a stream * Get a streamkey for the target by scheduling a stream
(supported are: Restream.io, YouTube.com, Facebook.com). (supported are: Restream.io, YouTube.com, Facebook.com).