finance-dbt/debug-image.sh
沈楠 988f380833
Some checks failed
MJN/finance-dbt/pipeline/head There was a failure building this commit
init: create finance-dbt
2024-04-08 11:52:38 +08:00

35 lines
921 B
Bash

# build
tag=debug
docker_registry=docker-registry.mujiannan.com:5001
finance_dbt_image=${docker_registry}/mujiannan/finance-dbt:${tag}
docker build -t $finance_dbt_image . || exit 1
docker push $finance_dbt_image
# run
name=finance_dbt
docker stop $name || echo 'No container to stop...continue...'
docker rm $name || echo 'No container to remove...continue...'
docker run \
-d \
--env-file=.dev.env \
--name=$name \
$finance_dbt_image \
sleep 99d
# run doc-server
name=finance_dbt_doc
docker stop $name || echo 'No container to stop...continue...'
docker rm $name || echo 'No container to remove...continue...'
docker run \
-i \
-p 8080:8080 \
--env-file=.dev.env \
--name=$name \
--entrypoint=bash \
${finance_dbt_image} \
/app/doc-server.sh
## test kubernetes
export deployment=dev
export namespace=dev
export image_tag=debug
envsubst < deploy.yml | kubectl apply -f -