feat: add pg exporter
This commit is contained in:
parent
20ee345bbf
commit
14d4daa844
1 changed files with 25 additions and 15 deletions
40
start.sh
40
start.sh
|
@ -17,6 +17,7 @@ fi
|
|||
podman pod create \
|
||||
-p 3000:3000 \
|
||||
-p 2052:2222 \
|
||||
-p 3001:9187 \
|
||||
--replace \
|
||||
"code-forge"
|
||||
|
||||
|
@ -50,21 +51,30 @@ until [[ $response = *"200 OK"* ]]; do
|
|||
echo "Waiting for app to respond..."
|
||||
done
|
||||
|
||||
wget -O "$FORGEJO_RUNNER_ROOT"/forgejo-runner https://code.forgejo.org/forgejo/runner/releases/download/v3.3.0/forgejo-runner-3.3.0-linux-amd64
|
||||
chmod +x "$FORGEJO_RUNNER_ROOT"/forgejo-runner
|
||||
wget -O forgejo-runner.asc https://code.forgejo.org/forgejo/runner/releases/download/v3.3.0/forgejo-runner-3.3.0-linux-amd64.asc
|
||||
gpg --keyserver keys.openpgp.org --recv EB114F5E6C0DC2BCDD183550A4B61A2DC5923710
|
||||
gpg --verify forgejo-runner.asc "$FORGEJO_RUNNER_ROOT"/forgejo-runner
|
||||
rm forgejo-runner.asc
|
||||
podman run -d \
|
||||
--env-file "$ENV_FILE_DIR"/code-forge-exporter.env \
|
||||
--pod code-forge \
|
||||
--replace \
|
||||
--name "code-forge-pg-exporter" \
|
||||
quay.io/prometheuscommunity/postgres-exporter
|
||||
|
||||
if [[ -n $START_RUNNER ]]; then
|
||||
wget -O "$FORGEJO_RUNNER_ROOT"/forgejo-runner https://code.forgejo.org/forgejo/runner/releases/download/v3.3.0/forgejo-runner-3.3.0-linux-amd64
|
||||
chmod +x "$FORGEJO_RUNNER_ROOT"/forgejo-runner
|
||||
wget -O forgejo-runner.asc https://code.forgejo.org/forgejo/runner/releases/download/v3.3.0/forgejo-runner-3.3.0-linux-amd64.asc
|
||||
gpg --keyserver keys.openpgp.org --recv EB114F5E6C0DC2BCDD183550A4B61A2DC5923710
|
||||
gpg --verify forgejo-runner.asc "$FORGEJO_RUNNER_ROOT"/forgejo-runner
|
||||
rm forgejo-runner.asc
|
||||
|
||||
|
||||
if [ -f "$FORGEJO_RUNNER_ROOT/.runner" ]; then
|
||||
echo "Found runner state."
|
||||
(
|
||||
cd "$FORGEJO_RUNNER_ROOT" || exit
|
||||
"$FORGEJO_RUNNER_ROOT"/forgejo-runner --config "${FORGEJO_RUNNER_CONFIG:=./config.yml}" daemon &
|
||||
)
|
||||
else
|
||||
echo "Use $FORGEJO_RUNNER_ROOT/forgejo-runner register ... to register the runner"
|
||||
echo "Once registered, use $FORGEJO_RUNNER_ROOT/forgejo-runner --config <path-to-config> daemon & to start"
|
||||
if [ -f "$FORGEJO_RUNNER_ROOT/.runner" ]; then
|
||||
echo "Found runner state."
|
||||
(
|
||||
cd "$FORGEJO_RUNNER_ROOT" || exit
|
||||
"$FORGEJO_RUNNER_ROOT"/forgejo-runner --config "${FORGEJO_RUNNER_CONFIG:=./config.yml}" daemon &
|
||||
)
|
||||
else
|
||||
echo "Use $FORGEJO_RUNNER_ROOT/forgejo-runner register ... to register the runner"
|
||||
echo "Once registered, use $FORGEJO_RUNNER_ROOT/forgejo-runner --config <path-to-config> daemon & to start"
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue