Compare commits

...

19 Commits

Author SHA1 Message Date
liwei
4aba5a194c 上传编译文件 2022-09-23 16:30:56 +08:00
liwei
a7b5e9b435 Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into platform_10.0.0.7
Conflicts:
	bin/cmd
	bin/gateway
	bin/mainte
	bin/start.sh
	bin/stop.sh
	bin/worker
2022-09-23 16:29:42 +08:00
liwei
4ce3d7f51d 上传编译文件 2022-09-22 11:08:50 +08:00
liwei
2d5612d0af Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into platform_10.0.0.7 2022-09-22 11:07:56 +08:00
liwei
ad3650df71 上传区服配置 2022-09-22 11:05:24 +08:00
liwei
9acaf9e575 上传cmd 命令文件 2022-09-22 10:29:07 +08:00
liwei
c722df694a Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into platform_10.0.0.7 2022-09-22 10:28:17 +08:00
liwei
1294779c9d 上传配置文件 2022-09-22 10:24:04 +08:00
liwei
c3e5e33c59 Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into platform_10.0.0.7 2022-09-22 10:19:04 +08:00
liwei
413a981418 Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into platform_10.0.0.7 2022-09-22 10:17:39 +08:00
liwei
468866a486 上传配置文件 2022-09-22 10:16:29 +08:00
liwei
58031a6a38 移除配置文件 2022-09-22 10:07:55 +08:00
liwei
f7f89a24e8 Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into platform_10.0.0.7 2022-09-22 10:06:45 +08:00
liwei1dao
7d9ff07051 Merge branch 'platform_10.0.0.7' of http://git.legu.cc/liwei_3d/go_dreamfactory into platform_10.0.0.7 2022-09-22 10:05:55 +08:00
liwei1dao
ea0a654b47 上传配置 2022-09-22 10:05:39 +08:00
liwei
c6efcf8865 上传编译执行文件 2022-09-20 15:57:11 +08:00
liwei
c3ab75b87e Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into platform_10.0.0.7 2022-09-20 15:55:50 +08:00
liwei1dao
8d42994fd0 上传平台版本分支 2022-09-19 17:38:18 +08:00
liwei1dao
8668026066 上传平台版本分支 2022-09-19 17:37:52 +08:00
17 changed files with 69 additions and 1630 deletions

3
.gitignore vendored
View File

@ -10,10 +10,8 @@
*.out
*.log
bin/conf
pb/proto
.vscode/
./bin/conf
./bin/log
./bin/mainte
./bin/gateway
@ -26,5 +24,6 @@ pb.bat
cmd/v2/.cache.meta
cmd/v2/my.db
.idea/
bin/conf
bin/cross.json
bin/gm.json

View File

@ -1,8 +0,0 @@
set GOOS=linux
set CGO_ENABLED=0
cd ../
del bin/mainte,bin/gateway,bin/worker
go build -o ./bin/mainte ./services/mainte/main.go
go build -o ./bin/gateway ./services/gateway/main.go
go build -o ./bin/worker ./services/worker/main.go
REM pause

View File

@ -1,8 +0,0 @@
SET CGO_ENABLED=0
SET GOOS=windows
SET GOARCH=amd64
cd ../
go build -o build/gateway.exe services/gateway/main.go
go build -o build/worker.exe services/worker/main.go
go build -o build/web.exe services/web/main.go
go build -o build/dbservice.exe services/dbservice/main.go

BIN
bin/cmd

Binary file not shown.

27
bin/cross.json Normal file
View File

@ -0,0 +1,27 @@
{
"devcross01": {
"AreaId": "devcross01",
"LoaclDB": {
"RedisIsCluster": false,
"RedisAddr": [
"10.0.0.9:10012"
],
"RedisPassword": "li13451234",
"RedisDB": 2,
"MongodbUrl": "mongodb://10.0.0.9:10013",
"MongodbDatabase": "dreamfactory2"
},
"ServiceList": {
"dev01": {
"RedisIsCluster": false,
"RedisAddr": [
"10.0.0.9:10012"
],
"RedisPassword": "li13451234",
"RedisDB": 1,
"MongodbUrl": "mongodb://10.0.0.9:10013",
"MongodbDatabase": "dreamfactory1"
}
}
}
}

View File

@ -1,68 +0,0 @@
version: '3.7'
# 申明同一个网络
networks:
net:
name: net
# 游戏数据卷
volumes:
dreamfactory_consuldata:
name: dreamfactory_consuldata
dreamfactory_redisdata:
name: dreamfactory_redisdata
dreamfactory_mongodata:
name: dreamfactory_mongodata
# 服务
services:
redis:
image: redis:latest
container_name: dreamfactory_redis
ports:
- '10011:6379'
networks:
net:
# 给网络取别名,可以用redis和cache找到
aliases:
- cache
command: /etc/redis/redis.conf
volumes:
# 持久存储redis的数据
- dreamfactory_redisdata:/data
# 挂载本地配置文件
- ./redis.conf:/etc/redis/redis.conf
# 时间同步
# - /etc/localtime:/etc/localtime
consul:
image: consul:latest
container_name: dreamfactory_consul
ports:
- '10012:8500'
command: consul agent -server -bootstrap -data-dir /consul/data -node=ylconsul -bind=0.0.0.0 -config-dir=/consul/config/ -client=0.0.0.0 -ui
networks:
net:
# 给网络取别名,可以用consul和discovery找到
aliases:
- discovery
volumes:
- dreamfactory_consuldata:/consul/data
mongo:
image: mongo:latest
container_name: dreamfactory_mongo
ports:
- '10013:27017'
networks:
net:
# 给网络取别名,可以用mongodb和db找到
aliases:
- db
command: ['mongod', '-f', '/etc/mongo/mongod.conf']
# environment:
# MONGO_INITDB_ROOT_USERNAME: liwei1dao
# MONGO_INITDB_ROOT_PASSWORD: li13451234
volumes:
# 持久存储mongodb的数据
- dreamfactory_mongodata:/data/db:rw
- dreamfactory_mongodata:/data/configdb:rw
# 挂载本地配置文件
- ./mongod.conf:/etc/mongo/mongod.conf:rw

View File

@ -1,48 +0,0 @@
# mongod.conf
# for documentation of all options, see:
# http://docs.mongodb.org/manual/reference/configuration-options/
# where to write logging data.
# systemLog:
# destination: file
# logAppend: true
# path: "/var/log/mongodb/mongod.log"
# Where and how to store data.
storage:
dbPath: /data/db
journal:
enabled: true
wiredTiger:
engineConfig:
cacheSizeGB: 0.256
# engine:
# mmapv1:
# wiredTiger:
# how the process runs
# processManagement:
# fork: false # fork and run in background
# pidFilePath: /var/run/mongodb/mongod.pid # location of pidfile
# timeZoneInfo: /usr/share/zoneinfo
# network interfaces
net:
port: 27017
bindIp: 0.0.0.0 # Enter 0.0.0.0,:: to bind to all IPv4 and IPv6 addresses or, alternatively, use the net.bindIpAll setting.
#security:
#operationProfiling:
#replication:
#sharding:
## Enterprise-Only Options
#auditLog:
#snmp:

View File

@ -1,37 +0,0 @@
# Client port of 4222 on all interfaces
port: 4222
# HTTP monitoring port
monitor_port: 8222
# This is for clustering multiple servers together.
cluster {
# Route connections to be received on any interface on port 6222
port: 6222
# Routes are protected, so need to use them with --routes flag
# e.g. --routes=nats-route://ruser:T0pS3cr3t@otherdockerhost:6222
# authorization {
# user: ruser
# password: T0pS3cr3t
# timeout: 0.75
# }
# Routes are actively solicited and connected to from this server.
# This Docker image has none by default, but you can pass a
# flag to the nats-server docker image to create one to an existing server.
routes = []
}
# max_connections
max_connections: 100
# max_subscriptions (per connection)
max_subscriptions: 1000
# maximum protocol control line
max_control_line: 512
# maximum payload
max_payload: 65536

View File

@ -1,63 +0,0 @@
user nginx;
worker_processes 2;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 4096;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
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 /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 120;
#gzip on;
include /etc/nginx/conf.d/*.conf;
#(配置请求体缓存区大小, 不配的话)
}
stream {
# redisd 代理
upstream redis {
hash $remote_addr consistent;
server redis:6379 weight=5 max_fails=1 fail_timeout=10s;
}
server {
listen 10001;
proxy_pass redis;
}
# redisd 代理
upstream mongo {
hash $remote_addr consistent;
server mongo:27017 weight=5 max_fails=1 fail_timeout=10s;
}
server {
listen 10002;
proxy_pass mongo;
}
# consul 代理
upstream consul {
hash $remote_addr consistent;
server consul:8500 weight=5 max_fails=1 fail_timeout=10s;
}
server {
listen 10003;
proxy_pass consul;
}
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

37
bin/gm.json Normal file
View File

@ -0,0 +1,37 @@
{
"AreaId": "dev01",
"AreaName":"测试服",
"OpenServiceTime":"2022-04-01 12:03",
"Channel":"channel_1",
"Loglevel": 5,
"MaxAgeTime": 7,
"ConsulAddr": [
"10.0.0.9:10012"
],
"IsCross": false,
"BelongCrossServerId": "devcross01",
"LoaclDB": {
"RedisIsCluster": false,
"RedisAddr": [
"10.0.0.9:10011"
],
"RedisPassword": "li13451234",
"RedisDB": 1,
"MongodbUrl": "mongodb://10.0.0.9:10013",
"MongodbDatabase": "dreamfactory1"
},
"Mainte": "127.0.0.1:7896",
"MaintePort": 9572,
"Gateways": [
"127.0.0.1:7895",
"127.0.0.1:7896"
],
"GatewayPorts": [
9571,
7812
],
"Workers": [
"127.0.0.1:9573",
"127.0.0.1:9573"
]
}

Binary file not shown.

4
bin/start.py Normal file
View File

@ -0,0 +1,4 @@
import os
txt = os.system("cd /data/3dmenggongchang/dreamworks/ && ./start.sh")
print txt

View File

@ -1,9 +0,0 @@
./stup.sh start dfcross_1_worker0 worker ./conf/dfcross_1_worker0.yaml
sleep 1
./stup.sh start dfcross_1_mainte mainte ./conf/dfcross_1_mainte.yaml
sleep 1
./stup.sh start df01_mainte mainte ./conf/df01_mainte.yaml
sleep 1
./stup.sh start df01_worker0 worker ./conf/df01_worker0.yaml
sleep 1
./stup.sh start df01_gateway0 gateway ./conf/df01_gateway0.yaml

View File

@ -1,9 +0,0 @@
./stup.sh stop df01_gateway0
./stup.sh stop df01_mainte
./stup.sh stop df01_worker0
./stup.sh stop dfcross_1_worker0
./stup.sh stop dfcross_1_mainte

Binary file not shown.