From 2607157413e07649d4e6a80d1107919ccaaf95db Mon Sep 17 00:00:00 2001 From: FireMasterK <20838718+FireMasterK@users.noreply.github.com> Date: Wed, 25 Aug 2021 17:21:03 +0530 Subject: [PATCH] Replace default api hostname in frontend. --- .gitignore | 1 + configure-instance.sh | 2 ++ docker-compose.yml => template/docker-compose.yml | 1 + 3 files changed, 4 insertions(+) rename docker-compose.yml => template/docker-compose.yml (92%) diff --git a/.gitignore b/.gitignore index 2171176..f169fd9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ config/ data/ +/docker-compose.yml diff --git a/configure-instance.sh b/configure-instance.sh index 76d7899..0c1eedb 100755 --- a/configure-instance.sh +++ b/configure-instance.sh @@ -14,3 +14,5 @@ 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/* + +mv config/docker-compose.yml docker-compose.yml diff --git a/docker-compose.yml b/template/docker-compose.yml similarity index 92% rename from docker-compose.yml rename to template/docker-compose.yml index 7badbfe..aad90c1 100644 --- a/docker-compose.yml +++ b/template/docker-compose.yml @@ -5,6 +5,7 @@ services: depends_on: - piped 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;"' ytproxy: image: 1337kavin/ytproxy:latest restart: unless-stopped