# build images
./docker/build.sh
# init (run once)
mkdir rc-dev && cd rc-dev
git clone --branch 3.16.2 https://github.com/RocketChat/Rocket.Chat
git clone --branch recipes/registering-api-endpoints https://github.com/RocketChat/Apps.RocketChat.Tester Apps/recipes
git --git-dir=Rocket.Chat/.git config conre.autocrlf false
docker run --name rc-ssh louissung/rc:dev-3.16.2 cat /app/id_rsa > .rc.key && chmod 600 .rc.key && ssh-add .rc.key && rm .rc.key && docker rm rc-ssh
docker volume create rc-db
# run dev
docker run -idt --name rc-dev -v rc-db:/app/Rocket.Chat/.meteor/local/db -p 2222:22 -p 3000:3000 -p 3001:3001 -p 9229:9229 louissung/rc:dev-3.16.2
# ssh -p 2222 root@localhost
# run prod (see commands in docker/docker-entrypoint.sh)
# register sample plugins (apps)
# visit http://localhost:3000/admin and Checkout `General > Apps > Enable development mode & Enable the App Framework`
docker exec -it rc-dev bash
>>> cd /root/Apps/recipes/
>>> # sed -i 's/export class RocketChatTester/export class AppsRocketChatTesterApp/' AppsRocketChatTesterApp.ts # fix `There must be an exported class`
>>> rc-apps deploy --url http://localhost:3000 -u <admin_username> -p <admin_password>
- Official Docs: Rock.Chat Docs (Offline Docs & Developer Guides)
- Meteor Folder structure: Meteor Guide
- Sample breakpoint:
server/methods/canAccessRoom.js#L10
(outdated for louissung/rc-dev:3.14.0-apps-engine and louissung/rc:dev-3.14.0, use sftp instead)
- Excluded path (
.idea/deployment.xml
), SFTP (.idea/webServers.xml
), and SSH (.idea/sshConfigs.xml
)