Merge 7b171c2f9b
into 597bdfb23d
This commit is contained in:
commit
1bb0ee6034
|
@ -13,9 +13,12 @@ if [[ $(printf '%s\n' "$REQUIRED_COMPOSE_VERSION" "$COMPOSE_VERSION" | sort -V |
|
|||
exit 1
|
||||
fi
|
||||
|
||||
echo "Enter a hostname for the Frontend (eg: piped.kavin.rocks):" && read -r frontend
|
||||
echo "Enter a hostname for the Backend (eg: pipedapi.kavin.rocks):" && read -r backend
|
||||
echo "Enter a hostname for the Proxy (eg: pipedproxy.kavin.rocks):" && read -r proxy
|
||||
echo "Enter an url for the Frontend (eg: https://piped.kavin.rocks):" && read -r frontend_url
|
||||
|
||||
echo "Enter an url for the Backend (eg: https://pipedapi.kavin.rocks):" && read -r backend_url
|
||||
|
||||
echo "Enter an hostname for the Proxy (eg: https://pipedproxy.kavin.rocks):" && read -r proxy_url
|
||||
|
||||
echo "Enter the reverse proxy you would like to use (either caddy or nginx):" && read -r reverseproxy
|
||||
|
||||
rm -rf config/
|
||||
|
@ -23,9 +26,17 @@ rm -f docker-compose.yml
|
|||
|
||||
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/*
|
||||
frontend_hostname=$(echo "$frontend_url"| awk -F[/:] '{print $4}')
|
||||
backend_hostname=$(echo "$backend_url"| awk -F[/:] '{print $4}')
|
||||
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/*
|
||||
|
||||
# The openj9 image does not support aarch64
|
||||
if [[ "$(uname -m)" == "aarch64" ]]; then
|
||||
|
|
|
@ -5,7 +5,7 @@ PORT: 8080
|
|||
HTTP_WORKERS: 2
|
||||
|
||||
# Proxy
|
||||
PROXY_PART: https://PROXY_HOSTNAME
|
||||
PROXY_PART: PROXY_URL
|
||||
|
||||
# Outgoing HTTP Proxy - eg: 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
|
||||
|
||||
# Public API URL
|
||||
API_URL: https://BACKEND_HOSTNAME
|
||||
API_URL: BACKEND_URL
|
||||
|
||||
# Public Frontend URL
|
||||
FRONTEND_URL: https://FRONTEND_HOSTNAME
|
||||
FRONTEND_URL: FRONT_URL
|
||||
|
||||
# Hibernate properties
|
||||
hibernate.connection.url: jdbc:postgresql://postgres:5432/piped
|
||||
|
|
|
@ -5,7 +5,7 @@ services:
|
|||
depends_on:
|
||||
- piped
|
||||
container_name: piped-frontend
|
||||
entrypoint: ash -c 'sed -i s/pipedapi.kavin.rocks/BACKEND_HOSTNAME/g
|
||||
entrypoint: ash -c 'sed -i s@https://pipedapi.kavin.rocks@BACKEND_URL@g
|
||||
/usr/share/nginx/html/assets/* && /docker-entrypoint.sh && nginx -g
|
||||
"daemon off;"'
|
||||
ytproxy:
|
||||
|
|
|
@ -5,7 +5,7 @@ services:
|
|||
depends_on:
|
||||
- piped
|
||||
container_name: piped-frontend
|
||||
entrypoint: ash -c 'sed -i s/pipedapi.kavin.rocks/BACKEND_HOSTNAME/g
|
||||
entrypoint: ash -c 'sed -i s@https://pipedapi.kavin.rocks@BACKEND_URL@g
|
||||
/usr/share/nginx/html/assets/* && /docker-entrypoint.sh && nginx -g
|
||||
"daemon off;"'
|
||||
ytproxy:
|
||||
|
|
Loading…
Reference in New Issue