feat: add nginx entrypoint
This commit is contained in:
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
# nginx entrypoint for the model-platform gateway.
|
||||
#
|
||||
# Overrides the default nginx:alpine /docker-entrypoint.sh to render the
|
||||
# templated default.conf (mounted at /etc/nginx/conf.d/default.conf.template)
|
||||
# by substituting the single ${RUSTFS_ENDPOINT} placeholder, then writes
|
||||
# the result to /etc/nginx/conf.d/default.conf and execs the CMD
|
||||
# (typically `nginx -g 'daemon off;'`).
|
||||
#
|
||||
# Uses sed (busybox-safe) so no extra packages are needed.
|
||||
|
||||
set -eu
|
||||
|
||||
: "${RUSTFS_ENDPOINT:=http://rustfs:9000}"
|
||||
|
||||
sed \
|
||||
-e "s|\${RUSTFS_ENDPOINT}|${RUSTFS_ENDPOINT}|g" \
|
||||
/etc/nginx/conf.d/default.conf.template \
|
||||
> /etc/nginx/conf.d/default.conf
|
||||
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user