Merge pull request #42 from TeamPiped/frontend-env

refactor: use BACKEND_HOSTNAME env instead of ash entrypoint
This commit is contained in:
Bnyro 2024-06-15 15:00:16 +02:00 committed by GitHub
commit b6f7da34b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 11 deletions

View File

@ -9,8 +9,11 @@ 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/*
conffiles=$(find config/ -type f ! -name '*.yml')
sed -i "s/FRONTEND_HOSTNAME/$frontend/g" $conffiles
sed -i "s/BACKEND_HOSTNAME/$backend/g" $conffiles
sed -i "s/PROXY_HOSTNAME/$proxy/g" $conffiles
sed -i "s/BACKEND_HOSTNAME_PLACEHOLDER/$backend/g" config/*.yml
mv config/docker-compose.$reverseproxy.yml docker-compose.yml

View File

@ -1,13 +1,12 @@
version: "3"
services:
pipedfrontend:
piped-frontend:
image: 1337kavin/piped-frontend:latest
restart: unless-stopped
depends_on:
- piped
environment:
BACKEND_HOSTNAME: BACKEND_HOSTNAME_PLACEHOLDER
container_name: piped-frontend
entrypoint: ash -c 'sed -i s/pipedapi.kavin.rocks/BACKEND_HOSTNAME/g /usr/share/nginx/html/assets/* && /docker-entrypoint.sh && nginx -g "daemon off;"'
piped-proxy:
image: 1337kavin/piped-proxy:latest
restart: unless-stopped

View File

@ -1,13 +1,12 @@
version: "3"
services:
pipedfrontend:
piped-frontend:
image: 1337kavin/piped-frontend:latest
restart: unless-stopped
depends_on:
- piped
environment:
BACKEND_HOSTNAME: BACKEND_HOSTNAME_PLACEHOLDER
container_name: piped-frontend
entrypoint: ash -c 'sed -i s/pipedapi.kavin.rocks/BACKEND_HOSTNAME/g /usr/share/nginx/html/assets/* && /docker-entrypoint.sh && nginx -g "daemon off;"'
piped-proxy:
image: 1337kavin/piped-proxy:latest
restart: unless-stopped