mirror of
https://gitee.com/blackfox/geekai.git
synced 2024-12-05 13:47:47 +08:00
26 lines
848 B
Bash
Executable File
26 lines
848 B
Bash
Executable File
#!/bin/bash
|
|
|
|
version=$1
|
|
# build go api
|
|
cd ../api
|
|
make clean linux
|
|
|
|
# build web app
|
|
cd ../web
|
|
npm run build
|
|
|
|
cd ../docker
|
|
|
|
# remove docker image if exists
|
|
docker rmi -f registry.cn-hangzhou.aliyuncs.com/geekmaster/chatgpt-plus-go:$version
|
|
# build docker image for chatgpt-plus-go
|
|
docker build -t registry.cn-hangzhou.aliyuncs.com/geekmaster/chatgpt-plus-go:$version -f dockerfile-api-go ../
|
|
|
|
# build docker image for chatgpt-plus-vue
|
|
docker rmi -f registry.cn-hangzhou.aliyuncs.com/geekmaster/chatgpt-plus-vue:$version
|
|
docker build --platform linux/amd64 -t registry.cn-hangzhou.aliyuncs.com/geekmaster/chatgpt-plus-vue:$version -f dockerfile-vue ../
|
|
|
|
if [ "$2" = "push" ];then
|
|
docker push registry.cn-hangzhou.aliyuncs.com/geekmaster/chatgpt-plus-vue:$version
|
|
docker push registry.cn-hangzhou.aliyuncs.com/geekmaster/chatgpt-plus-go:$version
|
|
fi |