-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]>
- Loading branch information
Showing
6 changed files
with
125 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Ignore files and directories starting with a dot | ||
|
||
# Ignore specific files | ||
.dockerignore | ||
|
||
# Ignore build artifacts | ||
_output/ | ||
logs/ | ||
|
||
# Ignore non-essential documentation | ||
README.md | ||
README-zh_CN.md | ||
CONTRIBUTING.md | ||
CHANGELOG/ | ||
# LICENSE | ||
|
||
# Ignore testing and linting configuration | ||
.golangci.yml | ||
|
||
# Ignore deployment-related files | ||
docker-compose.yaml | ||
deployments/ | ||
|
||
# Ignore assets | ||
assets/ | ||
|
||
# Ignore components | ||
components/ | ||
|
||
# Ignore tools and scripts | ||
.github/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: OpenIM Build Docker Images | ||
on: | ||
push: | ||
tags: | ||
- v* | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
bin: | ||
- openim-chat | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Docker metadata | ||
id: metadata | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ghcr.io/${{ github.repository_owner }}/openim-${{ matrix.bin }} | ||
- name: Build and release Docker images | ||
uses: docker/build-push-action@v3 | ||
with: | ||
platforms: linux/amd64,linux/arm64/v8 | ||
target: ${{ matrix.bin }} | ||
tags: ${{ steps.metadata.outputs.tags }} | ||
push: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM ubuntu | ||
|
||
# 设置固定的项目路径 | ||
ENV WORKDIR /chat | ||
ENV CMDDIR $WORKDIR/scripts | ||
|
||
ENV CONFIG_NAME $WORKDIR/config/config.yaml | ||
|
||
# 将可执行文件复制到目标目录 | ||
ADD ./bin/open_im_admin $WORKDIR/bin/open_im_admin | ||
ADD ./bin/open_im_admin_api $WORKDIR/bin/open_im_admin_api | ||
ADD ./bin/open_im_chat $WORKDIR/bin/open_im_chat | ||
ADD ./bin/open_im_chat_api $WORKDIR/bin/open_im_chat_api | ||
ADD ./scripts $WORKDIR/scripts | ||
ADD ./config/config.yaml $WORKDIR/config/config.yaml | ||
|
||
# 创建用于挂载的几个目录,添加可执行权限 | ||
RUN mkdir $WORKDIR/logs && \ | ||
chmod +x $WORKDIR/bin/open_im_admin $WORKDIR/bin/open_im_chat $WORKDIR/bin/open_im_admin_api $WORKDIR/bin/open_im_chat_api | ||
RUN apt-get -qq update \ | ||
&& apt-get -qq install -y --no-install-recommends ca-certificates curl | ||
|
||
VOLUME ["/chat/logs","/chat/config","/chat/scripts"] | ||
|
||
WORKDIR $CMDDIR | ||
CMD ["./docker_start_all.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters