mirror of
https://github.com/quay/quay.git
synced 2026-01-26 06:21:37 +03:00
Add an option for running Quay without running database migrations (#312)
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
import os
|
||||
|
||||
from app import app
|
||||
from active_migration import ActiveDataMigration
|
||||
|
||||
|
||||
def current_migration():
|
||||
if os.getenv("ENSURE_NO_MIGRATION", "").lower() == "true":
|
||||
raise Exception("Cannot call migration when ENSURE_NO_MIGRATION is true")
|
||||
|
||||
if not app.config.get("SETUP_COMPLETE", False):
|
||||
return "head"
|
||||
else:
|
||||
|
||||
@@ -71,6 +71,16 @@ case "$QUAYENTRY" in
|
||||
echo "Entering repository mirroring mode"
|
||||
export QUAY_SERVICES="${QUAY_SERVICES}${QUAY_SERVICES:+,}repomirrorworker,pushgateway"
|
||||
;&
|
||||
"registry-nomigrate")
|
||||
echo "Running all default registry services without migration"
|
||||
for f in "${QUAYCONF}"/init/*.sh; do
|
||||
if [ "$f" != "/quay-registry/conf/init/runmigration.sh" ]; then
|
||||
echo "Running init script '$f'"
|
||||
ENSURE_NO_MIGRATION=true "$f" || exit
|
||||
fi
|
||||
done
|
||||
exec supervisord -c "${QUAYCONF}/supervisord.conf" 2>&1
|
||||
;;
|
||||
"registry")
|
||||
if [ -z "${QUAY_SERVICES}" ]; then
|
||||
echo "Running all default registry services"
|
||||
|
||||
Reference in New Issue
Block a user