-
Notifications
You must be signed in to change notification settings - Fork 11.6k
Noticed Docker steps not present #35547
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
Comments
The 1st message is for the docker-compose-local.yml file I noticed that the current documentation does not specify what to run and how to set up the project for local contributions. **This docker-compose-local.yml is created for local development and testing. 1st) We have to create a new .env file(environment file needed for environment variable) on the root directory of this project. Means where yours docker-compose-local.yml file is located. Just like this:
2nd) Then after creating the .env file put the environment variable and their default values in the .env file just like this: **1st env variable will be MONGO_URL and here is an example value,should be put for Mongo-DB connection in the .env file MONGO_URL= mongodb://mongo:27017/rocketchat **2nd env variable will be TRANSPORTER and will be used for NATS connection (It's for lightweight high-performance messaging system) TRANSPORTER=nats://localhost:4222 4222 is default port used by NATS. ****3rd and last env variable will be RC_DOCKERFILE used for specify the Dockerfile that should be utilized for building the service container of the Rocket.Chat. RC_DOCKERFILE=Dockerfile Also the project uses two types of Dockerfiles for different environments (Cl and local), so this env variable will provide flexibility by allowing the contributors to switch between these two environments very easily by only a simple modification in .env file. Now the env file part is done. But 1st ensure, 1)Docker is installed and running on your machine. 2)Docker Compose is installed (if not already bundled with Docker). 3)The .env file (containing environment variables) is present and properly configured in the same directory as the docker-compose-local.yml file. Now in the terminal of the directory of the docker-compose-local.yml run this code: docker-compose -f docker-compose-local.yml up It will be very much helpful because after running this code the .env file we created before will automatically load those environment variable that wroted on the ,env file. It will also compose & reads the docker-compose-local.yml file. Once the command starts running: 1)Now verify the setup:
run this in the same terminal, to see the environment variable are fully loaded or not. 2)If getting common troubleshooting errors : (i)Check for the logs docker-compose logs [service_name] run this code also in terminal (ii)Verify Environment Variables: Ensure all required variables are set in the .env file. (iii)Port Conflicts: Verify that the ports defined in the docker-compose-local.yml file are not already in use. 3)If you're done and want to stop the services: docker-compose -f docker-compose-local.yml down run this code also in terminal. Now I believe it's enough for the docker-compose-local.yml file. @NalinDalal If you want I can also do all these stuff and give you the PR. |
Hi @NalinDalal, I am interested in this issue and would like to work on it. After conducting some initial research, I've outlined my findings and proposed updates to the documentation regarding local development using Docker Compose. Current Documentation GapThe existing documentation covers deployment with Docker Compose, but it doesn't specifically address how to use Proposed Documentation UpdatesI plan to add a new section to the developer documentation titled "Setting Up Local Development Environment with Docker Compose" that will include: Docker Compose Files Explanation:
Detailed Setup Instructions:
Alignment with Project StandardsFollowing the documentation guidelines outlined in our CONTRIBUTING.md, I've ensured:
Build Process ValidationPer your previous recommendations on environment isolation, I've:
I will be updating the documentation with these instructions and submitting a PR soon. Would this approach address the issue effectively? I'm open to any guidance or specific requirements for this documentation update. Thank you! Best regards, |
I saw there were 2 files for docker-compose but what to run and how to run for local contributions and how is not mentioned in docs, can implement this in documentation and improve it
The text was updated successfully, but these errors were encountered: