Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion init/alembic.ini.j2
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[alembic]
# path to migration scripts
script_location = /opt/rucio/lib/rucio/db/sqla/migrate_repo/
script_location = {{ RUCIO_DIR }}/db/sqla/migrate_repo/

# template used to generate migration files
# file_template = %%(rev)s_%%(slug)s
Expand Down
6 changes: 2 additions & 4 deletions init/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash -e

export RUCIO_DIR=$(python3 -c "import rucio, os; print(os.path.dirname(rucio.__file__))")

if [ -f /opt/rucio/etc/rucio.cfg ]; then
echo "rucio.cfg already mounted."
else
Expand All @@ -17,8 +19,4 @@ fi

j2 /tmp/alembic.ini.j2 | sed '/^\s*$/d' > /opt/rucio/etc/alembic.ini

alembic init /opt/rucio/lib/rucio/db/sqla/migrate_repo/

alembic -c /opt/rucio/etc/alembic.ini upgrade head

python3 /tmp/bootstrap.py