https://github.com/canepro/rocketchat-local-dev
Local development stack for Rocket.Chat with MongoDB, Redis, Traefik
https://github.com/canepro/rocketchat-local-dev
dev-environment docker-compose mongo redis rocketchat
Last synced: 4 months ago
JSON representation
Local development stack for Rocket.Chat with MongoDB, Redis, Traefik
- Host: GitHub
- URL: https://github.com/canepro/rocketchat-local-dev
- Owner: Canepro
- License: mit
- Created: 2025-08-16T16:16:30.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-08-16T17:09:16.000Z (6 months ago)
- Last Synced: 2025-08-16T19:06:29.869Z (6 months ago)
- Topics: dev-environment, docker-compose, mongo, redis, rocketchat
- Size: 2.93 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rocket.Chat Local Dev Stack

Set up Rocket.Chat locally with MongoDB, Redis, and Traefik in one command.
Works with Docker or Podman. Designed to be beginner‑friendly.
## Prerequisites
- One of:
- Docker Desktop (or Docker Engine with Compose)
- Podman + podman-compose (or Podman with `podman compose`)
- Bash shell (macOS, Linux, or WSL)
Tip for Windows users: run this in WSL for the smoothest experience.
## Get the code
```bash
git clone https://github.com/Canepro/rocketchat-local-dev.git
cd rocketchat-local-dev
```
## Quick start (one command)
```bash
./up.sh
```
What this does:
- Creates `.env` from `.env.example` if it doesn’t exist
- Detects Docker or Podman automatically
- Starts all services
- Waits for MongoDB and initializes the replica set (required by Rocket.Chat)
Open:
- Rocket.Chat: [http://localhost:8080](http://localhost:8080)
- Traefik Dashboard (dev only): [http://localhost:8081](http://localhost:8081)
If you get “permission denied” running scripts, make them executable once:
```bash
chmod +x up.sh down.sh upgrade.sh
```
## Common tasks
- Stop and remove everything:
```bash
./down.sh
```
- Upgrade Rocket.Chat (or other images):
1) Edit `.env` and bump the image tag(s), e.g. `ROCKETCHAT_IMAGE=rocketchat/rocket.chat:7.5.1`
2) Apply the upgrade:
```bash
./upgrade.sh
```
- Change the port (served by Traefik):
```env
TRAEFIK_HTTP_PORT=8080
```
Then restart:
```bash
./down.sh && ./up.sh
```
## How it works (simple overview)
- Traefik reverse‑proxies [http://localhost:8080](http://localhost:8080) → Rocket.Chat on port 3000
- We use Traefik’s file provider (no Docker/Podman socket needed)
- MongoDB runs as a single‑node replica set (Rocket.Chat requirement)
- Redis is used for performance and realtime features
## Best practices (local dev)
- Keep your customizations in `.env` (image tags, ports, project name)
- Prefer `podman compose` on Linux if you’re using Podman; the scripts detect it too
- Avoid mapping container ports publicly beyond what you need (we expose 8080 and 8081 only)
- Use volumes for data (`mongo-data` is persisted) and `./down.sh` to reset cleanly
- For production, do NOT use this stack as-is. Secure Traefik (TLS, auth), harden MongoDB, add backups, etc.
## Logs and troubleshooting
- Service logs:
- Docker: `docker compose logs -f `
- Podman: `podman compose logs -f ` or `podman-compose logs -f `
- Useful services to check: `rocketchat`, `mongo`, `traefik`
- If you previously saw `/var/run/docker.sock` permission errors: fixed. Traefik now uses a file provider.
## File layout
- `docker-compose.yml`: services (Traefik, MongoDB, Redis, Rocket.Chat)
- `traefik/dynamic.yml`: Traefik routing (no engine socket required)
- `up.sh` / `down.sh` / `upgrade.sh`: one‑click start/stop/upgrade scripts
- `.env.example`: defaults you can copy to `.env`
## License
MIT