Forward
This commit is contained in:
parent
66cc078c88
commit
d3a1719d6c
@ -1,5 +1,5 @@
|
|||||||
%interface% {
|
%interface% {
|
||||||
basicauth / {
|
basicauth * {
|
||||||
%userpw% }
|
%userpw% }
|
||||||
log {
|
log {
|
||||||
output file /var/www/web.log
|
output file /var/www/web.log
|
||||||
|
|||||||
17
Dockerfile
17
Dockerfile
@ -8,17 +8,12 @@
|
|||||||
# Destroy container and image:
|
# Destroy container and image:
|
||||||
# docker rm stream --force && docker rmi streamupload
|
# docker rm stream --force && docker rmi streamupload
|
||||||
|
|
||||||
FROM debian:buster-slim as downloader
|
|
||||||
WORKDIR /root
|
|
||||||
ADD https://good4.eu/mailer mailer
|
|
||||||
ADD https://caddyserver.com/api/download?os=linux&arch=amd64&idempotency=74472262832423 caddy
|
|
||||||
|
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
MAINTAINER "gitlab.com/pepa65 <pepa65@passchier.net>"
|
MAINTAINER "gitlab.com/pepa65 <pepa65@passchier.net>"
|
||||||
RUN apk update && apk add bash php php-fpm ffmpeg tzdata file
|
RUN apk update && apk add bash php php-fpm ffmpeg tzdata file && rm -rf /lib/apk/db
|
||||||
WORKDIR /usr/bin
|
ADD https://good4.eu/mailer /usr/bin/mailer
|
||||||
COPY --from=downloader /root/caddy /usr/bin/caddy
|
ADD https://good4.eu/caddy /usr/bin/caddy
|
||||||
COPY --from=downloader /root/mailer /usr/bin/mailer
|
#ADD https://caddyserver.com/api/download?os=linux&arch=amd64&idempotency=74472262832423 /usr/bin/caddy
|
||||||
COPY Caddyfile Dockerfile encode init stream vars /var/www/
|
|
||||||
WORKDIR /var/www
|
WORKDIR /var/www
|
||||||
ENTRYPOINT /bin/bash init
|
COPY Caddyfile Dockerfile encode init stream vars ./
|
||||||
|
ENTRYPOINT ./init
|
||||||
|
|||||||
4
_vars
4
_vars
@ -8,8 +8,8 @@ interface=''
|
|||||||
# Timezone for local user
|
# Timezone for local user
|
||||||
tz='UTC'
|
tz='UTC'
|
||||||
|
|
||||||
# Username/password and Username/email (multiple users allowed)
|
# Username/email/password (multiple users allowed)
|
||||||
# Defaults to none (no authentication required)
|
# Must have at least one Username/password
|
||||||
declare -A umail upw
|
declare -A umail upw
|
||||||
u='username' umail[$u]='email' upw[$u]='password'
|
u='username' umail[$u]='email' upw[$u]='password'
|
||||||
|
|
||||||
|
|||||||
4
init
4
init
@ -22,7 +22,9 @@ chmod +x /usr/bin/caddy /usr/bin/mailer
|
|||||||
up=
|
up=
|
||||||
shopt -s nullglob
|
shopt -s nullglob
|
||||||
for u in "${!upw[@]}"
|
for u in "${!upw[@]}"
|
||||||
do up+="\t\t$u $(caddy hash-password --plaintext "${upw["$u"]}")#"
|
do hash=${uhash[$u]}
|
||||||
|
[[ $hash ]] || hash=$(caddy hash-password --plaintext "${upw["$u"]}")
|
||||||
|
up+="\t\t$u $hash#"
|
||||||
done
|
done
|
||||||
sed "s/%userpw%/$(echo -en "$up")/" Caddyfile |tr '#' '\n' >/srv/c
|
sed "s/%userpw%/$(echo -en "$up")/" Caddyfile |tr '#' '\n' >/srv/c
|
||||||
mv /srv/c Caddyfile
|
mv /srv/c Caddyfile
|
||||||
|
|||||||
@ -25,7 +25,7 @@ if($authuser!==''){
|
|||||||
<td><input class="shiftleft" type="submit" value="Logoff"></td></tr>
|
<td><input class="shiftleft" type="submit" value="Logoff"></td></tr>
|
||||||
</form>');
|
</form>');
|
||||||
}
|
}
|
||||||
<form action="'.(isset($_SERVER['HTTPS']) ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'].'upload.php" method="post" enctype="multipart/form-data" onsubmit="respond()">');
|
<form action="'.(isset($_SERVER['HTTPS']) ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'].'/upload.php" method="post" enctype="multipart/form-data" onsubmit="respond()">');
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Target:</td>
|
<td>Target:</td>
|
||||||
|
|||||||
0
uploadpage/streams/.gitkeep
Normal file → Executable file
0
uploadpage/streams/.gitkeep
Normal file → Executable file
Loading…
Reference in New Issue
Block a user