kopia lustrzana https://github.com/bugout-dev/moonstream
Flag for db name in env generation script
rodzic
b2f4dea8f3
commit
b4b1b09536
|
@ -213,7 +213,6 @@ configs/docker.env
|
|||
configs/docker.dev.env
|
||||
configs/docker.test.env
|
||||
configs/docker.prod.env
|
||||
configs/docker.moonstreamapi.env
|
||||
|
||||
.secrets/
|
||||
|
||||
|
|
|
@ -2,10 +2,33 @@
|
|||
|
||||
# Prepare Moonstream API application for docker-compose use
|
||||
|
||||
# Print help message
|
||||
function usage {
|
||||
echo "Usage: $0 [-h] -d DATABASE_NAME"
|
||||
echo
|
||||
echo "CLI to generate environment variables"
|
||||
echo
|
||||
echo "Optional arguments:"
|
||||
echo " -h Show this help message and exit"
|
||||
echo " -d Database name for postgres in docker-compose setup"
|
||||
}
|
||||
|
||||
FLAG_DATABASE_NAME="moonstream_dev"
|
||||
|
||||
while getopts 'd:' flag; do
|
||||
case "${flag}" in
|
||||
b) FLAG_DATABASE_NAME="${OPTARG}" ;;
|
||||
h) usage
|
||||
exit 1 ;;
|
||||
*) usage
|
||||
exit 1 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR="$(realpath $(dirname $0))"
|
||||
DOCKER_MOONSTREAM_DB_URI="postgresql://postgres:postgres@db/moonstream_dev"
|
||||
DOCKER_MOONSTREAM_DB_URI="postgresql://postgres:postgres@db/$FLAG_DATABASE_NAME"
|
||||
DOCKER_MOONSTREAM_ENV_FILE="docker.moonstreamapi.env"
|
||||
|
||||
# Generate environment variables
|
||||
|
|
|
@ -213,9 +213,13 @@ configs/docker.env
|
|||
configs/docker.dev.env
|
||||
configs/docker.test.env
|
||||
configs/docker.prod.env
|
||||
configs/docker.moonstreamdb.env
|
||||
|
||||
.secrets/
|
||||
|
||||
# Alembic migrations
|
||||
configs/alembic.test.ini
|
||||
configs/alembic.dev.ini
|
||||
configs/alembic.prod.ini
|
||||
|
||||
Dockerfile
|
||||
docker-compose.yml
|
||||
|
|
|
@ -2,10 +2,33 @@
|
|||
|
||||
# Prepare Moonstream DB application for docker-compose use
|
||||
|
||||
# Print help message
|
||||
function usage {
|
||||
echo "Usage: $0 [-h] -d DATABASE_NAME"
|
||||
echo
|
||||
echo "CLI to generate environment variables"
|
||||
echo
|
||||
echo "Optional arguments:"
|
||||
echo " -h Show this help message and exit"
|
||||
echo " -d Database name for postgres in docker-compose setup"
|
||||
}
|
||||
|
||||
FLAG_DATABASE_NAME="moonstream_dev"
|
||||
|
||||
while getopts 'd:' flag; do
|
||||
case "${flag}" in
|
||||
b) FLAG_DATABASE_NAME="${OPTARG}" ;;
|
||||
h) usage
|
||||
exit 1 ;;
|
||||
*) usage
|
||||
exit 1 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR="$(realpath $(dirname $0))"
|
||||
DOCKER_MOONSTREAMDB_DB_URI="postgresql://postgres:postgres@db/moonstream_dev"
|
||||
DOCKER_MOONSTREAMDB_DB_URI="postgresql://postgres:postgres@db/$FLAG_DATABASE_NAME"
|
||||
DOCKER_MOONSTREAMDB_ENV_FILE="docker.moonstreamdb.env"
|
||||
DOCKER_MOONSTREAMDB_ALEMBIC_FILE="alembic.moonstreamdb.ini"
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue