Skip to content
Snippets Groups Projects
Commit 117db3bf authored by Andrew Kapuscinski's avatar Andrew Kapuscinski
Browse files

added ability to run-migrations with the capo profile as an argument

parent 36d75532
No related branches found
No related tags found
No related merge requests found
# This is nrao:schema
# The purpose of this is just to run the alembic migrations against the database in a docker-compose environment
FROM nrao:workspaces-base
FROM marconi.aoc.nrao.edu/ops/base:workspaces
WORKDIR /code/schema
ENV CAPO_PROFILE docker
ENTRYPOINT ["./bin/run-migrations.sh"]
ENTRYPOINT ["./bin/run-migrations.sh", "docker"]
......@@ -2,7 +2,16 @@
# FOR USE WITH DOCKER DEVELOPMENT ENVIRONMENT ONLY.
# failfast
set -e
set -o pipefail
if [[ $# -eq 0 ]] ; then
echo 'ERROR: run-migrations requires an argument for CAPO_PROFILE'
exit 0
fi
# Python library installation
pip install -r requirements.txt
env CAPO_PROFILE=docker alembic upgrade head
env CAPO_PROFILE=$1 alembic upgrade head
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment