12 lines
330 B
Bash
12 lines
330 B
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
# Default value for API_SERVER_URL if not provided
|
|
API_SERVER_URL=${API_SERVER_URL:-http://api-server:8888/}
|
|
|
|
# Replace the environment variable in the nginx config
|
|
envsubst '${API_SERVER_URL}' < /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf
|
|
|
|
# Start nginx
|
|
exec nginx -g 'daemon off;'
|