-
Notifications
You must be signed in to change notification settings - Fork 10.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Local development based on Docker #16746
Comments
@sampaiodiego @rodrigok could you look at this? Is it something you consider? |
hi @Wirone we have tried to this already a few times without success.. we're definitely accepting contributions on this matter. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@sampaiodiego if you point me where I can find requirements (Node, NPM versions, other dependencies) for running RocketChat, I could try it, but I can't promise anything 🙂 |
This is a script I use to build a production docker container: version=$(meteor npm version | grep 'Rocket.Chat' | egrep -o '[0-9]+.[0-9]+.[0-9]+')
ref=$(git rev-parse --short HEAD)
meteor npm install
meteor build --server-only --directory /tmp/build-pr
cd /tmp/build-pr
cp /home/maarten/projects/github/rocketchat/.docker/Dockerfile .
sudo docker build -t <docker_repo_url>:$version-$ref .
|
I have successfully used this Dockerfile to have a running container able to build rocket.chat, but as you can see it clones Rocket.Chat repo to the image, changing this to reading from the host's filesystem might do the trick:
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Unfortunately I don't use RocketChat anymore since I've changed company that I'm working with, but personally I think this is basic functionality for contributors, who would like to work with RocketChat, but don't want install all the requirements on their computer. Such setup would also make development consistent between all people (Node version etc.). Please consider giving it higher priority, @sampaiodiego 😉 |
As somebody who contributed (once) I wholeheartedly agree wit Wirone that a docker-based setup would make life a lot easier for contributors! Especially considering that there are pre-push git hooks that can lead to pretty serous headaches (or at least there were when I tried) |
very sad for this unresolved issue... anyone else work on this ?or is there another solution? |
As an alternative, maybe you can use approach similar to Gitlab and provide some SDK that will ease development (installing and running everything that is needed to work with the app)? Not necessarily as complex as GDK, but covering basic environment... Maybe use Just thinking out loud 😉 |
I used to have a setup using the official Docker-Compose and a modified Dockerfile that just needed a Here is what I used recently (clone https://github.com/RocketChat/Rocket.Chat and then add these two files ✌️ )
Hope that will help some of you guys ! It's always frustrating to be blocked by dev env when you want to contribute 😅 |
Current development workflow is described in
README.md
as: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 sincerocketchat
service is run fromrocketchat/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.frontend.rule=Host:${ROCKETCHAT_HOST:-rocketchat.local}
)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)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.dockerignore
, such as CI configsMakefile
with helpful jobs for running app and tests locallyThe text was updated successfully, but these errors were encountered: