编辑
2023-09-05
学习笔记
00
请注意,本文编写于 457 天前,最后修改于 453 天前,其中某些信息可能已经过时。

目录

安装Docker和Docker-compose
安装RocketChat
安装 Nginx Proxy Manager

写在前言,目前没有可找到的arm版本,所以只能在amd上搭建!

安装Docker和Docker-compose

  1. 安装Docker
bash
wget -qO- get.docker.com | bash
  1. 安装Docker-compose
  • ARM64v8
bash
curl -L https://github.com/docker/compose/releases/download/v2.17.3/docker-compose-linux-aarch64 | sudo tee /usr/local/bin/docker-compose >/dev/null
  • AMD64
bash
curl -L https://github.com/docker/compose/releases/download/v2.17.3/docker-compose-linux-x86_64 | sudo tee /usr/local/bin/docker-compose >/dev/null
  1. 执行权限
bash
sudo chmod +x /usr/local/bin/docker-compose

安装RocketChat

  1. 创建RocketChat并进入目录
mkdir RocketChat && cd /root/RocketChat
  1. 配置文件
yaml
version: "3" volumes: mongodb_data: { driver: local } services: rocketchat: image: registry.rocket.chat/rocketchat/rocket.chat:${RELEASE:-latest} restart: always labels: traefik.enable: "true" traefik.http.routers.rocketchat.rule: Host(`${DOMAIN:-}`) traefik.http.routers.rocketchat.tls: "true" traefik.http.routers.rocketchat.entrypoints: https traefik.http.routers.rocketchat.tls.certresolver: le environment: MONGO_URL: "${MONGO_URL:-\ mongodb://${MONGODB_ADVERTISED_HOSTNAME:-mongodb}:${MONGODB_INITIAL_PRIMARY_PORT_NUMBER:-27017}/\ ${MONGODB_DATABASE:-rocketchat}?replicaSet=${MONGODB_REPLICA_SET_NAME:-rs0}}" MONGO_OPLOG_URL: "${MONGO_OPLOG_URL:\ -mongodb://${MONGODB_ADVERTISED_HOSTNAME:-mongodb}:${MONGODB_INITIAL_PRIMARY_PORT_NUMBER:-27017}/\ local?replicaSet=${MONGODB_REPLICA_SET_NAME:-rs0}}" ROOT_URL: ${ROOT_URL:-http://localhost:${HOST_PORT:-3000}} PORT: ${PORT:-3000} DEPLOY_METHOD: docker DEPLOY_PLATFORM: ${DEPLOY_PLATFORM:-} REG_TOKEN: ${REG_TOKEN:-} depends_on: - mongodb expose: - ${PORT:-3000} ports: - "${BIND_IP:-0.0.0.0}:${HOST_PORT:-3000}:${PORT:-3000}" mongodb: image: docker.io/bitnami/mongodb:${MONGODB_VERSION:-5.0} restart: always volumes: - mongodb_data:/bitnami/mongodb environment: MONGODB_REPLICA_SET_MODE: primary MONGODB_REPLICA_SET_NAME: ${MONGODB_REPLICA_SET_NAME:-rs0} MONGODB_PORT_NUMBER: ${MONGODB_PORT_NUMBER:-27017} MONGODB_INITIAL_PRIMARY_HOST: ${MONGODB_INITIAL_PRIMARY_HOST:-mongodb} MONGODB_INITIAL_PRIMARY_PORT_NUMBER: ${MONGODB_INITIAL_PRIMARY_PORT_NUMBER:-27017} MONGODB_ADVERTISED_HOSTNAME: ${MONGODB_ADVERTISED_HOSTNAME:-mongodb} MONGODB_ENABLE_JOURNAL: ${MONGODB_ENABLE_JOURNAL:-true} ALLOW_EMPTY_PASSWORD: ${ALLOW_EMPTY_PASSWORD:-yes}

3.在当前文件夹/root/RocketChat下创建并编辑.env文件,写入如下内容:

ini
### Rocket.Chat configuration # Rocket.Chat version # see:- https://github.com/RocketChat/Rocket.Chat/releases RELEASE=6.2.4 # MongoDB endpoint (include ?replicaSet= parameter) #MONGO_URL= # MongoDB endpoint to the local database #MONGO_OPLOG_URL= # IP to bind the process to #BIND_IP= # URL used to access your Rocket.Chat instance ROOT_URL=http://11.22.77.88 # Port Rocket.Chat runs on (in-container) #PORT= # Port on the host to bind to #HOST_PORT= ### MongoDB configuration # MongoDB version/image tag #MONGODB_VERSION= # See:- https://hub.docker.com/r/bitnami/mongodb ### Traefik config (if enabled) # Traefik version/image tag #TRAEFIK_RELEASE= # Domain for https (change ROOT_URL & BIND_IP accordingly) #DOMAIN= # Email for certificate notifications #LETSENCRYPT_EMAIL=

安装 Nginx Proxy Manager

  1. 创建docker-compose.yml文件
mkdir -p /root/nginxproxymanager # 创建一个 npm 的文件夹 cd /root/nginxproxymanager # 进入该文件夹 vi docker-compose.yml
  1. 编辑docker-compose文件
yaml
version: '3' services: app: image: 'jc21/nginx-proxy-manager:latest' restart: unless-stopped ports: - '80:80' # 不建议修改端口 - '81:81' # 可以把冒号左边的 81 端口修改成你服务器上没有被占用的端口 - '443:443' # 不建议修改端口 volumes: - ./data:/data # 点号表示当前文件夹,冒号左边的意思是在当前文件夹下创建一个 data 目录,用于存放数据,如果不存在的话,会自动创建 - ./letsencrypt:/etc/letsencrypt # 点号表示当前文件夹,冒号左边的意思是在当前文件夹下创建一个 letsencrypt 目录,用于存放证书,如果不存在的话,会自动创建
  1. 安装nginx proxy manager
docker-compose up -d # -d 表示后台运行
  1. 登陆nginx proxy manager,填入默认用户名和密码 默认登陆的用户名:[email protected] 密码:changeme

本文作者:我本无罪

本文链接:

版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!

我的博客
博客头部图片

通过邀请:现货杠杆代币手续费减免20%,合约交易手续费减免20%