Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
HAfAH
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
Analyze
Contributor 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
hive
HAfAH
Merge requests
!31
Add benchmark tests for CI
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Add benchmark tests for CI
kmochocki/ci_benchmarks
into
develop
Overview
0
Commits
7
Pipelines
9
Changes
1
Merged
Krzysztof Mochocki
requested to merge
kmochocki/ci_benchmarks
into
develop
2 years ago
Overview
0
Commits
7
Pipelines
9
Changes
1
Expand
0
0
Merge request reports
Viewing commit
4f6a32c8
Prev
Next
Show latest version
1 file
+
9
−
2
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
4f6a32c8
Add waiting mechanism for postgres to be up and running
· 4f6a32c8
Krzysztof Mochocki
authored
2 years ago
docker/docker_entrypoint.sh
+
9
−
2
Options
#! /bin/bash
set
-euo
pipefail
set
-euo
pipefail
SCRIPTDIR
=
"
$(
cd
--
"
$(
dirname
"
$0
"
)
"
>
/dev/null 2>&1
;
pwd
-P
)
"
@@ -8,7 +8,7 @@ cleanup () {
echo
"Performing cleanup...."
python_pid
=
$(
pidof
'python3'
)
echo
"python_pid:
$python_pid
"
kill
-INT
$python_pid
echo
"Waiting for hafah finish..."
@@ -34,6 +34,13 @@ done
pushd
/home/hafah_user/app
# credits: https://stackoverflow.com/a/39028690/11738218
RETRIES
=
12
until
psql
${
POSTGRES_URL
}
-c
"SELECT 1"
>
/dev/null 2>&1
||
[
$RETRIES
-eq
0
]
;
do
echo
"Waiting for postgres server,
$((
RETRIES--
))
remaining attempts..."
sleep
10
done
./scripts/setup_postgres.sh
--postgres-url
=
${
POSTGRES_URL
}
./scripts/setup_db.sh
--postgres-url
=
${
POSTGRES_URL
}
Loading