Skip to content

Local development based on Docker #16746

@Wirone

Description

@Wirone

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions