RocketChat / RocketChat/Rocket.Chat

Local development based on Docker

Open
#16,746 12 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

deployment triaged type: improvement
Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Current development workflow is described in README.md as:

git clone https://github.com/RocketChat/Rocket.Chat.git
cd Rocket.Chat
meteor npm install
meteor npm start

with Git and Meteor as prerequisites.

It does not make sense in modern app development to pollute local machine with dev dependencies (Meteor and NPM packages) and also does not ensure that app is run on the same environment.

Unfortunately docker-compose.yml does not offer local stack based on local code since rocketchat service is run from rocketchat/rocket.chat:latest.

Would be great if there was local development process based on Docker stack, with RocketChat service built from local files, so developer could easily do docker-compose up -d and start the app and work on the code (changes should automatically restart server).

Worth considering:

  • Traefik support out of the box with configurable host (label traefik.frontend.rule=Host:${ROCKETCHAT_HOST:-rocketchat.local})
  • Support for Docker Host Manager (env DOMAIN_NAME: "default:${ROCKETCHAT_HOST:-rocketchat.local}") (fork because this PR wasn't merged but it's much better to define developer-friendly host rather than default, convention-based hosts)
  • mounting local code as volume so node_modules would be stored outside of container and can be easily re-used and changes in code would have immediately effect in the running container
  • ignoring all non-app stuff in .dockerignore, such as CI configs
  • Makefile with helpful jobs for running app and tests locally
  • Docs for building customized production-ready Docker images

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with README.md and docker-compose.yml to compare the current development instructions with the existing image-based stack. Review the requested .dockerignore, Makefile, local-code volume, host configuration, and production-image documentation; done means local code builds through Docker, changes restart the app, and the documented workflow works with docker-compose up -d.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose, typescript
Domain
developer-experience, devops, documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.