mirror of
https://codeberg.org/Hyperpipe/Docker
synced 2024-12-06 19:16:44 +01:00
Merge pull request 'refactor: use env variables to configure frontend' (#2) from bnyro/Hyperpipe-Docker:main into main
Reviewed-on: https://codeberg.org/Hyperpipe/Docker/pulls/2 Reviewed-by: Shiny Nematoda <snematoda@noreply.codeberg.org>
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
hyperpipe-frontend:
|
||||
image: codeberg.org/hyperpipe/hyperpipe:latest
|
||||
container_name: hyperpipe-frontend
|
||||
environment:
|
||||
- HYP_API=HYPERPIPE_API_URL
|
||||
- PIPED_API=PIPED_API_URL
|
||||
restart: unless-stopped
|
||||
entrypoint: sh -c 'find /usr/share/nginx/html -type f -exec sed -i s/pipedapi.kavin.rocks/PIPED/g {} \; -exec sed -i s/hyperpipeapi.onrender.com/BACKEND/g {} \; && /docker-entrypoint.sh && nginx -g "daemon off;"'
|
||||
ports:
|
||||
- '8080:80'
|
||||
hyperpipe-backend:
|
||||
image: codeberg.org/hyperpipe/hyperpipe-backend:latest
|
||||
container_name: hyperpipe-backend
|
||||
environment:
|
||||
- HYP_PROXY=hyperpipe-proxy.onrender.com
|
||||
- HYP_PROXY=PIPED_PROXY_URL
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- '3000:3000'
|
||||
@@ -26,4 +26,4 @@ services:
|
||||
environment:
|
||||
- WATCHTOWER_CLEANUP=true
|
||||
- WATCHTOWER_INCLUDE_RESTARTING=true
|
||||
command: hyperpipe-frontend hyperpipe-backend watchtower
|
||||
command: hyperpipe-frontend hyperpipe-backend watchtower
|
||||
|
||||
@@ -18,10 +18,10 @@ rm -f "*/docker-compose.yml"
|
||||
|
||||
cp docker-compose.template.yml docker-compose.yml
|
||||
|
||||
sed -i "s/hyperpipe-proxy.onrender.com/$proxy/g" docker-compose.yml
|
||||
sed -i "s/PIPED_PROXY_URL/$proxy/g" docker-compose.yml
|
||||
|
||||
sed -i "s/PIPED/$piped/g" docker-compose.yml
|
||||
sed -i "s/PIPED_API_URL/$piped/g" docker-compose.yml
|
||||
|
||||
sed -i "s/BACKEND/$backend/g" docker-compose.yml
|
||||
sed -i "s/HYPERPIPE_API_URL/$backend/g" docker-compose.yml
|
||||
|
||||
printf '\nDone!\n'
|
||||
printf '\nDone!\n'
|
||||
|
||||
Reference in New Issue
Block a user