1、修复gateway图片上传临时目录权限问题。2、修复docker etcd生产环境连接问题
This commit is contained in:
parent
a8e6836731
commit
e5ba001080
@ -71,7 +71,12 @@ func (w *WestDexService) CallAPI(code string, reqData map[string]interface{}) (r
|
|||||||
logx.Errorf("【西部数据请求】发送请求错误: %v", err)
|
logx.Errorf("【西部数据请求】发送请求错误: %v", err)
|
||||||
return nil, errors.New("业务异常")
|
return nil, errors.New("业务异常")
|
||||||
}
|
}
|
||||||
defer httpResp.Body.Close()
|
defer func(Body io.ReadCloser) {
|
||||||
|
err := Body.Close()
|
||||||
|
if err != nil {
|
||||||
|
|
||||||
|
}
|
||||||
|
}(httpResp.Body)
|
||||||
|
|
||||||
// 检查请求是否成功
|
// 检查请求是否成功
|
||||||
if httpResp.StatusCode == 200 {
|
if httpResp.StatusCode == 200 {
|
||||||
|
@ -24,6 +24,8 @@ COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certifi
|
|||||||
COPY --from=builder /usr/share/zoneinfo/Asia/Shanghai /usr/share/zoneinfo/Asia/Shanghai
|
COPY --from=builder /usr/share/zoneinfo/Asia/Shanghai /usr/share/zoneinfo/Asia/Shanghai
|
||||||
ENV TZ Asia/Shanghai
|
ENV TZ Asia/Shanghai
|
||||||
|
|
||||||
|
RUN mkdir -p /tmp && chmod 1777 /tmp
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=builder /app/gateway /app/gateway
|
COPY --from=builder /app/gateway /app/gateway
|
||||||
COPY --from=builder /app/etc /app/etc
|
COPY --from=builder /app/etc /app/etc
|
||||||
|
@ -75,119 +75,6 @@ services:
|
|||||||
- tyapi_network
|
- tyapi_network
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
tyapi_gateway:
|
|
||||||
container_name: tyapi_gateway
|
|
||||||
build:
|
|
||||||
context: .
|
|
||||||
dockerfile: ./apps/gateway/Dockerfile
|
|
||||||
ports:
|
|
||||||
- "10001:10001"
|
|
||||||
environment:
|
|
||||||
- ENV=production
|
|
||||||
depends_on:
|
|
||||||
- tyapi_etcd
|
|
||||||
- tyapi_redis
|
|
||||||
- tyapi_mysql
|
|
||||||
- tyapi_user
|
|
||||||
- tyapi_sentinel
|
|
||||||
networks:
|
|
||||||
- tyapi_network
|
|
||||||
restart: always
|
|
||||||
|
|
||||||
tyapi_admin:
|
|
||||||
container_name: tyapi_admin
|
|
||||||
build:
|
|
||||||
context: .
|
|
||||||
dockerfile: ./apps/admin/Dockerfile
|
|
||||||
ports:
|
|
||||||
- "10002:10002"
|
|
||||||
environment:
|
|
||||||
- ENV=production
|
|
||||||
depends_on:
|
|
||||||
- tyapi_etcd
|
|
||||||
- tyapi_redis
|
|
||||||
- tyapi_mysql
|
|
||||||
- tyapi_user
|
|
||||||
- tyapi_sentinel
|
|
||||||
networks:
|
|
||||||
- tyapi_network
|
|
||||||
restart: always
|
|
||||||
|
|
||||||
tyapi_api:
|
|
||||||
container_name: tyapi_api
|
|
||||||
build:
|
|
||||||
context: .
|
|
||||||
dockerfile: ./apps/api/Dockerfile
|
|
||||||
ports:
|
|
||||||
- "10003:10003"
|
|
||||||
environment:
|
|
||||||
- ENV=production
|
|
||||||
depends_on:
|
|
||||||
- tyapi_etcd
|
|
||||||
- tyapi_redis
|
|
||||||
- tyapi_mysql
|
|
||||||
- tyapi_user
|
|
||||||
- tyapi_sentinel
|
|
||||||
- tyapi_mqs
|
|
||||||
- tyapi_kafka
|
|
||||||
networks:
|
|
||||||
- tyapi_network
|
|
||||||
restart: always
|
|
||||||
|
|
||||||
tyapi_mqs:
|
|
||||||
container_name: tyapi_mqs
|
|
||||||
build:
|
|
||||||
context: .
|
|
||||||
dockerfile: ./apps/mqs/Dockerfile
|
|
||||||
environment:
|
|
||||||
- ENV=production
|
|
||||||
ports:
|
|
||||||
- "12001:12001"
|
|
||||||
depends_on:
|
|
||||||
- tyapi_kafka
|
|
||||||
- tyapi_etcd
|
|
||||||
- tyapi_redis
|
|
||||||
- tyapi_user
|
|
||||||
- tyapi_sentinel
|
|
||||||
networks:
|
|
||||||
- tyapi_network
|
|
||||||
restart: always
|
|
||||||
|
|
||||||
tyapi_sentinel:
|
|
||||||
container_name: tyapi_sentinel
|
|
||||||
build:
|
|
||||||
context: .
|
|
||||||
dockerfile: ./apps/sentinel/Dockerfile
|
|
||||||
environment:
|
|
||||||
- ENV=production
|
|
||||||
depends_on:
|
|
||||||
- tyapi_redis
|
|
||||||
- tyapi_mysql
|
|
||||||
- tyapi_etcd
|
|
||||||
ports:
|
|
||||||
- "11002:11002"
|
|
||||||
networks:
|
|
||||||
- tyapi_network
|
|
||||||
restart: always
|
|
||||||
|
|
||||||
tyapi_user:
|
|
||||||
container_name: tyapi_user
|
|
||||||
build:
|
|
||||||
context: .
|
|
||||||
dockerfile: ./apps/user/Dockerfile
|
|
||||||
environment:
|
|
||||||
- ENV=production
|
|
||||||
ports:
|
|
||||||
- "11001:11001"
|
|
||||||
depends_on:
|
|
||||||
- tyapi_mysql
|
|
||||||
- tyapi_redis
|
|
||||||
- tyapi_etcd
|
|
||||||
- tyapi_sentinel
|
|
||||||
networks:
|
|
||||||
- tyapi_network
|
|
||||||
restart: always
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
mysql_data:
|
mysql_data:
|
||||||
driver: local
|
driver: local
|
||||||
|
@ -6,7 +6,8 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- TZ=Asia/Shanghai
|
- TZ=Asia/Shanghai
|
||||||
- ALLOW_NONE_AUTHENTICATION=yes
|
- ALLOW_NONE_AUTHENTICATION=yes
|
||||||
- ETCD_ADVERTISE_CLIENT_URLS=http://127.0.0.1:2379
|
- ETCD_ADVERTISE_CLIENT_URLS=http://tyapi_etcd:2379
|
||||||
|
- ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379
|
||||||
networks:
|
networks:
|
||||||
- tyapi_network
|
- tyapi_network
|
||||||
restart: always
|
restart: always
|
||||||
|
Loading…
Reference in New Issue
Block a user