From a0701711be685758f13422c8b0153f3fadbc10ec Mon Sep 17 00:00:00 2001 From: Gao Hanxiang Date: Mon, 26 Jul 2021 10:49:44 -0400 Subject: [PATCH] feat: Add bootstrap support for skyline image When docker run, specify the KOLLA_BOOSTRAP environment variable, the skyline image will initialize the database, and if it is not specified, the skyline service will be run in the normal way. This provides the basis for subsequent docking with kolla-ansible. Change-Id: I5eaad038b3ed3c3189f2b41e41c14d28a346ee88 --- container/start_service.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/container/start_service.sh b/container/start_service.sh index fc85a13..4f89f44 100755 --- a/container/start_service.sh +++ b/container/start_service.sh @@ -7,6 +7,12 @@ echo "/usr/local/bin/gunicorn -c /etc/skyline/gunicorn.py skyline_apiserver.main mapfile -t CMD < <(tail /run_command | xargs -n 1) # kolla_extend_start +if [[ "${!KOLLA_BOOTSTRAP[*]}" ]]; then + cd /skyline/libs/skyline-apiserver/ + make db_sync + exit 0 +fi + nginx-generator -o /etc/nginx/nginx.conf nginx