Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
General
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitLab CI/CD
General
Commits
68e5741a
Commit
68e5741a
authored
2 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
Wait for datacore to start
parent
1df22019
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
datacore.yml
+18
-1
18 additions, 1 deletion
datacore.yml
with
18 additions
and
1 deletion
datacore.yml
+
18
−
1
View file @
68e5741a
...
...
@@ -25,6 +25,8 @@ DeployDataCore:
-
curl https://gitlab.lakedrops.com/gitlab-ci-cd/general/-/raw/main/templates/datacore/docker-compose.yml -o docker-compose.yml --silent
-
sed -i "s/DATACORE_PRJID_PLACEHOLDER/${CI_PROJECT_ID}/g" docker-compose.yml
-
sed -i "s/DATACORE_BRANCH_PLACEHOLDER/${CI_COMMIT_REF_NAME}/g" docker-compose.yml
-
sed -i "s/DATACORE_DATA_DIRECTORY_PLACEHOLDER/${DATACORE_DATA_DIRECTORY}/g" docker-compose.yml
-
sed -i "s/DATACORE_PROFILE_PLACEHOLDER/${DATACORE_PROFILE}/g" docker-compose.yml
-
sed -i "s/ALERTA_API_KEY_PLACEHOLDER/${ALERTA_API_KEY}/g" docker-compose.yml
-
sed -i "s/ALERTA_ENVIRONMENT_PLACEHOLDER/${ALERTA_ENVIRONMENT}/g" docker-compose.yml
-
sed -i "s/ALERTA_PROJECT_ID_PLACEHOLDER/${ALERTA_PROJECT_ID}/g" docker-compose.yml
...
...
@@ -50,7 +52,22 @@ DeployDataCore:
-
docker compose up -d --quiet-pull --remove-orphans
-
docker compose exec -u root borgmatic chmod -R go-w-r-x /root/.ssh ||
true
-
if [[ ! -d borgdata/config/security ]]; then docker compose exec -u root borgmatic borgmatic --init --encryption repokey ||
true
; fi
-
sleep
10
-
|
echo "Wait for DataCore to be ready..."
REQUIRED="HTTP/1.1 200"
LOOP=15
until [ $LOOP -eq 0 ]
do
sleep 1
LOOP=$((LOOP-1))
if docker compose exec -u root app curl -I -s http://localhost:4100/v3/api-docs | grep "$REQUIRED";
then
echo "DataCore started successfully"
exit 0;
fi
done
echo "DataCore did not start within 15 seconds!"
exit 1;
variables
:
GIT_STRATEGY
:
none
cache
:
{}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment