Skip to content

Commit

Permalink
feat: add openim-docker design (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
cubxxw authored Aug 28, 2023
1 parent 02e4c1d commit 3d58785
Show file tree
Hide file tree
Showing 129 changed files with 39 additions and 23 deletions.
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ PASSWORD=openIM123
MINIO_ENDPOINT=http://127.0.0.1:10005
API_URL=http://127.0.0.1:10002
DATA_DIR=./
CHAT_BRANCH=release-v1.2
SERVER_BRANCH=release-v3.2
34 changes: 24 additions & 10 deletions README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,12 @@ OpenIM Docker Deployment
│ └── 📄 Dockerfile-chat
├── 📁 **openim-server/**
│ ├── 📄 docker-compose.yml
│ └── 📁 **configs/**
│ ├── 📄 server-config.yaml
│ └── 📄 other-config.yaml
│ ├── 📁 release-v*.*/
│ └── 📁 main/
├── 📁 **openim-chat/**
│ ├── 📄 docker-compose.yml
│ └── 📁 **configs/**
│ ├── 📄 chat-config.yaml
│ └── 📄 other-config.yaml
│ ├── 📁 release-v*.*/
│ └── 📁 main/
├── 📁 **env/**
│ ├── 📄 openim-server.env
Expand All @@ -43,8 +39,8 @@ OpenIM Docker Deployment
- `build/`:用于构建 Docker 镜像。
- `openim-server/`:用于部署 openim-server。
- `openim-chat/`:用于部署 openim-chat。
- `env/`:存放 Docker-compose 的环境变量文件。
- `example/`:包含各种 Docker-compose 示例。
- `env/`:存放 Docker-compose 的环境变量文件。(暂时不需要)
- `example/`:包含各种 Docker-compose 示例,提供特性部署方案


### 项目结构说明
Expand Down Expand Up @@ -77,6 +73,24 @@ OpenIM Docker Deployment
git clone https://github.com/openim-sigs/openim-docker openim/openim-docker && export openim=$(pwd)/openim && cd $openim/openim-docker
```

**修改配置文件:**

```bash
# cat .env
# 修改用户名
USER=root
# 修改密码
PASSWORD=openIM123
# 修改 MINIO_ENDPOINT
MINIO_ENDPOINT=http://127.0.0.1:10005
API_URL=http://127.0.0.1:10002
DATA_DIR=./
# 修改版本,支持 main,tag,release-* 分支
CHAT_BRANCH=release-v1.2
SERVER_BRANCH=release-v3.2
```


**默认启动选择:**

```bash
Expand Down
26 changes: 13 additions & 13 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,15 @@ services:
command: minio server /data --console-address ':9090'

openim-server:
# build: .
image: ghcr.io/openimsdk/openim-server:release-v3.2
# image: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server:release-v3.2
# image: openim/openim-server:release-v3.2
# image: ghcr.io/openimsdk/openim-server:${SERVER_BRANCH}
# image: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server:${SERVER_BRANCH}
image: openim/openim-server:${SERVER_BRANCH}
# build: .
container_name: openim-server
volumes:
- ./openim-server/logs:/openim/openim-server/logs
- ./openim-server/config:/openim/openim-server/config
- ./openim-server/scripts:/openim/openim-server/scripts
- ./openim-server/${SERVER_BRANCH}/logs:/openim/openim-server/logs
- ./openim-server/${SERVER_BRANCH}/config:/openim/openim-server/config
- ./openim-server/${SERVER_BRANCH}/scripts:/openim/openim-server/scripts
restart: always
depends_on:
- zookeeper
Expand All @@ -124,19 +124,19 @@ services:
max-file: "2"

openim-chat:
image: ghcr.io/openimsdk/openim-chat:release-v1.2
# image: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-chat:release-v1.2
# image: openim/openim-chat:release-v1.2
# image: ghcr.io/openimsdk/openim-chat:${CHAT_BRANCH}
# image: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-chat:${CHAT_BRANCH}
image: ghcr.io/openimsdk/openim-chat:${CHAT_BRANCH}
container_name: openim-chat
healthcheck:
test: ["CMD-SHELL", "./scripts/check-all.sh"]
interval: 30s
timeout: 10s
retries: 5
volumes:
- ./openim-chat/logs:/openim/openim-chat/logs
- ./openim-chat/config:/openim/openim-chat/config
- ./openim-chat/scripts:/openim/openim-chat/scripts
- ./openim-chat/${CHAT_BRANCH}/logs:/openim/openim-chat/logs
- ./openim-chat/${CHAT_BRANCH}/config:/openim/openim-chat/config
- ./openim-chat/${CHAT_BRANCH}/scripts:/openim/openim-chat/scripts
restart: always
user: root:root
depends_on:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 3d58785

Please sign in to comment.