to:sync
This commit is contained in:
parent
f670c5466a
commit
1935529090
@ -62,12 +62,12 @@ deploy:
|
||||
image: laoma/nomad:v1
|
||||
stage: deploy
|
||||
script:
|
||||
- nomad status -address=http://10.0.0.5:4646
|
||||
- nomad status -address=http://10.0.12.8:4646 -token=${PROD_NOMAD_TOKEN}
|
||||
- envsubst < nomad-job-test.tpl.hcl > nomad-job.hcl
|
||||
- cat nomad-job.hcl
|
||||
- nomad validate nomad-job.hcl
|
||||
- nomad plan -address=http://10.0.0.5:4646 nomad-job.hcl 2>&1 |sed 's/\(password[^ \t]*[ \t]*\).*/\1 ... /' |tee plan.log || echo
|
||||
- nomad plan -address=http://10.0.12.8:4646 -token=${PROD_NOMAD_TOKEN} nomad-job.hcl 2>&1 |sed 's/\(password[^ \t]*[ \t]*\).*/\1 ... /' |tee plan.log || echo
|
||||
- export INDEX=$(grep -E -o -- '-check-index [0-9]+' plan.log |tr -dc 0-9)
|
||||
- nomad run -check-index $INDEX -address=http://10.0.0.5:4646 nomad-job.hcl
|
||||
- nomad run -check-index $INDEX -token=${PROD_NOMAD_TOKEN} -address=http://10.0.12.8:4646 nomad-job.hcl
|
||||
dependencies:
|
||||
- docker-package
|
@ -4,8 +4,8 @@ fbServer:
|
||||
|
||||
# fbConsul
|
||||
fbConsul:
|
||||
address: 10.0.0.5:8500
|
||||
datacenter: dg01
|
||||
address: 10.0.12.8:8500
|
||||
datacenter: sh01
|
||||
token: 4b29ca6c-3233-4c70-7bb1-a3f4c2a18281
|
||||
|
||||
# rpc
|
||||
@ -15,7 +15,7 @@ rpc:
|
||||
# mysql
|
||||
mysql:
|
||||
logSql: false
|
||||
dsn: uc:zELLqwk2hBp8QyJgEtH5YGc6WKMS3dXP@tcp(10.0.0.5:10119)/user_center?charset=utf8mb4&parseTime=True&loc=Local
|
||||
dsn: uc:zELLqwk2hBp8QyJgEtH5YGc6WKMS3dXP@tcp(10.0.12.8:10119)/user_center?charset=utf8mb4&parseTime=True&loc=Local
|
||||
maxIdleConn: 4
|
||||
maxOpenConn: 4
|
||||
connMaxLifetime: 3000
|
||||
@ -23,7 +23,7 @@ mysql:
|
||||
# redis
|
||||
redis:
|
||||
db: 1
|
||||
addr: 10.0.0.5:6379
|
||||
addr: 10.0.12.8:6379
|
||||
readTimeout: 6000
|
||||
writeTimeout: 6000
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
job "${APP_NAME}-${CI_COMMIT_BRANCH}-job" {
|
||||
datacenters = ["dj01"]
|
||||
datacenters = ["sh01"]
|
||||
type = "service"
|
||||
|
||||
group "${APP_NAME}-${CI_COMMIT_BRANCH}-group" {
|
||||
@ -29,11 +29,9 @@ job "${APP_NAME}-${CI_COMMIT_BRANCH}-job" {
|
||||
|
||||
config {
|
||||
image = "${CURRENT_IMAGE_URL}"
|
||||
network_mode = "djLay"
|
||||
network_mode = "sh01"
|
||||
# No port map required.
|
||||
|
||||
# volumes = ["/opt/settings/server.properties:/opt/settings/server.properties"]
|
||||
|
||||
auth {
|
||||
server_address = "${CI_REGISTRY}"
|
||||
username = "${CI_REGISTRY_USER}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user