Skip to content

Commit

Permalink
Fixed bug where sed would replace substring matches on every containe…
Browse files Browse the repository at this point in the history
…r restart
  • Loading branch information
RicardoJeronimo committed Feb 1, 2024
1 parent 8b6d93e commit b530fbe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docker/entrypoint-frontend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

CONF="/etc/nginx/conf.d/default.conf"

[ -n "${ABRECHNUNG_API__HOST}" ] && sed -i "s/api:/${ABRECHNUNG_API__HOST}:/g" "$CONF"
[ -n "${ABRECHNUNG_API__PORT}" ] && sed -i "s/:8080/:${ABRECHNUNG_API__PORT}/g" "$CONF"
[ ! -f "/proc/net/if_inet6" ] && sed -i "s/listen \[::\]/#listen \[::\]/g" "$CONF"
[ -n "${ABRECHNUNG_API__HOST}" ] && sed -i "s/ api:/ ${ABRECHNUNG_API__HOST}:/g" "$CONF"
[ -n "${ABRECHNUNG_API__PORT}" ] && sed -i "s/:8080;/:${ABRECHNUNG_API__PORT};/g" "$CONF"
[ ! -f "/proc/net/if_inet6" ] && sed -i "s/ listen \[::\]/ #listen \[::\]/g" "$CONF"

0 comments on commit b530fbe

Please sign in to comment.