Skip to content

Commit

Permalink
docker-entrypoint.sh: only create /etc/nginx/conf.d/default.nginx.con…
Browse files Browse the repository at this point in the history
…f if it does not yet exist (fix #4)

Signed-off-by: Johannes Kastl <[email protected]>
  • Loading branch information
kastl-ars committed Dec 4, 2024
1 parent 459ddc5 commit c7d3146
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ else
sed -i "s^PLACEHOLDER_FOOTER_CONTENT^OpenCost version: $VERSION ($HEAD)^g" /var/www/*.js
fi

envsubst '$API_PORT $API_SERVER $UI_PORT' < /etc/nginx/conf.d/default.nginx.conf.template > /etc/nginx/conf.d/default.nginx.conf

if [[ ! -e /etc/nginx/conf.d/default.nginx.conf ]];then
envsubst '$API_PORT $API_SERVER $UI_PORT' < /etc/nginx/conf.d/default.nginx.conf.template > /etc/nginx/conf.d/default.nginx.conf
fi
echo "Starting OpenCost UI version $VERSION ($HEAD)"

# Run the parent (nginx) container's entrypoint script
Expand Down

0 comments on commit c7d3146

Please sign in to comment.