Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
healthchecks
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
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
LOGIN-NUAGE
healthchecks
Commits
63a39b2d
Commit
63a39b2d
authored
10 months ago
by
Helene Coullon
Browse files
Options
Downloads
Patches
Plain Diff
push .sh
parent
74467078
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
postgres.sh
+21
-0
21 additions, 0 deletions
postgres.sh
redis.sh
+10
-0
10 additions, 0 deletions
redis.sh
with
31 additions
and
0 deletions
postgres.sh
0 → 100755
+
21
−
0
View file @
63a39b2d
#!/bin/bash
set
-eo
pipefail
host
=
"
$(
hostname
-i
||
echo
'127.0.0.1'
)
"
user
=
"
${
POSTGRES_USER
:-
postgres
}
"
db
=
"
${
POSTGRES_DB
:-
$POSTGRES_USER
}
"
export
PGPASSWORD
=
"
${
POSTGRES_PASSWORD
:-}
"
args
=(
# force postgres to not use the local unix socket (test "external" connectibility)
--host
"
$host
"
--username
"
$user
"
--dbname
"
$db
"
--quiet
--no-align
--tuples-only
)
if select
=
"
$(
echo
'SELECT 1'
| psql
"
${
args
[@]
}
"
)
"
&&
[
"
$select
"
=
'1'
]
;
then
exit
0
fi
exit
1
This diff is collapsed.
Click to expand it.
redis.sh
0 → 100755
+
10
−
0
View file @
63a39b2d
#!/bin/sh
set
-eo
pipefail
host
=
"
$(
hostname
-i
||
echo
'127.0.0.1'
)
"
if
ping
=
"
$(
redis-cli
-h
"
$host
"
ping
)
"
&&
[
"
$ping
"
=
'PONG'
]
;
then
exit
0
fi
exit
1
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