6e5c7aedc8
Add Devbox * adddevbox * cleanupdockerfile * testscripts
30 lines
875 B
Bash
30 lines
875 B
Bash
#!/bin/bash
|
|
|
|
# Automatically sets up your devbox environment whenever you cd into this
|
|
# directory via our direnv integration:
|
|
|
|
eval "$(devbox generate direnv --print-envrc)"
|
|
|
|
# check out https://www.jetpack.io/devbox/docs/ide_configuration/direnv/
|
|
# for more details
|
|
|
|
export APP_ENV="${APP_ENV:-development}"
|
|
export DB_USER="${DB_USER:-postgres}"
|
|
export DB_PASS="${DB_PASS:-pass}"
|
|
export DB_HOST="${DB_HOST:-localhost}"
|
|
export DB_PORT="${DB_PORT:-5432}"
|
|
export DB_NAME="${DB_NAME:-query_orchestration}"
|
|
export DB_URI="${DB_URI:-"postgres://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME}?sslmode=disable"}"
|
|
|
|
dotenv_if_exists .env
|
|
|
|
env_vars_required APP_ENV
|
|
env_vars_required QUEUE_URL
|
|
env_vars_required DB_USER DB_PASS DB_HOST DB_PORT DB_NAME
|
|
|
|
ALLOWED_ENVS=("development","production")
|
|
|
|
if [[ ! $ALLOWED_ENVS[@] =~ $APP_ENV ]]; then
|
|
echo APP_ENV invalid
|
|
exit 1
|
|
fi |