Skip to content

Commit

Permalink
Perform env-var replacements at runtime.
Browse files Browse the repository at this point in the history
  • Loading branch information
ameir committed Jun 10, 2024
1 parent 545af29 commit ed9001d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,7 @@ RUN set -x \
-e '/\[vhost:www.example.com\]/,$d' \
-e '/^cookie-timeout = /{s/300/3600/}' \
-e 's/^isolate-workers/#isolate-workers/' /etc/ocserv/ocserv.conf > /tmp/ocserv.conf \
&& cat /tmp/routes.txt >> /tmp/ocserv.conf \
&& envsubst < /tmp/ocserv.conf > /etc/ocserv/ocserv.conf \
&& rm -f /tmp/ocserv.conf
&& cat /tmp/routes.txt >> /tmp/ocserv.conf

WORKDIR /etc/ocserv

Expand Down
3 changes: 3 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,8 @@ mkdir -p /dev/net
mknod /dev/net/tun c 10 200
chmod 600 /dev/net/tun

# Update config
envsubst < /tmp/ocserv.conf > /etc/ocserv/ocserv.conf

# Run OpennConnect Server
exec "$@"

0 comments on commit ed9001d

Please sign in to comment.