mirror of
https://github.com/TeamPiped/Piped-Docker.git
synced 2024-08-14 23:56:53 +00:00
Add configure-instance script.
This commit is contained in:
parent
99c44e571c
commit
d32b534d24
6 changed files with 34 additions and 11 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
config/
|
16
configure-instance.sh
Executable file
16
configure-instance.sh
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
echo "Enter a hostname for the Frontend (eg: piped.kavin.rocks):"
|
||||||
|
read frontend
|
||||||
|
|
||||||
|
echo "Enter a hostname for the Backend (eg: pipedapi.kavin.rocks):"
|
||||||
|
read backend
|
||||||
|
|
||||||
|
echo "Enter a hostname for the Proxy (eg: pipedproxy.kavin.rocks):"
|
||||||
|
read proxy
|
||||||
|
|
||||||
|
rm -rf config/
|
||||||
|
|
||||||
|
cp -r template/ config/
|
||||||
|
|
||||||
|
sed -i "s/FRONTEND_HOSTNAME/$frontend/g" config/*
|
||||||
|
sed -i "s/BACKEND_HOSTNAME/$backend/g" config/*
|
||||||
|
sed -i "s/PROXY_HOSTNAME/$proxy/g" config/*
|
|
@ -9,7 +9,7 @@ services:
|
||||||
image: 1337kavin/ytproxy:latest
|
image: 1337kavin/ytproxy:latest
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- ./ytproxy:/app/socket
|
- ytproxy:/app/socket
|
||||||
container_name: ytproxy
|
container_name: ytproxy
|
||||||
piped:
|
piped:
|
||||||
image: 1337kavin/piped:latest
|
image: 1337kavin/piped:latest
|
||||||
|
@ -34,8 +34,9 @@ services:
|
||||||
- "443:443"
|
- "443:443"
|
||||||
volumes:
|
volumes:
|
||||||
- ./config/Caddyfile:/etc/caddy/Caddyfile
|
- ./config/Caddyfile:/etc/caddy/Caddyfile
|
||||||
- ./caddy/config:/config
|
- caddy_data:/data
|
||||||
- ./ytproxy:/var/run/ytproxy
|
- caddy_config:/config
|
||||||
|
- ytproxy:/var/run/ytproxy
|
||||||
container_name: caddy
|
container_name: caddy
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:13-alpine
|
image: postgres:13-alpine
|
||||||
|
@ -58,3 +59,7 @@ services:
|
||||||
- WATCHTOWER_INCLUDE_RESTARTING=true
|
- WATCHTOWER_INCLUDE_RESTARTING=true
|
||||||
container_name: watchtower
|
container_name: watchtower
|
||||||
command: piped-frontend piped-backend ytproxy varnish caddy postgres watchtower
|
command: piped-frontend piped-backend ytproxy varnish caddy postgres watchtower
|
||||||
|
volumes:
|
||||||
|
caddy_data:
|
||||||
|
caddy_config:
|
||||||
|
ytproxy:
|
||||||
|
|
|
@ -1,13 +1,16 @@
|
||||||
|
|
||||||
piped.domain.tld {
|
FRONTEND_HOSTNAME {
|
||||||
reverse_proxy pipedfrontend:80
|
reverse_proxy pipedfrontend:80
|
||||||
}
|
}
|
||||||
|
|
||||||
pipedapi.domain.tld {
|
BACKEND_HOSTNAME {
|
||||||
reverse_proxy varnish:80
|
reverse_proxy varnish:80
|
||||||
}
|
}
|
||||||
|
|
||||||
pipedproxy.domain.tld {
|
PROXY_HOSTNAME {
|
||||||
|
|
||||||
|
header_upstream -CF-Connecting-IP
|
||||||
|
header_upstream -X-Forwarded-For
|
||||||
|
|
||||||
@ytproxy path /videoplayback* /api/v4/* /api/manifest/*
|
@ytproxy path /videoplayback* /api/v4/* /api/manifest/*
|
||||||
|
|
||||||
|
@ -22,7 +25,6 @@ pipedproxy.domain.tld {
|
||||||
|
|
||||||
header @ytproxy {
|
header @ytproxy {
|
||||||
Cache-Control private always
|
Cache-Control private always
|
||||||
CF-Connecting-IP ""
|
|
||||||
}
|
}
|
||||||
|
|
||||||
header / {
|
header / {
|
||||||
|
@ -38,4 +40,3 @@ pipedproxy.domain.tld {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ PORT: 8080
|
||||||
HTTP_WORKERS: 2
|
HTTP_WORKERS: 2
|
||||||
|
|
||||||
# Proxy
|
# Proxy
|
||||||
PROXY_PART: https://pipedproxy.domain.tld
|
PROXY_PART: https://PROXY_HOSTNAME
|
||||||
|
|
||||||
# Outgoing HTTP Proxy - eg: 127.0.0.1:8118
|
# Outgoing HTTP Proxy - eg: 127.0.0.1:8118
|
||||||
#HTTP_PROXY: 127.0.0.1:8118
|
#HTTP_PROXY: 127.0.0.1:8118
|
||||||
|
@ -15,7 +15,7 @@ CAPTCHA_BASE_URL: https://api.capmonster.cloud/
|
||||||
CAPTCHA_API_KEY: INSERT_HERE
|
CAPTCHA_API_KEY: INSERT_HERE
|
||||||
|
|
||||||
# Public API URL
|
# Public API URL
|
||||||
API_URL: https://pipedapi.domain.tld
|
API_URL: https://BACKEND_HOSTNAME
|
||||||
|
|
||||||
# Hibernate properties
|
# Hibernate properties
|
||||||
hibernate.connection.url: jdbc:postgresql://postgres:5432/piped
|
hibernate.connection.url: jdbc:postgresql://postgres:5432/piped
|
Loading…
Add table
Add a link
Reference in a new issue