mirror of
https://github.com/TeamPiped/Piped-Docker.git
synced 2024-08-14 23:56:53 +00:00
fix in handling nginx ports in docker compose
This commit is contained in:
parent
ca75f035a6
commit
71d49c795b
2 changed files with 5 additions and 3 deletions
|
@ -20,6 +20,8 @@ frontend_port=$(echo "$frontend_url"| awk -F[/:] '{print $5}'| { read -d '' port
|
||||||
backend_port=$(echo "$backend_url"| awk -F[/:] '{print $5}'| { read -d '' port; [ -z "$port" ] && { [ "$backend_schema" = "https" ] && echo "443" || echo "80"; } || echo "$port"; })
|
backend_port=$(echo "$backend_url"| awk -F[/:] '{print $5}'| { read -d '' port; [ -z "$port" ] && { [ "$backend_schema" = "https" ] && echo "443" || echo "80"; } || echo "$port"; })
|
||||||
proxy_port=$(echo "$proxy_url"| awk -F[/:] '{print $5}'| { read -d '' port; [ -z "$port" ] && { [ "$proxy_schema" = "https" ] && echo "443" || echo "80"; } || echo "$port"; })
|
proxy_port=$(echo "$proxy_url"| awk -F[/:] '{print $5}'| { read -d '' port; [ -z "$port" ] && { [ "$proxy_schema" = "https" ] && echo "443" || echo "80"; } || echo "$port"; })
|
||||||
|
|
||||||
|
nginx_ports=$(printf "$frontend_port\n$backend_port\n$proxy_port\n"|uniq|while read -r port; do printf " - \"$port:$port\"\\\n"; done)
|
||||||
|
|
||||||
sed -i '' "s@FRONT_URL@$frontend_url@g" config/*
|
sed -i '' "s@FRONT_URL@$frontend_url@g" config/*
|
||||||
sed -i '' "s@BACKEND_URL@$backend_url@g" config/*
|
sed -i '' "s@BACKEND_URL@$backend_url@g" config/*
|
||||||
sed -i '' "s@PROXY_URL@$proxy_url@g" config/*
|
sed -i '' "s@PROXY_URL@$proxy_url@g" config/*
|
||||||
|
@ -32,6 +34,8 @@ sed -i '' "s@FRONTEND_PORT@$frontend_port@g" config/*
|
||||||
sed -i '' "s@BACKEND_PORT@$backend_port@g" config/*
|
sed -i '' "s@BACKEND_PORT@$backend_port@g" config/*
|
||||||
sed -i '' "s@PROXY_PORT@$proxy_port@g" config/*
|
sed -i '' "s@PROXY_PORT@$proxy_port@g" config/*
|
||||||
|
|
||||||
|
sed -i '' "s@NGINX_PORTS@$nginx_ports@g" config/*
|
||||||
|
|
||||||
# The openj9 image does not support aarch64
|
# The openj9 image does not support aarch64
|
||||||
if [[ "$(uname -m)" == "aarch64" ]]; then
|
if [[ "$(uname -m)" == "aarch64" ]]; then
|
||||||
sed -i '' "s/piped:latest/piped:hotspot/g" config/*
|
sed -i '' "s/piped:latest/piped:hotspot/g" config/*
|
||||||
|
|
|
@ -39,9 +39,7 @@ services:
|
||||||
image: nginx:mainline-alpine
|
image: nginx:mainline-alpine
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "FRONTEND_PORT:FRONTEND_PORT"
|
NGINX_PORTS
|
||||||
- "BACKEND_PORT:BACKEND_PORT"
|
|
||||||
- "PROXY_PORT:PROXY_PORT"
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./config/nginx.conf:/etc/nginx/nginx.conf:ro
|
- ./config/nginx.conf:/etc/nginx/nginx.conf:ro
|
||||||
- ./config/pipedapi.conf:/etc/nginx/conf.d/pipedapi.conf:ro
|
- ./config/pipedapi.conf:/etc/nginx/conf.d/pipedapi.conf:ro
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue