mirror of
https://github.com/TeamPiped/Piped-Docker.git
synced 2024-08-14 23:56:53 +00:00
support full urls
This commit is contained in:
parent
95e20fa87d
commit
7f8e11e66d
4 changed files with 22 additions and 14 deletions
|
@ -1,11 +1,11 @@
|
||||||
echo "Enter a hostname for the Frontend (eg: piped.kavin.rocks):"
|
echo "Enter an url for the Frontend (eg: https://piped.kavin.rocks):"
|
||||||
read frontend
|
read frontend_url
|
||||||
|
|
||||||
echo "Enter a hostname for the Backend (eg: pipedapi.kavin.rocks):"
|
echo "Enter an url for the Backend (eg: https://pipedapi.kavin.rocks):"
|
||||||
read backend
|
read backend_url
|
||||||
|
|
||||||
echo "Enter a hostname for the Proxy (eg: pipedproxy.kavin.rocks):"
|
echo "Enter an hostname for the Proxy (eg: https://pipedproxy.kavin.rocks):"
|
||||||
read proxy
|
read proxy_url
|
||||||
|
|
||||||
echo "Enter the reverse proxy you would like to use (either caddy or nginx):"
|
echo "Enter the reverse proxy you would like to use (either caddy or nginx):"
|
||||||
read reverseproxy
|
read reverseproxy
|
||||||
|
@ -15,8 +15,16 @@ rm -f docker-compose.yml
|
||||||
|
|
||||||
cp -r template/ config/
|
cp -r template/ config/
|
||||||
|
|
||||||
sed -i "s/FRONTEND_HOSTNAME/$frontend/g" config/*
|
frontend_hostname=$(echo "$frontend_url"| awk -F[/:] '{print $4}')
|
||||||
sed -i "s/BACKEND_HOSTNAME/$backend/g" config/*
|
backend_hostname=$(echo "$backend_url"| awk -F[/:] '{print $4}')
|
||||||
sed -i "s/PROXY_HOSTNAME/$proxy/g" config/*
|
proxy_hostname=$(echo "$proxy_url"| awk -F[/:] '{print $4}')
|
||||||
|
|
||||||
|
sed -i "s@FRONT_URL@$frontend_url@g" config/*
|
||||||
|
sed -i "s@BACKEND_URL@$backend_url@g" config/*
|
||||||
|
sed -i "s@PROXY_URL@$proxy_url@g" config/*
|
||||||
|
|
||||||
|
sed -i "s@FRONTEND_HOSTNAME@$frontend_hostname@g" config/*
|
||||||
|
sed -i "s@BACKEND_HOSTNAME@$backend_hostname@g" config/*
|
||||||
|
sed -i "s@PROXY_HOSTNAME@$proxy_hostname@g" config/*
|
||||||
|
|
||||||
mv config/docker-compose.$reverseproxy.yml docker-compose.yml
|
mv config/docker-compose.$reverseproxy.yml docker-compose.yml
|
||||||
|
|
|
@ -5,7 +5,7 @@ PORT: 8080
|
||||||
HTTP_WORKERS: 2
|
HTTP_WORKERS: 2
|
||||||
|
|
||||||
# Proxy
|
# Proxy
|
||||||
PROXY_PART: https://PROXY_HOSTNAME
|
PROXY_PART: PROXY_URL
|
||||||
|
|
||||||
# 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,10 +15,10 @@ 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://BACKEND_HOSTNAME
|
API_URL: BACKEND_URL
|
||||||
|
|
||||||
# Public Frontend URL
|
# Public Frontend URL
|
||||||
FRONTEND_URL: https://FRONTEND_HOSTNAME
|
FRONTEND_URL: FRONT_URL
|
||||||
|
|
||||||
# Hibernate properties
|
# Hibernate properties
|
||||||
hibernate.connection.url: jdbc:postgresql://postgres:5432/piped
|
hibernate.connection.url: jdbc:postgresql://postgres:5432/piped
|
||||||
|
|
|
@ -5,7 +5,7 @@ services:
|
||||||
depends_on:
|
depends_on:
|
||||||
- piped
|
- piped
|
||||||
container_name: piped-frontend
|
container_name: piped-frontend
|
||||||
entrypoint: ash -c 'sed -i s/pipedapi.kavin.rocks/BACKEND_HOSTNAME/g /usr/share/nginx/html/js/* && /docker-entrypoint.sh && nginx -g "daemon off;"'
|
entrypoint: ash -c 'sed -i s@https://pipedapi.kavin.rocks@BACKEND_URL@g /usr/share/nginx/html/js/* && /docker-entrypoint.sh && nginx -g "daemon off;"'
|
||||||
ytproxy:
|
ytproxy:
|
||||||
image: 1337kavin/ytproxy:latest
|
image: 1337kavin/ytproxy:latest
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
|
@ -5,7 +5,7 @@ services:
|
||||||
depends_on:
|
depends_on:
|
||||||
- piped
|
- piped
|
||||||
container_name: piped-frontend
|
container_name: piped-frontend
|
||||||
entrypoint: ash -c 'sed -i s/pipedapi.kavin.rocks/BACKEND_HOSTNAME/g /usr/share/nginx/html/js/* && /docker-entrypoint.sh && nginx -g "daemon off;"'
|
entrypoint: ash -c 'sed -i s@https://pipedapi.kavin.rocks@BACKEND_URL@g /usr/share/nginx/html/js/* && /docker-entrypoint.sh && nginx -g "daemon off;"'
|
||||||
ytproxy:
|
ytproxy:
|
||||||
image: 1337kavin/ytproxy:latest
|
image: 1337kavin/ytproxy:latest
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue