mirror of
https://github.com/TeamPiped/Piped-Docker.git
synced 2024-08-14 23:56:53 +00:00
Merge branch 'main' into main
This commit is contained in:
commit
d136081c52
3 changed files with 37 additions and 15 deletions
|
@ -1,14 +1,25 @@
|
||||||
echo "Enter an url for the Frontend (eg: https://piped.kavin.rocks):"
|
# Check if Docker-Compose is not installed
|
||||||
read frontend_url
|
if [ -z "$(which docker-compose)" ]; then
|
||||||
|
echo "Docker-Compose is not installed. Please install it first from https://docs.docker.com/compose/install/#install-compose."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Enter an url for the Backend (eg: https://pipedapi.kavin.rocks):"
|
# Docker-Compose version check, to prevent "Unsupported configuration option"
|
||||||
read backend_url
|
COMPOSE_VERSION=$(docker-compose version --short)
|
||||||
|
REQUIRED_COMPOSE_VERSION="1.28.0"
|
||||||
|
if [[ $(printf '%s\n' "$REQUIRED_COMPOSE_VERSION" "$COMPOSE_VERSION" | sort -V | head -n1) != $REQUIRED_COMPOSE_VERSION ]]; then
|
||||||
|
echo "Your docker-compose version of $COMPOSE_VERSION is too old. Please upgrade to $REQUIRED_COMPOSE_VERSION or higher."
|
||||||
|
echo "See https://docs.docker.com/compose/install/#install-compose for installation instructions."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Enter an hostname for the Proxy (eg: https://pipedproxy.kavin.rocks):"
|
echo "Enter an url for the Frontend (eg: https://piped.kavin.rocks):" && read -r frontend_url
|
||||||
read proxy_url
|
|
||||||
|
|
||||||
echo "Enter the reverse proxy you would like to use (either caddy or nginx):"
|
echo "Enter an url for the Backend (eg: https://pipedapi.kavin.rocks):"" && read -r backend_url
|
||||||
read reverseproxy
|
|
||||||
|
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/
|
rm -rf config/
|
||||||
rm -f docker-compose.yml
|
rm -f docker-compose.yml
|
||||||
|
@ -27,4 +38,9 @@ sed -i "s@FRONTEND_HOSTNAME@$frontend_hostname@g" config/*
|
||||||
sed -i "s@BACKEND_HOSTNAME@$backend_hostname@g" config/*
|
sed -i "s@BACKEND_HOSTNAME@$backend_hostname@g" config/*
|
||||||
sed -i "s@PROXY_HOSTNAME@$proxy_hostname@g" config/*
|
sed -i "s@PROXY_HOSTNAME@$proxy_hostname@g" config/*
|
||||||
|
|
||||||
|
# The openj9 image does not support aarch64
|
||||||
|
if [[ "$(uname -m)" == "aarch64" ]]; then
|
||||||
|
sed -i "s/piped:latest/piped:hotspot/g" config/*
|
||||||
|
fi
|
||||||
|
|
||||||
mv config/docker-compose.$reverseproxy.yml docker-compose.yml
|
mv config/docker-compose.$reverseproxy.yml docker-compose.yml
|
||||||
|
|
|
@ -5,7 +5,9 @@ services:
|
||||||
depends_on:
|
depends_on:
|
||||||
- piped
|
- piped
|
||||||
container_name: piped-frontend
|
container_name: piped-frontend
|
||||||
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;"'
|
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:
|
ytproxy:
|
||||||
image: 1337kavin/ytproxy:latest
|
image: 1337kavin/ytproxy:latest
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
@ -29,7 +31,8 @@ services:
|
||||||
depends_on:
|
depends_on:
|
||||||
- piped
|
- piped
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ash -c "wget --no-verbose --tries=1 --spider 127.0.0.1:80/trending?region=US || (varnishreload && exit 1)"
|
test: ash -c "wget --no-verbose --tries=1 --spider 127.0.0.1:80/feed ||
|
||||||
|
(varnishreload && exit 1)"
|
||||||
interval: 10s
|
interval: 10s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 1
|
retries: 1
|
||||||
|
@ -67,5 +70,5 @@ services:
|
||||||
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:
|
volumes:
|
||||||
caddy_data:
|
caddy_data: null
|
||||||
ytproxy:
|
ytproxy: null
|
||||||
|
|
|
@ -5,7 +5,9 @@ services:
|
||||||
depends_on:
|
depends_on:
|
||||||
- piped
|
- piped
|
||||||
container_name: piped-frontend
|
container_name: piped-frontend
|
||||||
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;"'
|
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:
|
ytproxy:
|
||||||
image: 1337kavin/ytproxy:latest
|
image: 1337kavin/ytproxy:latest
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
@ -29,7 +31,8 @@ services:
|
||||||
depends_on:
|
depends_on:
|
||||||
- piped
|
- piped
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ash -c "wget --no-verbose --tries=1 --spider 127.0.0.1:80/trending?region=US || (varnishreload && exit 1)"
|
test: ash -c "wget --no-verbose --tries=1 --spider 127.0.0.1:80/feed ||
|
||||||
|
(varnishreload && exit 1)"
|
||||||
interval: 10s
|
interval: 10s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 1
|
retries: 1
|
||||||
|
@ -73,4 +76,4 @@ services:
|
||||||
container_name: watchtower
|
container_name: watchtower
|
||||||
command: piped-frontend piped-backend ytproxy varnish nginx postgres watchtower
|
command: piped-frontend piped-backend ytproxy varnish nginx postgres watchtower
|
||||||
volumes:
|
volumes:
|
||||||
ytproxy:
|
ytproxy: null
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue