finance-dbt/DebugImage.sh

35 lines
921 B
Bash
Raw Normal View History

2024-04-12 19:07:47 +08:00
# 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 -