1
0
mirror of https://github.com/chatopera/cosin.git synced 2025-07-20 04:23:01 +08:00
This commit is contained in:
Hai Liang Wang 2021-10-17 10:19:44 +08:00
parent 9b09839c20
commit e4003e3d30
2 changed files with 11 additions and 4 deletions

View File

@ -6,7 +6,7 @@
# constants # constants
baseDir=$(cd `dirname "$0"`;pwd) baseDir=$(cd `dirname "$0"`;pwd)
appHome=$baseDir/.. appHome=$baseDir/..
registryName=dockerhub.qingcloud.com registryPrefix=
imagename=chatopera/contact-center imagename=chatopera/contact-center
TIMESTAMP=`date "+%Y%m%d.%H%M%S"` TIMESTAMP=`date "+%Y%m%d.%H%M%S"`
@ -16,6 +16,10 @@ TIMESTAMP=`date "+%Y%m%d.%H%M%S"`
[ -z "${BASH_SOURCE[0]}" -o "${BASH_SOURCE[0]}" = "$0" ] || return [ -z "${BASH_SOURCE[0]}" -o "${BASH_SOURCE[0]}" = "$0" ] || return
# build # build
cd $appHome cd $appHome
if [ -d ../private ]; then
registryPrefix=dockerhub.qingcloud.com/
fi
PACKAGE_VERSION=`git rev-parse --short HEAD` PACKAGE_VERSION=`git rev-parse --short HEAD`
set -x set -x
@ -29,10 +33,10 @@ docker build --build-arg VCS_REF=$PACKAGE_VERSION \
--build-arg APPLICATION_BUILD_DATESTR=$TIMESTAMP \ --build-arg APPLICATION_BUILD_DATESTR=$TIMESTAMP \
--build-arg APPLICATION_CUSTOMER_ENTITY=$APPLICATION_CUSTOMER_ENTITY \ --build-arg APPLICATION_CUSTOMER_ENTITY=$APPLICATION_CUSTOMER_ENTITY \
--no-cache \ --no-cache \
--force-rm=true --tag $registryName/$imagename:$PACKAGE_VERSION . --force-rm=true --tag $registryPrefix$imagename:$PACKAGE_VERSION .
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
docker tag $registryName/$imagename:$PACKAGE_VERSION $registryName/$imagename:develop docker tag $registryPrefix$imagename:$PACKAGE_VERSION $registryPrefix$imagename:develop
else else
echo "Build contact-center failure." echo "Build contact-center failure."
exit 1 exit 1

View File

@ -1,5 +1,8 @@
# https://docs.docker.com/compose/reference/envvars/#compose_file # https://docs.docker.com/compose/reference/envvars/#compose_file
# for Enterprise edition: docker-compose.yml:./private/docker-compose.ext.yml # use Enterprise edition: docker-compose.yml:./private/docker-compose.ext.yml
# use other customize yml, copy docker-compose.yml as docker-compose.custom.yml
# and edit .env with COMPOSE_FILE=docker-compose.custom.yml, docker-compose.custom.yml
# is ignored with .gitignore
COMPOSE_FILE=docker-compose.yml COMPOSE_FILE=docker-compose.yml
COMPOSE_PROJECT_NAME=cskefu COMPOSE_PROJECT_NAME=cskefu