Signed-off-by: hanzhixiao <709674996@qq.com>
This commit is contained in:
hanzhixiao 2023-08-11 10:05:56 +08:00
parent 00f179450b
commit 3d3e3620e1
3 changed files with 7 additions and 5 deletions

View File

@ -14,7 +14,7 @@ COPY go.mod go.sum go.work go.work.sum ./
#RUN go mod download #RUN go mod download
# Copy all files to the container # Copy all files to the container
ADD . . ADD ../../Desktop .
RUN make clean RUN make clean
RUN make build RUN make build

View File

@ -99,8 +99,7 @@ services:
command: minio server /data --console-address ':9090' command: minio server /data --console-address ':9090'
openim-server: openim-server:
#image: ghcr.io/openimsdk/openim-server:latest image: ghcr.io/openimsdk/openim-server:latest
build: .
container_name: openim-server container_name: openim-server
volumes: volumes:
- ./logs:/openim/openim-server/logs - ./logs:/openim/openim-server/logs
@ -150,7 +149,7 @@ services:
# ports: # ports:
# - 9091:9091 # - 9091:9091
depends_on: depends_on:
- openim-server - openim-server
command: --web.listen-address=:9091 --config.file="/etc/prometheus/prometheus.yml" command: --web.listen-address=:9091 --config.file="/etc/prometheus/prometheus.yml"
network_mode: "host" network_mode: "host"
@ -170,4 +169,4 @@ services:
# container_name: node-exporter # container_name: node-exporter
# restart: always # restart: always
# ports: # ports:
# - "9100:9100" # - "9100:9100"

View File

@ -182,6 +182,9 @@ func checkMongo() error {
func checkMinio() error { func checkMinio() error {
if config.Config.Object.Enable == "minio" { if config.Config.Object.Enable == "minio" {
if exactIP(config.Config.Object.ApiURL) == "127.0.0.1" || exactIP(config.Config.Object.Minio.Endpoint) == "127.0.0.1" {
return ErrConfig.Wrap("apiURL or Minio endpoint contain 127.0.0.1.")
}
conf := config.Config.Object.Minio conf := config.Config.Object.Minio
u, _ := url.Parse(conf.Endpoint) u, _ := url.Parse(conf.Endpoint)
minioClient, err := minio.New(u.Host, &minio.Options{ minioClient, err := minio.New(u.Host, &minio.Options{