This is required for enabling custom logging. In future, we can leverage this for proxy caching as well. Not adding this nginx-root.conf.template file to the installation script because there's nothing for the user to configure there during installation. This file will be baked into the Dockerfile and only the environment variables will be replaced during container start.
8 lines
538 B
Bash
Executable File
8 lines
538 B
Bash
Executable File
#!/bin/sh
|
|
# This script is baked into the appsmith-editor Dockerfile and is used to boot Nginx when the Docker container starts
|
|
# Refer: /app/client/Dockerfile
|
|
set -ue
|
|
cat /nginx.conf.template | envsubst "$(printf '$%s,' $(env | grep -Eo '^APPSMITH_[A-Z0-9_]+'))" | sed -e 's|\${\(APPSMITH_[A-Z0-9_]*\)}||g' > /etc/nginx/conf.d/default.conf
|
|
cat /nginx-root.conf.template | envsubst "$(printf '$%s,' $(env | grep -Eo '^APPSMITH_[A-Z0-9_]+'))" | sed -e 's|\${\(APPSMITH_[A-Z0-9_]*\)}||g' > /etc/nginx/nginx.conf
|
|
exec nginx -g 'daemon off;'
|