Merge branch 'master' of ssh://10.10.14.176:222/bigdata/dsMin
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
7253a31d92
@ -0,0 +1,38 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: default
|
||||
platform:
|
||||
arch: amd64
|
||||
os: linux
|
||||
steps:
|
||||
- name: build_golang
|
||||
image: golang:1.16.4-buster
|
||||
commands:
|
||||
- export SRC=$DRONE_WORKSPACE
|
||||
- chmod 755 $SRC/docker/docker-compose.build.sh
|
||||
- $SRC/docker/docker-compose.build.sh
|
||||
- echo ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}-${DRONE_REPO_BRANCH}-${DRONE_COMMIT_SHA:0:8}>version
|
||||
|
||||
# - name: deploy
|
||||
# image: appleboy/drone-scp:linux-amd64
|
||||
# settings:
|
||||
# host: 10.10.14.176
|
||||
# port: 22
|
||||
# username: root
|
||||
# password: dsideal
|
||||
# target: /root/publish/bigdata
|
||||
# source: ./docker
|
||||
# rm: false
|
||||
|
||||
# - name: restart
|
||||
# image: appleboy/drone-ssh:linux-amd64
|
||||
# settings:
|
||||
# host: 10.10.14.176
|
||||
# port: 22
|
||||
# username: root
|
||||
# password: dsideal
|
||||
# script:
|
||||
# - cd /root/publish/bigdata/docker
|
||||
# - chmod 755 start.sh
|
||||
# - chmod 755 stop.sh
|
||||
# - ./start.sh
|
@ -0,0 +1,7 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="2345" type="GoRemoteDebugConfigurationType" factoryName="Go Remote">
|
||||
<option name="disconnectOption" value="STOP" />
|
||||
<disconnect value="STOP" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
@ -0,0 +1,6 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="2346" type="GoRemoteDebugConfigurationType" factoryName="Go Remote" port="2346">
|
||||
<option name="disconnectOption" value="ASK" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
@ -0,0 +1,6 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="2347" type="GoRemoteDebugConfigurationType" factoryName="Go Remote" port="2347">
|
||||
<option name="disconnectOption" value="ASK" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
@ -0,0 +1,6 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="2348" type="GoRemoteDebugConfigurationType" factoryName="Go Remote" port="2348">
|
||||
<option name="disconnectOption" value="ASK" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
@ -0,0 +1,6 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="2349" type="GoRemoteDebugConfigurationType" factoryName="Go Remote" port="2349">
|
||||
<option name="disconnectOption" value="ASK" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
@ -0,0 +1,19 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="docker: Compose dev" type="docker-deploy" factoryName="docker-compose.yml" server-name="Docker">
|
||||
<deployment type="docker-compose.yml">
|
||||
<settings>
|
||||
<option name="envFilePath" value="" />
|
||||
<option name="commandLineOptions" value="--build" />
|
||||
<option name="secondarySourceFiles">
|
||||
<list>
|
||||
<option value="docker/docker-compose.dev.yml" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="sourceFilePath" value="docker/docker-compose.yml" />
|
||||
<option name="upExitCodeFromService" value="" />
|
||||
<option name="upTimeout" value="" />
|
||||
</settings>
|
||||
</deployment>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
@ -0,0 +1,38 @@
|
||||
DATA=../data
|
||||
LOG=../log
|
||||
TZ=Asia/Shanghai
|
||||
|
||||
# IP
|
||||
IP=10.10.14.179
|
||||
|
||||
# windows:DOCKER_SOCK=//var/run/docker.sock
|
||||
DOCKER_SOCK=/var/run/docker.sock
|
||||
|
||||
# PORTAINER
|
||||
PORTAINER_PORT=9000
|
||||
PORTAINER_DATA=${DATA}/portainer
|
||||
|
||||
# REDIS
|
||||
REDIS_PORT=18890
|
||||
REDIS_DATA=${DATA}/redis
|
||||
|
||||
# MYSQL
|
||||
MYSQL_PORT=22066
|
||||
MYSQL_ROOT_PASSWORD=DsideaL147258369
|
||||
MYSQL_DATA=${DATA}/mariadb
|
||||
|
||||
# NGINX
|
||||
NGINX_HTTP_PORT=80
|
||||
NGINX_SSL_PORT=443
|
||||
NGINX_LOG=${LOG}/openresty
|
||||
|
||||
# ELASTICSEARCH
|
||||
ELASTICSEARCH_DATA=${DATA}/elasticsearch
|
||||
|
||||
# KAFKA
|
||||
KAFKA_DATA=${DATA}/kafka
|
||||
KAFKA_LOG=${LOG}/kafka
|
||||
|
||||
# GREENPLUM
|
||||
GREENPLUM_DATA=${DATA}/greenplum
|
||||
GREENPLUM_LOG=${LOG}/greenplum
|
@ -0,0 +1,5 @@
|
||||
tmp
|
||||
log
|
||||
data
|
||||
app
|
||||
.env
|
@ -0,0 +1,23 @@
|
||||
FROM golang:1.16.5-buster as build
|
||||
|
||||
RUN go env -w GOPROXY=https://goproxy.cn
|
||||
RUN go get github.com/go-delve/delve/cmd/dlv
|
||||
|
||||
ARG MODULE
|
||||
ADD . /go/src/$MODULE
|
||||
WORKDIR /go/src/$MODULE
|
||||
|
||||
RUN go build -gcflags "all=-N -l" -o /example main.go
|
||||
|
||||
FROM debian:buster-20210511 as Final
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=build /go/bin/dlv /
|
||||
COPY --from=build /example .
|
||||
COPY *Config ./Config
|
||||
COPY *Xml ./Xml
|
||||
COPY *Sql ./Sql
|
||||
COPY *docs ./docs
|
||||
COPY *Shell ./
|
||||
|
||||
CMD /dlv --headless --listen=:2345 --api-version=2 --accept-multiclient exec /app/example
|
@ -0,0 +1 @@
|
||||
docker-compose -f docker-compose.build.yml up
|
@ -0,0 +1 @@
|
||||
docker-compose -f docker-compose.build.yml up
|
@ -0,0 +1,22 @@
|
||||
process.roles=broker,controller
|
||||
node.id=1
|
||||
controller.quorum.voters=1@localhost:9093
|
||||
listeners=PLAINTEXT://:9092,CONTROLLER://:9093
|
||||
inter.broker.listener.name=PLAINTEXT
|
||||
advertised.listeners=PLAINTEXT://kafka:9092
|
||||
controller.listener.names=CONTROLLER
|
||||
listener.security.protocol.map=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,SSL:SSL,SASL_PLAINTEXT:SASL_PLAINTEXT,SASL_SSL:SASL_SSL
|
||||
num.network.threads=3
|
||||
num.io.threads=8
|
||||
socket.send.buffer.bytes=102400
|
||||
socket.receive.buffer.bytes=102400
|
||||
socket.request.max.bytes=104857600
|
||||
log.dirs=/tmp/kraft-combined-logs
|
||||
num.partitions=1
|
||||
num.recovery.threads.per.data.dir=1
|
||||
offsets.topic.replication.factor=1
|
||||
transaction.state.log.replication.factor=1
|
||||
transaction.state.log.min.isr=1
|
||||
log.retention.hours=168
|
||||
log.segment.bytes=1073741824
|
||||
log.retention.check.interval.ms=300000
|
@ -0,0 +1,4 @@
|
||||
CREATE DATABASE exampledb;
|
||||
CREATE USER 'slave'@'%' IDENTIFIED BY 'aA123456!';
|
||||
GRANT SELECT, RELOAD, SHOW DATABASES, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'slave'@'%';
|
||||
FLUSH PRIVILEGES;
|
@ -0,0 +1,37 @@
|
||||
[client]
|
||||
|
||||
# The MySQL server
|
||||
[mysqld]
|
||||
skip-external-locking
|
||||
skip-name-resolve
|
||||
back_log = 50
|
||||
max_connections = 2048
|
||||
max_connect_errors = 1000
|
||||
table_open_cache = 1024
|
||||
open_files_limit = 16384
|
||||
max_allowed_packet = 16M
|
||||
read_buffer_size = 8M
|
||||
read_rnd_buffer_size = 32M
|
||||
sort_buffer_size = 2M
|
||||
join_buffer_size = 2M
|
||||
thread_cache_size = 64
|
||||
query_cache_size = 64M
|
||||
query_cache_limit = 4M
|
||||
slow_query_log = 1
|
||||
long_query_time = 2
|
||||
lower_case_table_names = 1
|
||||
innodb_file_per_table = 1
|
||||
max_allowed_packet = 1G
|
||||
server-id = 1
|
||||
log-bin = mysql-bin
|
||||
expire_logs_days = 7
|
||||
binlog_format = ROW
|
||||
|
||||
innodb_data_file_path = ibdata1:12M:autoextend
|
||||
innodb_buffer_pool_size = 2G
|
||||
innodb_write_io_threads = 12
|
||||
innodb_read_io_threads = 8
|
||||
innodb_flush_log_at_trx_commit = 2
|
||||
innodb_log_buffer_size = 16M
|
||||
innodb_log_file_size = 170M
|
||||
innodb_lock_wait_timeout = 60
|
@ -0,0 +1,68 @@
|
||||
|
||||
#user nobody;
|
||||
worker_processes 8;
|
||||
|
||||
#error_log logs/error.log;
|
||||
#error_log logs/error.log notice;
|
||||
#error_log logs/error.log info;
|
||||
|
||||
#pid logs/nginx.pid;
|
||||
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
|
||||
http {
|
||||
include mime.types;
|
||||
default_type text/html;
|
||||
|
||||
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
# '$status $body_bytes_sent "$http_referer" '
|
||||
# '"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
#access_log logs/access.log main;
|
||||
|
||||
sendfile on;
|
||||
#tcp_nopush on;
|
||||
|
||||
#keepalive_timeout 0;
|
||||
keepalive_timeout 65;
|
||||
|
||||
#init_by_lua_file lua/lua_script/init.lua;
|
||||
|
||||
gzip_static on;
|
||||
gzip on;
|
||||
gzip_min_length 1k;
|
||||
gzip_buffers 4 16k;
|
||||
gzip_comp_level 4;
|
||||
gzip_types text/plain text/css application/javascript application/x-javascript text/xml application/xml text/javascript application/json;
|
||||
gzip_http_version 1.1;
|
||||
gzip_disable "MSIE [1-6].";
|
||||
gzip_vary on;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
charset utf-8;
|
||||
|
||||
#access_log logs/host.access.log main;
|
||||
|
||||
# location /sdsf/addInfo {
|
||||
# content_by_lua_file /usr/local/openresty/nginx/lua/lua_script/addInfo.lua;
|
||||
# }
|
||||
|
||||
# location ~ /sdsf/.*\.(html|css|js|eot|svg|ttf|woff)$ {
|
||||
# root /usr/local/openresty/nginx/html/;
|
||||
# expires -1d;
|
||||
# }
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root html;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,440 @@
|
||||
-- Copyright (C) by Zhu Dejiang (doujiang24)
|
||||
-- Copyright (C) by Zexuan Luo (spacewander)
|
||||
|
||||
|
||||
local bit = require "bit"
|
||||
local band = bit.band
|
||||
local ffi = require "ffi"
|
||||
local ffi_new = ffi.new
|
||||
local ffi_gc = ffi.gc
|
||||
local ffi_copy = ffi.copy
|
||||
local ffi_str = ffi.string
|
||||
local C = ffi.C
|
||||
local tab_concat = table.concat
|
||||
local setmetatable = setmetatable
|
||||
|
||||
|
||||
local _M = { _VERSION = '0.05-dev' }
|
||||
|
||||
local mt = { __index = _M }
|
||||
|
||||
|
||||
local PADDING = {
|
||||
RSA_PKCS1_PADDING = 1, -- RSA_size - 11
|
||||
RSA_SSLV23_PADDING = 2, -- RSA_size - 11
|
||||
RSA_NO_PADDING = 3, -- RSA_size
|
||||
RSA_PKCS1_OAEP_PADDING = 4, -- RSA_size - 42
|
||||
}
|
||||
_M.PADDING = PADDING
|
||||
|
||||
local KEY_TYPE = {
|
||||
PKCS1 = "PKCS#1",
|
||||
PKCS8 = "PKCS#8",
|
||||
}
|
||||
_M.KEY_TYPE = KEY_TYPE
|
||||
|
||||
|
||||
ffi.cdef[[
|
||||
typedef struct bio_st BIO;
|
||||
typedef struct bio_method_st BIO_METHOD;
|
||||
BIO_METHOD *BIO_s_mem(void);
|
||||
BIO * BIO_new(BIO_METHOD *type);
|
||||
int BIO_puts(BIO *bp, const char *buf);
|
||||
void BIO_vfree(BIO *a);
|
||||
|
||||
typedef struct rsa_st RSA;
|
||||
RSA *RSA_new(void);
|
||||
void RSA_free(RSA *rsa);
|
||||
typedef int pem_password_cb(char *buf, int size, int rwflag, void *userdata);
|
||||
RSA * PEM_read_bio_RSAPrivateKey(BIO *bp, RSA **rsa, pem_password_cb *cb,
|
||||
void *u);
|
||||
RSA * PEM_read_bio_RSAPublicKey(BIO *bp, RSA **rsa, pem_password_cb *cb,
|
||||
void *u);
|
||||
RSA * PEM_read_bio_RSA_PUBKEY(BIO *bp, RSA **rsa, pem_password_cb *cb,
|
||||
void *u);
|
||||
|
||||
unsigned long ERR_get_error_line_data(const char **file, int *line,
|
||||
const char **data, int *flags);
|
||||
const char * ERR_reason_error_string(unsigned long e);
|
||||
|
||||
typedef struct bignum_st BIGNUM;
|
||||
BIGNUM *BN_new(void);
|
||||
void BN_free(BIGNUM *a);
|
||||
typedef unsigned long BN_ULONG;
|
||||
int BN_set_word(BIGNUM *a, BN_ULONG w);
|
||||
typedef struct bn_gencb_st BN_GENCB;
|
||||
int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
|
||||
|
||||
typedef struct evp_cipher_st EVP_CIPHER;
|
||||
int PEM_write_bio_RSAPrivateKey(BIO *bp, RSA *x, const EVP_CIPHER *enc,
|
||||
unsigned char *kstr, int klen,
|
||||
pem_password_cb *cb, void *u);
|
||||
int PEM_write_bio_RSAPublicKey(BIO *bp, RSA *x);
|
||||
int PEM_write_bio_RSA_PUBKEY(BIO *bp, RSA *x);
|
||||
|
||||
long BIO_ctrl(BIO *bp, int cmd, long larg, void *parg);
|
||||
int BIO_read(BIO *b, void *data, int len);
|
||||
|
||||
typedef struct evp_pkey_st EVP_PKEY;
|
||||
typedef struct engine_st ENGINE;
|
||||
typedef struct evp_pkey_ctx_st EVP_PKEY_CTX;
|
||||
|
||||
EVP_PKEY *EVP_PKEY_new(void);
|
||||
void EVP_PKEY_free(EVP_PKEY *key);
|
||||
|
||||
EVP_PKEY_CTX *EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e);
|
||||
void EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx);
|
||||
|
||||
int EVP_PKEY_CTX_ctrl(EVP_PKEY_CTX *ctx, int keytype, int optype,
|
||||
int cmd, int p1, void *p2);
|
||||
|
||||
int EVP_PKEY_size(EVP_PKEY *pkey);
|
||||
|
||||
int EVP_PKEY_encrypt_init(EVP_PKEY_CTX *ctx);
|
||||
int EVP_PKEY_encrypt(EVP_PKEY_CTX *ctx,
|
||||
unsigned char *out, size_t *outlen,
|
||||
const unsigned char *in, size_t inlen);
|
||||
|
||||
int EVP_PKEY_decrypt_init(EVP_PKEY_CTX *ctx);
|
||||
int EVP_PKEY_decrypt(EVP_PKEY_CTX *ctx,
|
||||
unsigned char *out, size_t *outlen,
|
||||
const unsigned char *in, size_t inlen);
|
||||
|
||||
int EVP_PKEY_set1_RSA(EVP_PKEY *pkey, RSA *key);
|
||||
int PEM_write_bio_PKCS8PrivateKey(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc,
|
||||
char *kstr, int klen, pem_password_cb *cb,
|
||||
void *u);
|
||||
|
||||
void OpenSSL_add_all_digests(void);
|
||||
typedef struct env_md_st EVP_MD;
|
||||
typedef struct env_md_ctx_st EVP_MD_CTX;
|
||||
const EVP_MD *EVP_get_digestbyname(const char *name);
|
||||
|
||||
/* EVP_MD_CTX methods for OpenSSL < 1.1.0 */
|
||||
EVP_MD_CTX *EVP_MD_CTX_create(void);
|
||||
void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx);
|
||||
|
||||
/* EVP_MD_CTX methods for OpenSSL >= 1.1.0 */
|
||||
EVP_MD_CTX *EVP_MD_CTX_new(void);
|
||||
void EVP_MD_CTX_free(EVP_MD_CTX *ctx);
|
||||
|
||||
int EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type);
|
||||
int EVP_DigestUpdate(EVP_MD_CTX *ctx, const unsigned char *in, int inl);
|
||||
int EVP_SignFinal(EVP_MD_CTX *ctx,unsigned char *sig,unsigned int *s,
|
||||
EVP_PKEY *pkey);
|
||||
int EVP_VerifyFinal(EVP_MD_CTX *ctx,unsigned char *sigbuf, unsigned int siglen,
|
||||
EVP_PKEY *pkey);
|
||||
int EVP_PKEY_set1_RSA(EVP_PKEY *e, RSA *r);
|
||||
|
||||
void ERR_set_error_data(char *data, int flags);
|
||||
]]
|
||||
--[[
|
||||
# define EVP_PKEY_CTX_set_rsa_padding(ctx, pad) \
|
||||
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, -1, EVP_PKEY_CTRL_RSA_PADDING, \
|
||||
pad, NULL)
|
||||
# define EVP_SignInit(a,b) EVP_DigestInit(a,b)
|
||||
# define EVP_SignUpdate(a,b,c) EVP_DigestUpdate(a,b,c)
|
||||
--]]
|
||||
|
||||
|
||||
local EVP_PKEY_ALG_CTRL = 0x1000
|
||||
local EVP_PKEY_CTRL_RSA_PADDING = EVP_PKEY_ALG_CTRL + 1
|
||||
local NID_rsaEncryption = 6
|
||||
local EVP_PKEY_RSA = NID_rsaEncryption
|
||||
local ERR_TXT_STRING = 0x02
|
||||
|
||||
local evp_md_ctx_new
|
||||
local evp_md_ctx_free
|
||||
if not pcall(function () return C.EVP_MD_CTX_create end) then
|
||||
evp_md_ctx_new = C.EVP_MD_CTX_new
|
||||
evp_md_ctx_free = C.EVP_MD_CTX_free
|
||||
else
|
||||
evp_md_ctx_new = C.EVP_MD_CTX_create
|
||||
evp_md_ctx_free = C.EVP_MD_CTX_destroy
|
||||
end
|
||||
|
||||
local function ssl_err()
|
||||
local err_queue = {}
|
||||
local i = 1
|
||||
local data = ffi_new("const char*[1]")
|
||||
local flags = ffi_new("int[1]")
|
||||
|
||||
while true do
|
||||
local code = C.ERR_get_error_line_data(nil, nil, data, flags)
|
||||
if code == 0 then
|
||||
break
|
||||
end
|
||||
|
||||
local err = C.ERR_reason_error_string(code)
|
||||
err_queue[i] = ffi_str(err)
|
||||
i = i + 1
|
||||
|
||||
if data[0] ~= nil and band(flags[0], ERR_TXT_STRING) > 0 then
|
||||
err_queue[i] = ffi_str(data[0])
|
||||
i = i + 1
|
||||
end
|
||||
end
|
||||
|
||||
return nil, tab_concat(err_queue, ": ", 1, i - 1)
|
||||
end
|
||||
|
||||
local function read_bio(bio)
|
||||
local BIO_CTRL_PENDING = 10
|
||||
local keylen = C.BIO_ctrl(bio, BIO_CTRL_PENDING, 0, nil);
|
||||
local key = ffi.new("char[?]", keylen)
|
||||
if C.BIO_read(bio, key, keylen) < 0 then
|
||||
return ssl_err()
|
||||
end
|
||||
return ffi_str(key, keylen)
|
||||
end
|
||||
|
||||
-- Follow the calling style to avoid careless mistake.
|
||||
function _M.generate_rsa_keys(_, bits, pkcs8)
|
||||
local rsa = C.RSA_new()
|
||||
ffi_gc(rsa, C.RSA_free)
|
||||
local bn = C.BN_new()
|
||||
ffi_gc(bn, C.BN_free)
|
||||
|
||||
-- Set public exponent to 65537
|
||||
if C.BN_set_word(bn, 65537) ~= 1 then
|
||||
return nil, ssl_err()
|
||||
end
|
||||
|
||||
-- Generate key
|
||||
if C.RSA_generate_key_ex(rsa, bits, bn, nil) ~= 1 then
|
||||
return nil, ssl_err()
|
||||
end
|
||||
|
||||
local pub_key_bio = C.BIO_new(C.BIO_s_mem())
|
||||
ffi_gc(pub_key_bio, C.BIO_vfree)
|
||||
if pkcs8 == true then
|
||||
if C.PEM_write_bio_RSA_PUBKEY(pub_key_bio, rsa) ~= 1 then
|
||||
return nil, ssl_err()
|
||||
end
|
||||
else
|
||||
if C.PEM_write_bio_RSAPublicKey(pub_key_bio, rsa) ~= 1 then
|
||||
return nil, ssl_err()
|
||||
end
|
||||
end
|
||||
|
||||
local public_key, err = read_bio(pub_key_bio)
|
||||
if not public_key then
|
||||
return nil, nil, err
|
||||
end
|
||||
|
||||
local priv_key_bio = C.BIO_new(C.BIO_s_mem())
|
||||
ffi_gc(priv_key_bio, C.BIO_vfree)
|
||||
if pkcs8 == true then
|
||||
local pk = C.EVP_PKEY_new()
|
||||
ffi_gc(pk, C.EVP_PKEY_free)
|
||||
if C.EVP_PKEY_set1_RSA(pk,rsa) ~= 1 then
|
||||
return nil, ssl_err()
|
||||
end
|
||||
if C.PEM_write_bio_PKCS8PrivateKey(priv_key_bio, pk,
|
||||
nil, nil, 0, nil, nil) ~= 1 then
|
||||
return nil, ssl_err()
|
||||
end
|
||||
else
|
||||
if C.PEM_write_bio_RSAPrivateKey(priv_key_bio, rsa,
|
||||
nil, nil, 0, nil, nil) ~= 1 then
|
||||
return nil, ssl_err()
|
||||
end
|
||||
end
|
||||
|
||||
local private_key
|
||||
private_key, err = read_bio(priv_key_bio)
|
||||
if not private_key then
|
||||
return nil, nil, err
|
||||
end
|
||||
|
||||
return public_key, private_key
|
||||
end
|
||||
|
||||
function _M.new(_, opts)
|
||||
local key, read_func, is_pub, md
|
||||
|
||||
if opts.public_key then
|
||||
key = opts.public_key
|
||||
if opts.key_type == KEY_TYPE.PKCS8 then
|
||||
read_func = C.PEM_read_bio_RSA_PUBKEY
|
||||
else
|
||||
read_func = C.PEM_read_bio_RSAPublicKey
|
||||
end
|
||||
is_pub = true
|
||||
|
||||
elseif opts.private_key then
|
||||
key = opts.private_key
|
||||
read_func = C.PEM_read_bio_RSAPrivateKey
|
||||
|
||||
else
|
||||
return nil, "public_key or private_key not found"
|
||||
end
|
||||
|
||||
local bio_method = C.BIO_s_mem()
|
||||
local bio = C.BIO_new(bio_method)
|
||||
ffi_gc(bio, C.BIO_vfree)
|
||||
|
||||
local len = C.BIO_puts(bio, key)
|
||||
if len < 0 then
|
||||
return ssl_err()
|
||||
end
|
||||
|
||||
local pass
|
||||
if opts.password then
|
||||
local plen = #opts.password
|
||||
pass = ffi_new("unsigned char[?]", plen + 1)
|
||||
ffi_copy(pass, opts.password, plen)
|
||||
end
|
||||
|
||||
local rsa = read_func(bio, nil, nil, pass)
|
||||
if rsa == nil then
|
||||
return ssl_err()
|
||||
end
|
||||
ffi_gc(rsa, C.RSA_free)
|
||||
|
||||
-- EVP_PKEY
|
||||
local pkey = C.EVP_PKEY_new()
|
||||
ffi_gc(pkey, C.EVP_PKEY_free)
|
||||
if C.EVP_PKEY_set1_RSA(pkey, rsa) == 0 then
|
||||
return ssl_err()
|
||||
end
|
||||
|
||||
--EVP_PKEY_CTX
|
||||
local ctx = C.EVP_PKEY_CTX_new(pkey, nil)
|
||||
if ctx == nil then
|
||||
return ssl_err()
|
||||
end
|
||||
ffi_gc(ctx, C.EVP_PKEY_CTX_free)
|
||||
|
||||
-- md_ctx init for sign or verify; if signature algorithm is seted
|
||||
if opts.algorithm then
|
||||
md = C.EVP_get_digestbyname(opts.algorithm)
|
||||
if md == nil then
|
||||
return nil, "Unknown message digest"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
-- ctx init for encrypt or decrypt
|
||||
-- default for encrypt/decrypt if nothing is set
|
||||
if opts.padding or not opts.digest then
|
||||
local init_func = is_pub and C.EVP_PKEY_encrypt_init
|
||||
or C.EVP_PKEY_decrypt_init
|
||||
if init_func(ctx) <= 0 then
|
||||
return ssl_err()
|
||||
end
|
||||
|
||||
if C.EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, -1, EVP_PKEY_CTRL_RSA_PADDING,
|
||||
opts.padding or PADDING.RSA_PKCS1_PADDING, nil) <= 0 then
|
||||
return ssl_err()
|
||||
end
|
||||
end
|
||||
|
||||
local size = C.EVP_PKEY_size(pkey)
|
||||
return setmetatable({
|
||||
pkey = pkey,
|
||||
size = size,
|
||||
buf = ffi_new("unsigned char[?]", size),
|
||||
_encrypt_ctx = is_pub and ctx or nil,
|
||||
_decrypt_ctx = not is_pub and ctx or nil,
|
||||
is_pub = is_pub,
|
||||
md = md,
|
||||
}, mt)
|
||||
end
|
||||
|
||||
|
||||
function _M.decrypt(self, str)
|
||||
local ctx = self._decrypt_ctx
|
||||
if not ctx then
|
||||
return nil, "not inited for decrypt"
|
||||
end
|
||||
|
||||
local len = ffi_new("size_t [1]")
|
||||
if C.EVP_PKEY_decrypt(ctx, nil, len, str, #str) <= 0 then
|
||||
return ssl_err()
|
||||
end
|
||||
|
||||
local buf = self.buf
|
||||
if C.EVP_PKEY_decrypt(ctx, buf, len, str, #str) <= 0 then
|
||||
return ssl_err()
|
||||
end
|
||||
|
||||
return ffi_str(buf, len[0])
|
||||
end
|
||||
|
||||
|
||||
function _M.encrypt(self, str)
|
||||
local ctx = self._encrypt_ctx
|
||||
if not ctx then
|
||||
return nil, "not inited for encrypt"
|
||||
end
|
||||
|
||||
local len = ffi_new("size_t [1]")
|
||||
if C.EVP_PKEY_encrypt(ctx, nil, len, str, #str) <= 0 then
|
||||
return ssl_err()
|
||||
end
|
||||
|
||||
local buf = self.buf
|
||||
if C.EVP_PKEY_encrypt(ctx, buf, len, str, #str) <= 0 then
|
||||
return ssl_err()
|
||||
end
|
||||
|
||||
return ffi_str(buf, len[0])
|
||||
end
|
||||
|
||||
|
||||
function _M.sign(self, str)
|
||||
if self.is_pub then
|
||||
return nil, "not inited for sign"
|
||||
end
|
||||
|
||||
local md_ctx = evp_md_ctx_new()
|
||||
ffi_gc(md_ctx, evp_md_ctx_free)
|
||||
|
||||
if C.EVP_DigestInit(md_ctx, self.md) <= 0 then
|
||||
return ssl_err()
|
||||
end
|
||||
|
||||
if C.EVP_DigestUpdate(md_ctx, str, #str) <= 0 then
|
||||
return ssl_err()
|
||||
end
|
||||
|
||||
local buf = self.buf
|
||||
local len = ffi_new("unsigned int[1]")
|
||||
if C.EVP_SignFinal(md_ctx, self.buf, len, self.pkey) <= 0 then
|
||||
return ssl_err()
|
||||
end
|
||||
|
||||
return ffi_str(buf, len[0])
|
||||
end
|
||||
|
||||
|
||||
function _M.verify(self, str, sig)
|
||||
if not self.is_pub then
|
||||
return nil, "not inited for verify"
|
||||
end
|
||||
|
||||
local md_ctx = evp_md_ctx_new()
|
||||
ffi_gc(md_ctx, evp_md_ctx_free)
|
||||
|
||||
if C.EVP_DigestInit(md_ctx, self.md) <= 0 then
|
||||
return ssl_err()
|
||||
end
|
||||
|
||||
if C.EVP_DigestUpdate(md_ctx, str, #str) <= 0 then
|
||||
return ssl_err()
|
||||
end
|
||||
|
||||
local siglen = #sig
|
||||
local buf = siglen <= self.size and self.buf
|
||||
or ffi_new("unsigned char[?]", siglen)
|
||||
ffi_copy(buf, sig, siglen)
|
||||
if C.EVP_VerifyFinal(md_ctx, buf, siglen, self.pkey) <= 0 then
|
||||
return ssl_err()
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
return _M
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,47 @@
|
||||
go env -w GOPROXY=https://goproxy.cn
|
||||
|
||||
rm -rf $SRC/docker/app
|
||||
mkdir -p $SRC/docker/app
|
||||
|
||||
# dsBaseRpc
|
||||
cd $SRC/dsBaseRpc
|
||||
go build -gcflags "all=-N -l" -o ./build/dsBaseRpc main.go
|
||||
cp -r ./Shell ./build
|
||||
cp -r ./Config ./build/Config
|
||||
#cp -r ./Xml ./build/Xml
|
||||
cp -r ./Sql ./build/Sql
|
||||
mv -f ./build ../docker/app/dsBaseRpc
|
||||
|
||||
# dsBaseWeb
|
||||
cd $SRC/dsBaseWeb
|
||||
go build -gcflags "all=-N -l" -o ./build/dsBaseWeb main.go
|
||||
cp -r ./Shell ./build
|
||||
cp -r ./docs ./build/docs
|
||||
cp -r ./Config ./build/Config
|
||||
#cp -r ./Xml ./build/Xml
|
||||
mv -f ./build ../docker/app/dsBaseWeb
|
||||
|
||||
# dsBigData
|
||||
cd $SRC/dsBigData
|
||||
go build -o ./build/dsBigData main.go
|
||||
cp -r ./Shell ./build
|
||||
cp -r ./Config ./build/Config
|
||||
#cp -r ./Xml ./build/Xml
|
||||
mv -f ./build ../docker/app/dsBigData
|
||||
|
||||
# dsSso
|
||||
cd $SRC/dsSso
|
||||
go build -gcflags "all=-N -l" -o ./build/dsSso main.go
|
||||
cp -r ./Shell ./build
|
||||
cp -r ./docs ./build/docs
|
||||
cp -r ./Config ./build/Config
|
||||
#cp -r ./Xml ./build/Xml
|
||||
mv -f ./build ../docker/app/dsSso
|
||||
|
||||
# dsSupport
|
||||
cd $SRC/dsSupport
|
||||
go build -gcflags "all=-N -l" -o ./build/dsSupport main.go
|
||||
cp -r ./Shell ./build
|
||||
cp -r ./docs ./build/docs
|
||||
cp -r ./Config ./build/Config
|
||||
mv -f ./build ../docker/app/dsSupport
|
@ -0,0 +1,9 @@
|
||||
version: "3.8"
|
||||
services:
|
||||
build:
|
||||
image: golang:1.16.5-buster
|
||||
volumes:
|
||||
- ../:/go/src
|
||||
environment:
|
||||
- SRC=/go/src
|
||||
command: bash -c "$${SRC}/docker/docker-compose.build.sh"
|
@ -0,0 +1,79 @@
|
||||
version: "3.8"
|
||||
services:
|
||||
dsbaserpc:
|
||||
security_opt:
|
||||
- seccomp:unconfined
|
||||
cap_add:
|
||||
- SYS_PTRACE
|
||||
build:
|
||||
context: ../dsBaseRpc
|
||||
dockerfile: ../docker/Dockerfile.dev
|
||||
args:
|
||||
- MODULE=dsBaseRpc
|
||||
ports:
|
||||
- 8001:8001
|
||||
- 2345:2345
|
||||
volumes:
|
||||
- ../dsBaseRpc/Config/Config.docker.ini:/app/Config/Config.ini
|
||||
dsbaseweb:
|
||||
cap_add:
|
||||
- SYS_PTRACE
|
||||
security_opt:
|
||||
- seccomp:unconfined
|
||||
build:
|
||||
context: ../dsBaseWeb
|
||||
dockerfile: ../docker/Dockerfile.dev
|
||||
args:
|
||||
- MODULE=dsBaseWeb
|
||||
ports:
|
||||
- 8002:8002
|
||||
- 2346:2345
|
||||
volumes:
|
||||
- ../dsBaseWeb/Config/Config.docker.ini:/app/Config/Config.ini
|
||||
dsbigdata:
|
||||
cap_add:
|
||||
- SYS_PTRACE
|
||||
security_opt:
|
||||
- seccomp:unconfined
|
||||
build:
|
||||
context: ../dsBigData
|
||||
dockerfile: ../docker/Dockerfile.dev
|
||||
args:
|
||||
- MODULE=dsBigData
|
||||
ports:
|
||||
- 8004:8004
|
||||
- 2347:2345
|
||||
volumes:
|
||||
- ../dsBigData/Config/Config.docker.ini:/app/Config/Config.ini
|
||||
dssso:
|
||||
cap_add:
|
||||
- SYS_PTRACE
|
||||
security_opt:
|
||||
- seccomp:unconfined
|
||||
build:
|
||||
context: ../dsSso
|
||||
dockerfile: ../docker/Dockerfile.dev
|
||||
args:
|
||||
- MODULE=dsSso
|
||||
ports:
|
||||
- 8000:8000
|
||||
- 2348:2345
|
||||
volumes:
|
||||
- ../dsSso/Config/Config.docker.ini:/app/Config/Config.ini
|
||||
# dssupport:
|
||||
# cap_add:
|
||||
# - SYS_PTRACE
|
||||
# security_opt:
|
||||
# - seccomp:unconfined
|
||||
# build:
|
||||
# context: ../dsSupport
|
||||
# dockerfile: ../docker/Dockerfile.dev
|
||||
# args:
|
||||
# - MODULE=dsSupport
|
||||
# ports:
|
||||
# - 8005:8005
|
||||
# - 2349:2345
|
||||
# volumes:
|
||||
# - ../dsSupport/Config/Config.docker.ini:/app/Config/Config.ini
|
||||
# depends_on:
|
||||
# - elasticsearch
|
@ -0,0 +1,60 @@
|
||||
version: "3.8"
|
||||
services:
|
||||
dsbaserpc:
|
||||
image: debian:buster-20210511
|
||||
restart: always
|
||||
ports:
|
||||
- 8001:8001
|
||||
volumes:
|
||||
- ./app/dsBaseRpc:/app
|
||||
- ./app/dsBaseRpc/Config/Config.docker.ini:/app/Config/Config.ini
|
||||
working_dir: /app
|
||||
command: bash -c "./dsBaseRpc"
|
||||
dsbaseweb:
|
||||
image: debian:buster-20210511
|
||||
restart: always
|
||||
ports:
|
||||
- 8002:8002
|
||||
volumes:
|
||||
- ./app/dsBaseWeb:/app
|
||||
- ./app/dsBaseWeb/Config/Config.docker.ini:/app/Config/Config.ini
|
||||
working_dir: /app
|
||||
command: bash -c "./dsBaseWeb"
|
||||
depends_on:
|
||||
- kafka
|
||||
dsbigdata:
|
||||
image: debian:buster-20210511
|
||||
restart: always
|
||||
ports:
|
||||
- 8004:8004
|
||||
volumes:
|
||||
- ./app/dsBigData:/app
|
||||
- ./app/dsBigData/Config/Config.docker.ini:/app/Config/Config.ini
|
||||
working_dir: /app
|
||||
command: bash -c "./dsBigData"
|
||||
depends_on:
|
||||
- elasticsearch
|
||||
dssso:
|
||||
image: debian:buster-20210511
|
||||
restart: always
|
||||
ports:
|
||||
- 8000:8000
|
||||
volumes:
|
||||
- ./app/dsSso:/app
|
||||
- ./app/dsSso/Config/Config.docker.ini:/app/Config/Config.ini
|
||||
working_dir: /app
|
||||
command: bash -c "./dsSso"
|
||||
depends_on:
|
||||
- kafka
|
||||
dssupport:
|
||||
image: debian:buster-20210511
|
||||
restart: always
|
||||
ports:
|
||||
- 8005:8005
|
||||
volumes:
|
||||
- ./app/dsSupport:/app
|
||||
- ./app/dsSupport/Config/Config.docker.ini:/app/Config/Config.ini
|
||||
working_dir: /app
|
||||
command: bash -c "./dsSupport"
|
||||
depends_on:
|
||||
- elasticsearch
|
@ -0,0 +1,93 @@
|
||||
version: "3.8"
|
||||
services:
|
||||
portainer:
|
||||
image: portainer/portainer:1.24.2
|
||||
restart: always
|
||||
ports:
|
||||
- ${PORTAINER_PORT}:9000
|
||||
volumes:
|
||||
- ${DOCKER_SOCK}:/var/run/docker.sock
|
||||
- ${PORTAINER_DATA}:/data
|
||||
redis:
|
||||
image: redis:6.2.4-alpine3.13
|
||||
restart: always
|
||||
environment:
|
||||
- TZ=${TZ}
|
||||
ports:
|
||||
- ${REDIS_PORT}:6379
|
||||
volumes:
|
||||
- ./conf/redis/redis.conf:/usr/local/etc/redis/redis.conf
|
||||
- ${REDIS_DATA}:/data
|
||||
mariadb:
|
||||
image: mariadb:10.5.10
|
||||
restart: always
|
||||
environment:
|
||||
- TZ=${TZ}
|
||||
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
|
||||
command: --default-authentication-plugin=mysql_native_password
|
||||
ports:
|
||||
- ${MYSQL_PORT}:3306
|
||||
volumes:
|
||||
- ./conf/mariadb/my.cnf:/etc/mysql/conf.d/my.cnf:ro
|
||||
- ./conf/mariadb/initdb.d:/docker-entrypoint-initdb.d
|
||||
- ${MYSQL_DATA}:/var/lib/mysql
|
||||
healthcheck:
|
||||
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
|
||||
interval: 10s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
openresty:
|
||||
image: openresty/openresty:1.19.3.1-8-alpine
|
||||
restart: always
|
||||
ports:
|
||||
- ${NGINX_HTTP_PORT}:80
|
||||
- ${NGINX_SSL_PORT}:443
|
||||
volumes:
|
||||
- ./conf/openresty/nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf
|
||||
- ./conf/openresty/rsa.lua:/usr/local/openresty/lualib/rsa.lua
|
||||
- ${NGINX_LOG}:/usr/local/openresty/nginx/logs
|
||||
kafka:
|
||||
image: 76527413/kafka:2.8.0
|
||||
restart: always
|
||||
volumes:
|
||||
- ./conf/kafka/server.properties:/opt/kafka/config/kraft/server.properties
|
||||
- ${KAFKA_DATA}:/tmp/kraft-combined-logs
|
||||
- ${KAFKA_LOG}:/opt/kafka/logs
|
||||
ports:
|
||||
- 9092:9092
|
||||
- 9093:9093
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-vz", "localhost", "9092"]
|
||||
interval: 10s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
elasticsearch:
|
||||
image: elasticsearch:7.12.0
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-vz", "localhost", "9200"]
|
||||
interval: 10s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
restart: always
|
||||
environment:
|
||||
- ES_JAVA_OPTS=-Xms512m -Xmx512m
|
||||
- discovery.type=single-node
|
||||
- http.cors.enabled=true
|
||||
- http.cors.allow-origin=*
|
||||
ports:
|
||||
- 9200:9200
|
||||
- 9300:9300
|
||||
volumes:
|
||||
#chmod 777 elasticsearch
|
||||
- ${ELASTICSEARCH_DATA}:/usr/share/elasticsearch/data
|
||||
# greenplum:
|
||||
# image: 76527413/greenplum:6.16.2
|
||||
# restart: always
|
||||
# hostname: greenplum_singlenode
|
||||
# environment:
|
||||
# - DATABASE=exampledb
|
||||
# ports:
|
||||
# - 5432:5432
|
||||
# volumes:
|
||||
# - ${GREENPLUM_DATA}:/data
|
||||
# - ${GREENPLUM_LOG}:/home/gpadmin/gpAdminLogs
|
@ -0,0 +1 @@
|
||||
docker-compose --compatibility -f docker-compose.yml -f docker-compose.pro.yml up --remove-orphans -d
|
@ -0,0 +1 @@
|
||||
docker-compose --compatibility -f docker-compose.yml -f docker-compose.dev.yml up --remove-orphans -d
|
@ -0,0 +1 @@
|
||||
docker-compose --compatibility -f docker-compose.yml -f docker-compose.pro.yml up --remove-orphans -d
|
@ -0,0 +1 @@
|
||||
docker-compose down --remove-orphans
|
@ -0,0 +1 @@
|
||||
docker-compose down --remove-orphans
|
@ -0,0 +1,37 @@
|
||||
[mysql] # mysql的配置项
|
||||
ip = mariadb
|
||||
port = 3306
|
||||
database = base_db_dev
|
||||
user = root
|
||||
pwd = DsideaL147258369
|
||||
|
||||
[distribute] #发布功能的配置
|
||||
ip = server.dsmin.com
|
||||
port = 22
|
||||
user = root
|
||||
pwd = dsideal
|
||||
remotePath = /usr/local/dsMin/dsBaseRpc/
|
||||
localPath = E:\Work\dsMin\dsBaseRpc\build
|
||||
|
||||
[redis]
|
||||
ip = redis
|
||||
port = 6379
|
||||
db = 0
|
||||
expireTime = 86400
|
||||
|
||||
# 注册rpc server
|
||||
[rpcServer]
|
||||
port = 8001
|
||||
|
||||
# 本项目名称,用于记录日志
|
||||
[project]
|
||||
project_name = dsBaseRpc
|
||||
|
||||
# 数据汇集的地址
|
||||
[dataExchange]
|
||||
#host = http://10.10.14.186:9009
|
||||
host = http://10.10.14.213:9009
|
||||
exchangeUrl = /v1/dataex/DataexSet
|
||||
SystemAuthUrl = /v1/dataex/SystemAuth
|
||||
SystemId = BASE_GO
|
||||
SystemKey = 96fa57b8-ac44-11ea-bd48-f48e38f73cf7
|
@ -0,0 +1,67 @@
|
||||
[distribute] #发布功能的配置
|
||||
ip = 10.10.14.187
|
||||
port = 22
|
||||
user = root
|
||||
pwd = dsideal
|
||||
remotePath = /usr/local/dsMin/dsBaseWeb/
|
||||
localPath = E:/Work/dsMin/dsBaseWeb
|
||||
|
||||
|
||||
[mysql]
|
||||
ip = mariadb
|
||||
port = 3306
|
||||
db_name = base_db_dev
|
||||
|
||||
[redis]
|
||||
ip = redis
|
||||
port = 6379
|
||||
db = 0
|
||||
expireTime = 86400
|
||||
|
||||
# 注册rpc server
|
||||
[rpcServer]
|
||||
ip = dsbaserpc
|
||||
port = 8001
|
||||
|
||||
#gin服务器的端口
|
||||
[server]
|
||||
port = 8002
|
||||
|
||||
# 本项目名称,用于记录日志
|
||||
[project]
|
||||
project_name = dsBaseWeb
|
||||
|
||||
[kafka]
|
||||
brokers = kafka:9092
|
||||
partition = 20
|
||||
replication = 1
|
||||
KafkaAccessLogTopic = log_baseweb
|
||||
|
||||
[sso]
|
||||
ssoServerNw = http://10.10.14.187
|
||||
#ssoServerNw = http://10.10.24.116:8000
|
||||
ssoServerWw = http://fort.edusoa.com:7777
|
||||
authCodeURI = /oauth2/authorize
|
||||
authTokenURI = /oauth2/access_token
|
||||
authLogoutURI = /oauth2/logout
|
||||
clientIdNw = br888ra563ugbm2ov77g
|
||||
clientSecretNw = 01e9f8ak57e3j03vrjq34zg6ws
|
||||
#clientIdNw = bu3pcf7cl45ug8dup8og
|
||||
#clientSecretNw = 01emmt5qdyszh9ndbpbg4zk4tn
|
||||
clientIdWw = bpomac2563uj213q1g2g
|
||||
clientSecretWw = 01e3nf6hnr2eysdxhc2n80w9ca
|
||||
responseType = code
|
||||
grantType = authorization_code
|
||||
redirectURINw = http://10.10.14.187/base/sso/CheckSsoCode
|
||||
#redirectURINw = http://127.0.0.1:8002/base/sso/CheckSsoCode
|
||||
redirectURIWw = http://fort.edusoa.com:7777/base/sso/CheckSsoCode
|
||||
accessTokenKey = ds_access_token
|
||||
|
||||
[deleteXlsx]
|
||||
#删除7天前无用的模板文件
|
||||
diffTime = 7
|
||||
|
||||
|
||||
# 内部IP段起始
|
||||
[IP]
|
||||
intranetIP=192,172,10,127
|
@ -1,7 +0,0 @@
|
||||
.ico
|
||||
.html
|
||||
.css
|
||||
.jpg
|
||||
.jpeg
|
||||
.png
|
||||
/base/sso/CheckSsoCode
|
@ -1,12 +0,0 @@
|
||||
_ ____ _ _____ _
|
||||
| | | _ \(_) | __ \ | |
|
||||
__| |___| |_) |_ __ _| | | | __ _| |_ __ _
|
||||
/ _` / __| _ <| |/ _` | | | |/ _` | __/ _` |
|
||||
| (_| \__ \ |_) | | (_| | |__| | (_| | || (_| |
|
||||
\__,_|___/____/|_|\__, |_____/ \__,_|\__\__,_|
|
||||
__/ |
|
||||
|___/
|
||||
Created By HuangHai 2020-01-20
|
||||
http://patorjk.com/software/taag/#p=display&f=Big&t=dsBigData
|
||||
|
||||
|
@ -1,10 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 杀掉进程
|
||||
kill -9 `pgrep -f dsBigData` 2>/dev/null
|
||||
sleep 3
|
||||
|
||||
cd /usr/local/dsMin/dsBigData
|
||||
chmod +x dsBigData
|
||||
# 运行为后台进程
|
||||
/usr/local/dsMin/dsBigData/dsBigData
|
Binary file not shown.
@ -1,10 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
# 杀掉进程
|
||||
kill -9 `pgrep -f dsBigData` 2>/dev/null
|
||||
sleep 3
|
||||
|
||||
chmod +x dsBigData
|
||||
# 运行为后台进程
|
||||
nohup /usr/local/dsMin/dsBigData/dsBigData >> /usr/local/dsMin/dsBigData/dsBigData.log 2>&1 &
|
@ -1,4 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# kill 命令不使用 -9 参数时,会回调 onStop() 方法,确定不需要此回调建议使用 -9 参数
|
||||
kill -9 `pgrep -f dsBigData` 2>/dev/null
|
@ -0,0 +1,33 @@
|
||||
[mysql] # mysql1的配置项
|
||||
ip = mariadb
|
||||
port = 3306
|
||||
database = base_db_dev
|
||||
user = root
|
||||
pwd = DsideaL147258369
|
||||
|
||||
[distribute] #发布功能的配置
|
||||
ip = 10.10.14.187
|
||||
port = 22
|
||||
user = root
|
||||
pwd = dsideal
|
||||
remotePath = /usr/local/dsMin/dsSso/
|
||||
localPath = E:\Work\dsMin\dsSso\build
|
||||
|
||||
[redis]
|
||||
ip = redis
|
||||
port = 6379
|
||||
db = 0
|
||||
|
||||
[kafka]
|
||||
KafkaAddress = kafka:9092
|
||||
KafkaAccessLogTopic = dsAccessLog
|
||||
# ----------------------------------------------------------------------------------------------------
|
||||
|
||||
[server] #gin服务器的端口
|
||||
port = 8000
|
||||
|
||||
# 验证码的有效时间,单位:秒
|
||||
CaptchaExpireTime = 120
|
||||
|
||||
[install_area]
|
||||
code = changchun
|
@ -0,0 +1,56 @@
|
||||
[distribute] #发布功能的配置
|
||||
ip = 10.10.14.187
|
||||
port = 22
|
||||
user = root
|
||||
pwd = dsideal
|
||||
remotePath = /usr/local/dsMin/dsSupport/
|
||||
localPath = E:/Work/dsMin/dsSupport
|
||||
|
||||
[mysql]
|
||||
;ip = 10.10.6.200
|
||||
;port = 22066
|
||||
;database = base_db_zhangjun
|
||||
;user = root
|
||||
;pwd = DsideaL147258369
|
||||
ip = mariadb
|
||||
port = 3306
|
||||
database = base_db_dev
|
||||
user = root
|
||||
pwd = DsideaL147258369
|
||||
|
||||
[redis]
|
||||
;ip = 127.0.0.1
|
||||
;port = 6379
|
||||
;db = 1
|
||||
;expireTime = 86400
|
||||
ip = redis
|
||||
port = 6379
|
||||
db = 1
|
||||
expireTime = 86400
|
||||
|
||||
#gin服务器的端口
|
||||
[server]
|
||||
port = 8005
|
||||
|
||||
[elasticsearch]
|
||||
;nodes = http://10.10.14.188:9200
|
||||
##nodes = http://10.10.14.61:9200,http://10.10.14.62:9200,http://10.10.14.63:9200
|
||||
##nodes = http://192.168.0.200:9200,http://192.168.0.200:9201,http://192.168.0.200:9202
|
||||
nodes = http://elasticsearch:9200
|
||||
;http://10.10.14.188:9200,
|
||||
;nodes = http://192.168.0.200:9200,http://192.168.0.200:9201,http://192.168.0.200:9202
|
||||
;user = root
|
||||
;pwd = dsideal
|
||||
|
||||
# 本项目名称,用于记录日志
|
||||
[project]
|
||||
project_name = dsSupport
|
||||
|
||||
[rpcServer]
|
||||
ip = 127.0.0.1
|
||||
port = 8001
|
||||
|
||||
# 后台登陆账号密码
|
||||
[account]
|
||||
users = admin:dsideal,administrator:dsideal123@321,datams:data123
|
||||
|
Loading…
Reference in new issue