mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
reseed script
This commit is contained in:
parent
3ee9053623
commit
e49c5292e2
12
deployment/scripts/cluster.reseed.sh
Normal file
12
deployment/scripts/cluster.reseed.sh
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# base setup
|
||||||
|
SCRIPT_PATH=$(realpath $0)
|
||||||
|
SCRIPT_DIR=$(dirname $SCRIPT_PATH)
|
||||||
|
|
||||||
|
# configuration
|
||||||
|
CONFIGURATION=${CONFIGURATION:-"example"}
|
||||||
|
KUBECONFIG=${KUBECONFIG:-${SCRIPT_DIR}/../configurations/${CONFIGURATION}/kubeconfig.yaml}
|
||||||
|
|
||||||
|
# clean & seed
|
||||||
|
kubectl --kubeconfig=${KUBECONFIG} -n default exec -it $(kubectl --kubeconfig=${KUBECONFIG} -n default get pods | grep ocelot-backend | awk '{ print $1 }') -- /bin/sh -c "node --experimental-repl-await dist/db/clean.js && node --experimental-repl-await dist/db/seed.js"
|
||||||
Loading…
x
Reference in New Issue
Block a user