Skip to content

Commit

Permalink
fix(docker): shell script errors in nginx container startup
Browse files Browse the repository at this point in the history
  • Loading branch information
mikonse committed Feb 11, 2024
1 parent c42f656 commit 046e752
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

[Compare the full difference.](https://github.com/SFTtech/abrechnung/compare/v0.13.1...HEAD)

- fix frontend docker container startup

## 0.13.0 (2024-02-04)

[Compare the full difference.](https://github.com/SFTtech/abrechnung/compare/v0.13.0...v0.13.1)
Expand Down
14 changes: 11 additions & 3 deletions docker/entrypoint-frontend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

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"
if [ -n "${ABRECHNUNG_API__HOST}" ]; then
sed -i "s/ api:/ ${ABRECHNUNG_API__HOST}:/g" "$CONF"
fi

if [ -n "${ABRECHNUNG_API__PORT}" ]; then
sed -i "s/:8080;/:${ABRECHNUNG_API__PORT};/g" "$CONF"
fi

if [ ! -f "/proc/net/if_inet6" ]; then
sed -i "s/ listen \[::\]/ #listen \[::\]/g" "$CONF"
fi

0 comments on commit 046e752

Please sign in to comment.