debug start script and separate routes into separate files
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
40
debug-build-run.sh
Executable file
40
debug-build-run.sh
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -x
|
||||
|
||||
IMAGE_NAME=numberimage
|
||||
|
||||
docker build --progress=plain -t $IMAGE_NAME .
|
||||
|
||||
|
||||
SECRETS=`mktemp`
|
||||
gpg --decrypt --passphrase $GPG_PASSPHRASE --yes --batch --output $SECRETS ./deployment/secrets.asc
|
||||
. $SECRETS
|
||||
rm $SECRETS
|
||||
|
||||
DB_NAMESPACE=database1
|
||||
DB_DEPLOYNAME=database
|
||||
|
||||
REDIS_NAMESPACE=redis
|
||||
REDIS_SERVICE_NAME=redis
|
||||
|
||||
PGHOST=`kubectl get services $DB_DEPLOYNAME -n $DB_NAMESPACE -o jsonpath="{.status.loadBalancer.ingress[0].ip}"`
|
||||
REDISHOST=`kubectl get services $REDIS_SERVICE_NAME -n $REDIS_NAMESPACE -o jsonpath="{.status.loadBalancer.ingress[0].ip}"`
|
||||
|
||||
REDIS_URL=redis://$REDISHOST:6379/4
|
||||
|
||||
|
||||
docker run \
|
||||
-it \
|
||||
--rm \
|
||||
-e "REDIS_URL=$REDIS_URL" \
|
||||
-e "SECRET_KEY=$SECRET_KEY" \
|
||||
-e "OIDC_CLIENT_SECRETS=$OIDC_CLIENT_SECRETS" \
|
||||
-e "PGHOST=$PGHOST" \
|
||||
-e "PGDATABASE=$PGDATABASE" \
|
||||
-e "PGSSLMODE=$PGSSLMODE" \
|
||||
-e "PGUSER=$PGUSER" \
|
||||
-e "PGPASSWORD=$PGPASSWORD" \
|
||||
-p 8080:8080 \
|
||||
$IMAGE_NAME
|
||||
|
||||
Reference in New Issue
Block a user