In the past it was always useful to have meta data within regards to the SHA and build date/time. This adds in two new env vars that are written to disk as flat files and then exported to environment variables when the container starts up. This motivation comes from this comment: https://github.com/forem/forem/pull/9987#discussion_r476123829
16 lines
345 B
Bash
Executable file
16 lines
345 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
if [ -f tmp/pids/server.pid ]; then
|
|
rm -f tmp/pids/server.pid
|
|
fi
|
|
|
|
export RELEASE_FOOTPRINT=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
|
|
export FOREM_BUILD_DATE=$(cat FOREM_BUILD_DATE)
|
|
export FOREM_BUILD_SHA=$(cat FOREM_BUILD_SHA)
|
|
|
|
echo "Running rake app_initializer:setup..."
|
|
bundle exec rake app_initializer:setup
|
|
|
|
exec "$@"
|