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 \
|
podman pod create \
|
||||||
-p 3000:3000 \
|
-p 3000:3000 \
|
||||||
-p 2052:2222 \
|
-p 2052:2222 \
|
||||||
|
-p 3001:9187 \
|
||||||
--replace \
|
--replace \
|
||||||
"code-forge"
|
"code-forge"
|
||||||
|
|
||||||
|
@ -50,21 +51,30 @@ until [[ $response = *"200 OK"* ]]; do
|
||||||
echo "Waiting for app to respond..."
|
echo "Waiting for app to respond..."
|
||||||
done
|
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
|
podman run -d \
|
||||||
chmod +x "$FORGEJO_RUNNER_ROOT"/forgejo-runner
|
--env-file "$ENV_FILE_DIR"/code-forge-exporter.env \
|
||||||
wget -O forgejo-runner.asc https://code.forgejo.org/forgejo/runner/releases/download/v3.3.0/forgejo-runner-3.3.0-linux-amd64.asc
|
--pod code-forge \
|
||||||
gpg --keyserver keys.openpgp.org --recv EB114F5E6C0DC2BCDD183550A4B61A2DC5923710
|
--replace \
|
||||||
gpg --verify forgejo-runner.asc "$FORGEJO_RUNNER_ROOT"/forgejo-runner
|
--name "code-forge-pg-exporter" \
|
||||||
rm forgejo-runner.asc
|
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
|
if [ -f "$FORGEJO_RUNNER_ROOT/.runner" ]; then
|
||||||
echo "Found runner state."
|
echo "Found runner state."
|
||||||
(
|
(
|
||||||
cd "$FORGEJO_RUNNER_ROOT" || exit
|
cd "$FORGEJO_RUNNER_ROOT" || exit
|
||||||
"$FORGEJO_RUNNER_ROOT"/forgejo-runner --config "${FORGEJO_RUNNER_CONFIG:=./config.yml}" daemon &
|
"$FORGEJO_RUNNER_ROOT"/forgejo-runner --config "${FORGEJO_RUNNER_CONFIG:=./config.yml}" daemon &
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
echo "Use $FORGEJO_RUNNER_ROOT/forgejo-runner register ... to register the runner"
|
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"
|
echo "Once registered, use $FORGEJO_RUNNER_ROOT/forgejo-runner --config <path-to-config> daemon & to start"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue