1
0
mirror of https://github.com/chatopera/cosin.git synced 2025-08-01 16:38:02 +08:00

#43 import database by default

This commit is contained in:
Hai Liang Wang 2018-09-04 13:23:06 +08:00
parent 6923bf3d50
commit 4c2cc4c87a
6 changed files with 14 additions and 68 deletions

View File

@ -7,7 +7,7 @@
baseDir=$(cd `dirname "$0"`;pwd)
appHome=$baseDir/..
registry=registry.chatopera.com
imagename=$registry/ada/contact-center
imagename=chatopera/contact-center
PACKAGE_VERSION=1.0.0
# functions

View File

@ -1,40 +0,0 @@
#! /bin/bash
###########################################
#
###########################################
# constants
baseDir=$(cd `dirname "$0"`;pwd)
JREBEL_HOME=~/java/jrebel
if [ -f $JREBEL_HOME/lib/libjrebel64.dylib ]; then
echo "jrebel is available."
else
echo "jrebel is unavailable."
echo "Please setup jrebel with https://github.com/Samurais/chatopera.io/issues/652"
exit 1
fi
if [ -f $baseDir/localrc ]; then
echo "Load localrc for environment variables ..."
set -x
source $baseDir/localrc
else
echo $baseDir/localrc "not exist."
echo "First, copy and modify the rc template."
echo "cp " $baseDir/localrc.sample $baseDir/localrc
exit 1
fi
# functions
function start(){
cd $baseDir/../app
mvn spring-boot:run -Dproject.rootdir=$baseDir/../app
\ -Drun.jvmArguments="-agentpath:$JREBEL_HOME/lib/libjrebel64.dylib"
}
# main
[ -z "${BASH_SOURCE[0]}" -o "${BASH_SOURCE[0]}" = "$0" ] || return
start

View File

@ -1,21 +0,0 @@
#! /bin/bash
###########################################
#
###########################################
# constants
baseDir=$(cd `dirname "$0"`;pwd)
TARGET=$baseDir/../app/target/classes
SRC=$baseDir/../app/src/main/resources
# functions
function copy(){
echo $SRC/$1 "override" $TARGET/$1 "..."
cd $SRC/$1
tar cf - .|(cd $TARGET/$1;tar xf -)
}
# main
[ -z "${BASH_SOURCE[0]}" -o "${BASH_SOURCE[0]}" = "$0" ] || return
copy templates
copy static

View File

@ -82,9 +82,9 @@ spring.hazelcast.config=classpath:config/hazelcast.xml
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:8889/ukefu-test?useUnicode=true&characterEncoding=UTF-8
spring.datasource.url=jdbc:mysql://localhost:3306/contactcenter?useUnicode=true&characterEncoding=UTF-8
spring.datasource.username=root
spring.datasource.password=root
spring.datasource.password=123456
#spring.datasource.driver-class-name=oracle.jdbc.driver.OracleDriver
#spring.datasource.url=jdbc:oracle:thin:@//127.0.0.1:1521/orcl
@ -150,5 +150,5 @@ cskefu.callout.watch.interval=60000
# Storage credentials
##############################################
storage.minio.url=http://192.168.2.217:9000
storage.minio.access_key=M19Q8YJ8FHVL9JGZ8WA1
storage.minio.secret_key=KHv6qjddHD4HfR1m7fjY7HglSOdWOSzIeTERRUUc
storage.minio.access_key=M19Q8YJ8FzLyQtST7r0
storage.minio.secret_key=KHv6qjddHD4HfR1m7fjY7HglSO1WOSzIeTERRUUc

View File

@ -17,6 +17,12 @@
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Create Database
-- ----------------------------
CREATE DATABASE IF NOT EXISTS `contactcenter` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
USE `contactcenter`;
-- ----------------------------
-- Table structure for cs_callout_log_dialplan
-- ----------------------------

View File

@ -5,7 +5,7 @@ services:
restart: always
environment:
- MYSQL_ROOT_PASSWORD=123456
- MYSQL_DATABASE=contact-center
- MYSQL_DATABASE=contactcenter
- MYSQL_USER=admin
- MYSQL_PASSWORD=admin123456
ports:
@ -13,6 +13,7 @@ services:
volumes:
- $PWD/mysql/data:/var/lib/mysql
- $PWD/mysql/config:/etc/mysql
- $PWD/contact-center/config/sql/cskefu-MySQL-slim.sql:/docker-entrypoint-initdb.d/0.cskefu-MySQL-slim.sql
redis:
image: redis:latest
@ -45,7 +46,7 @@ services:
- UK_IM_SERVER_THREADS=10
- SPRING_DATASOURCE_TYPE=com.alibaba.druid.pool.DruidDataSource
- SPRING_DATASOURCE_DRIVER_CLASS_NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_URL=jdbc:mysql://mysql:3306/contact-center?useUnicode=true&characterEncoding=UTF-8
- SPRING_DATASOURCE_URL=jdbc:mysql://mysql:3306/contactcenter?useUnicode=true&characterEncoding=UTF-8
- SPRING_DATASOURCE_USERNAME=root
- SPRING_DATASOURCE_PASSWORD=123456
- MANAGEMENT_SECURITY_ENABLED=false