mirror of
https://gitee.com/blackfox/geekai.git
synced 2024-12-05 05:37:41 +08:00
26 lines
851 B
Bash
Executable File
26 lines
851 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-shenzhen.aliyuncs.com/geekmaster/chatgpt-plus-api:$version
|
|
# build docker image for chatgpt-plus-go
|
|
docker build -t registry.cn-shenzhen.aliyuncs.com/geekmaster/chatgpt-plus-api:$version -f dockerfile-api-go ../
|
|
|
|
# build docker image for chatgpt-plus-vue
|
|
docker rmi -f registry.cn-shenzhen.aliyuncs.com/geekmaster/chatgpt-plus-web:$version
|
|
docker build --platform linux/amd64 -t registry.cn-shenzhen.aliyuncs.com/geekmaster/chatgpt-plus-web:$version -f dockerfile-vue ../
|
|
|
|
if [ "$2" = "push" ];then
|
|
docker push registry.cn-shenzhen.aliyuncs.com/geekmaster/chatgpt-plus-api:$version
|
|
docker push registry.cn-shenzhen.aliyuncs.com/geekmaster/chatgpt-plus-web:$version
|
|
fi |