This docker-compose setup provides the infrastructure that copilot-bridge connects to:
| Service | Purpose |
|---|---|
| PostgreSQL 16 | Mattermost database |
| Mattermost 11.4 | Team chat platform |
| Cloudflare Tunnel | (Optional) Public HTTPS access without port forwarding |
The bridge itself runs on the host — it connects to Mattermost via the configured URL.
# 1. Configure
cp .env.example .env
# Edit .env — at minimum, set POSTGRES_PASSWORD
# 2. Start
docker compose up -d
# 3. Set up Mattermost
# Open http://localhost:${MATTERMOST_PORT:-8065}, create an admin account,
# then create a bot: System Console → Integrations → Bot Accounts
# 4. Configure copilot-bridge
copilot-bridge init
# Enter http://localhost:${MATTERMOST_PORT:-8065} as the Mattermost URLIf you want public HTTPS access (e.g., for mobile or remote use):
- Create a tunnel at Cloudflare Zero Trust → Networks → Tunnels
- Configure the tunnel to route your domain to
http://mattermost:8065 - Add your tunnel token to
.env - Set
MM_SITEURLto your public domain (e.g.,https://chat.example.com) - Start with the tunnel profile:
docker compose --profile tunnel up -dAll data is stored in Docker named volumes:
postgres-data— databasemattermost-config— server configurationmattermost-data— uploaded filesmattermost-logs— server logsmattermost-plugins— installed pluginsmattermost-client-plugins— client plugins
To back up, use docker compose down then back up the volumes. To reset everything: docker compose down -v.