Docker-Compse 를 이용하여 Rocket.Chat 사용하기

Rocket.Chat 오픈 소스 사용하기(feat. hubot 사용하기)

donation

2022년 NHN Cloud 무료 교육일정 : https://doc.skill.or.kr/2022-NHN-Cloud-Education

1. Rocket.Chat 이란 무엇인가?

Rocket.Chat 은 데이터 보호 수준이 높은 조직을 위해 JavaScript로 개발된 완전 맞춤형 오픈 소스 커뮤니케이션 플랫폼입니다.

We are a MERN based application enabling real-time conversations between colleagues, with other companies or with your customers, regardless of how they connect with you. The result is an increase in productivity and customer satisfaction rates.

Every day, tens of millions of users in over 150 countries and in organizations such as Deutsche Bahn, The US Navy, and Credit Suisse trust Rocket.Chat to keep their communications completely private and secure.

2. Rocket.Chat 의 주요기능은?

  • 강력하고 유연한 커뮤니티케이션 도구

  • 간편한 파일 공유, 제공 드래그 앤 드롭 지원.

  • 오디오 파일 공유

  • 화상 채팅 지원

  • 별도의 채널 (공개, 비공개 옵션 지원)

  • 종단 간 암호화 지원

  • 무제한 메시지 기록 (자체 관리 구성을 위한 서버 스토리지에 따라 다름.)

  • RSS 통합

  • 타사 응용 프로그램과 호

  • 푸시 알람 지원

  • LiveChat 지원

  • 연중 무휴 24시간 지원

  • 다중 플랫폼 지원(Windows, macOS, Android, iOS 및 Gnu/Linux)

  • 게스트 엑세스

3. Rocket.Chat 라이센스는?

3-1 Paid help

Pay for support - Pricing

Email: [email protected]

3-2 Seek free help

Patiently wait for a volunteer to consider helping you.

If you opt for community's help instead of paid support, please notice that:

  • Most people in the chat are volunteers who will try and help for free

  • Volunteers do this in their spare time and are not getting paid for this. Please respect them.

  • Just because it is urgent for you does mean that it is urgent for them

  • Please answer their questions patiently and help them try and understand your problem

  • Being rude to them will not help you at all

  • Please note that posting the same question in several channels will not help you

  • Please do not DM anyone unless you know them, or they DM you first

  • Please do not randomly use @ people or @all hoping to get attention

  • Abuse of these things will not get any help but can get you muted, blocked, or banned.

  • Don't open a bug yet. When you ask in the channels or forums then devs or other community helpers will tell you if you really need to open an issue. Frequently if there really is a problem you won't be the first one to experience it, so always check github carefully for duplicates. Use lots of different search terms and make sure you check closed Issues as well (see below).

  • Do not ask the same question in multiple channels. Use the channel (from mentioned) that you think is most relevant to your issues. Support, React-Native, Ubuntu Snap,Raspberry Pi, Omnichannel, Desktop, Federation

4. rocket.chat 공식 사이트

Rocket.Chat 공식 사이트 : https://rocket.chat/

Rocket.Chat developer 공식 사이트 : https://developer.rocket.chat/

Rocket.Chat Document 공식사이트 : https://docs.rocket.chat/

5. docker-compose.yml 다운로드 및 파일 내용

5.1 Rocket.Chat 사이트에서 docker-compose.yml 다운로드 경로

5.2 docker-compose.yml 파일 내용

Rocket.Chat docker-compose.yml

6. Docker-Compose 실행 방법 및 상태 확인

6.1 docker-compose 실행 방법

6.2 Containers 동작 방식

  1. MongDB 서비스를 시작함.

  2. mongo-init-replica 가 실행되고 MongDB 연결하고 초기화하며 자체적으로 종료 됨.

  3. mongo-init-replica 가 정상 종료 된 후 rocketchat 서비스가 동작 함.

  4. hubot 은 instance 는 시작 되지 않으며 추가 작업이 필요 함.(추가 설정이 필요 함)

    • MongDB 에서 계정을 생성 하여야 함.

    • rocketchat 에 연결 하여 bot 계정 생성 하여야 함.

    • hubot instance 에 접속 하여 hubot Install and setting 을 진행 하여야 함.

  5. hubot instance 를 재시작 함.

  6. instance log 를 보며 상태를 확인 함.

6.3 docker ps 현황

mongo-init-replica 의 Instance 는 정상 동작 후 사라진다.

6.4 Rocket.Chat 접속 화면

Rocat.Chat 접속 화면

6.5 docker-compose 폴더 설명

폴더
파일
설명

rocket.chat

docker-compose.yml

docker-compose 실행 파일

rocket.chat/data

mongodb data folder 및 files

rocket.chat/scripts

robot scripts files

rocket.chat/uploads

uploads files

7. Rocket.Chat 세부 설정

4.5 에서 docker-compose up -d 에서 실행 하면 rocket.chat 은 접속이 가능하나 hubot 이 정상 동작하지 않음.

이를 해결 하기 위해 와 같은 작업이 필요. Docker-Compse 를 이용하여 Rocket.Chat 사용하기

7.1 처음 해야 할 사항.

7.1.1. mongodb 로그 상태를 확인

7.1.2 Rocket.Chat 로그 확인

7.1.3 Hubot 로그 확인

7.2 Rocket.Chat Web Site 확인

7.2.1 Rocket.Chat 접속 및 설정 하기

Rocket.Chat 접속 화면
Rocket.Chat 조직 정보 등록
Rocket.Chat 서버 정보
Rocket.Chat 서버 등록
Rocket.Chat 설정 후 로인 된 화면

8. Hubot 설정 및 확인

8.1 docker-compose.yml 설정 확인

8.2 Rocket.Chat 에 Bot 계정 추가

8.2.1 Rocket.Chat 계정 관리

Rocket.Chat 계정 관리

8.2.2 Rocket.Chat Bot 계정 추가

docker-compose.yml 에 설정한 Bot 의 이름과 비밀번호, 닉네임을 사용자 계정에 추가 (참고: 6.1)

Rocket.Chat Bot 계정 추가
Rocket.Chat bot help

9. Hubot 사용해 보기

9.1 Hubot-diagnostics 기능

  • hubot ping - Reply with pong

  • hubot adapter - Reply with the adapter

  • hubot echo - Reply back with

  • hubot time - Reply with current time

9.2 external-scripts.json 파일

9.3 답변 추가 하기

9.3.1 diagnostics.coffee 에 답변 추가

~/node_modules/hubot-diagnostics/src/diagnostics.coffee

9.4 Hubot Container Restart

diagnostics.coffee 에 내용을 추가 하면 반드시 Container 를 재시작 해 주어야 함.

9.5 Hubot Container Logs

9.6 Rocket.Chat 사이트의 General 에서 Bot 과 대화 하기

hubot-diagnostics 사용

00. 오류 해결하기

00.1 REG_TOKEN Warring 발생

00.1.1 level=warning msg="The \"REG_TOKEN\" variable is not set. Defaulting to a blank string." 발생

00.1.2 level=warning msg="Found orphan containers ([rocket-chat_bot_rasa_1]) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up."

00.1.1-2 해결 방안

docker-compose.yml 에서 아래의 설정을 주석 처리 하여 다시 실행.

# - REG_TOKEN=${REG_TOKEN}

00.2 hubot ERROR Unable to Login

00.2.1 ERROR Unable to Login: {"isClientSafe":true,"error":403,"reason":"User not found","message":"User not found [403]","errorType":"Meteor.Error"} Reason: User not found

00.2.1 해결 방안

Rocket.Chat 에서 Bot 계정을 추가 하지 않아 발생한 문제임.

Docker-Compse 를 이용하여 Rocket.Chat 사용하기 을 참고 하시기 바랍니다.

2022년 NHN Cloud 무료 교육일정 : https://doc.skill.or.kr/2022-NHN-Cloud-Education

donation

Last updated

Was this helpful?