48 строки
832 B
Bash
Executable File
48 строки
832 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
if [[ "${CI}" ]]; then
|
|
set -x
|
|
fi
|
|
|
|
function usage() {
|
|
echo -n \
|
|
"Usage: $(basename "$0")
|
|
Sets up this project for development.
|
|
"
|
|
}
|
|
|
|
if [ "${BASH_SOURCE[0]}" = "${0}" ]; then
|
|
# Build docker containers
|
|
scripts/update
|
|
|
|
# Migrate the DB
|
|
echo "migrating..."
|
|
scripts/migrate
|
|
|
|
# Bring up servers
|
|
echo "Bringing up servers"
|
|
scripts/server --detached
|
|
|
|
echo "Ingesting development data..."
|
|
|
|
docker compose \
|
|
-f docker-compose.yml \
|
|
run --rm \
|
|
stac \
|
|
python3 /opt/src/pcstac/tests/loadtestdata.py
|
|
|
|
echo "Setting up azurite..."
|
|
|
|
docker compose \
|
|
-f docker-compose.yml \
|
|
-f docker-compose.dev.yml \
|
|
run --rm \
|
|
stac-dev \
|
|
python3 /opt/src/scripts/bin/setup_azurite.py
|
|
|
|
echo "Done."
|
|
|
|
fi
|