204 lines
5.7 KiB
Markdown
204 lines
5.7 KiB
Markdown
# Mattermost
|
|
|
|
**🟡 Communication Service**
|
|
|
|
## 📋 Service Overview
|
|
|
|
| Property | Value |
|
|
|----------|-------|
|
|
| **Service Name** | mattermost |
|
|
| **Host** | homelab_vm |
|
|
| **Category** | Communication |
|
|
| **Difficulty** | 🟡 |
|
|
| **Docker Image** | `mattermost/mattermost-team-edition:latest` |
|
|
| **Compose File** | `homelab_vm/mattermost.yml` |
|
|
| **Directory** | `homelab_vm` |
|
|
|
|
## 🎯 Purpose
|
|
|
|
Mattermost is an open-source, self-hostable online chat service with file sharing, search, and integrations.
|
|
|
|
## 🚀 Quick Start
|
|
|
|
### Prerequisites
|
|
- Docker and Docker Compose installed
|
|
- Basic understanding of REDACTED_APP_PASSWORD
|
|
- Access to the host system (homelab_vm)
|
|
|
|
### Deployment
|
|
```bash
|
|
# Navigate to service directory
|
|
cd homelab_vm
|
|
|
|
# Start the service
|
|
docker-compose up -d
|
|
|
|
# Check service status
|
|
docker-compose ps
|
|
|
|
# View logs
|
|
docker-compose logs -f mattermost
|
|
```
|
|
|
|
## 🔧 Configuration
|
|
|
|
### Docker Compose Configuration
|
|
```yaml
|
|
container_name: mattermost
|
|
depends_on:
|
|
mattermost-db:
|
|
condition: service_healthy
|
|
environment:
|
|
MM_BLEVESETTINGS_INDEXDIR: /mattermost/bleve-indexes
|
|
MM_SERVICESETTINGS_SITEURL: https://mm.crista.love
|
|
MM_SQLSETTINGS_DATASOURCE: postgres://mattermostuser:changeME-strong@mattermost-db:5432/mattermost?sslmode=disable&connect_timeout=10
|
|
MM_SQLSETTINGS_DRIVERNAME: postgres
|
|
TZ: America/Los_Angeles
|
|
hostname: mattermost
|
|
image: mattermost/mattermost-team-edition:latest
|
|
ports:
|
|
- 8065:8065
|
|
restart: unless-stopped
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
user: 0:0
|
|
volumes:
|
|
- /mnt/atlantis_docker/mattermost/config:/mattermost/config:rw
|
|
- /mnt/atlantis_docker/mattermost/data:/mattermost/data:rw
|
|
- /mnt/atlantis_docker/mattermost/logs:/mattermost/logs:rw
|
|
- /mnt/atlantis_docker/mattermost/plugins:/mattermost/plugins:rw
|
|
- /mnt/atlantis_docker/mattermost/client:/mattermost/client/plugins:rw
|
|
- /mnt/atlantis_docker/mattermost/indexes:/mattermost/bleve-indexes:rw
|
|
|
|
```
|
|
|
|
### Environment Variables
|
|
| Variable | Value | Description |
|
|
|----------|-------|-------------|
|
|
| `TZ` | `America/Los_Angeles` | Timezone setting |
|
|
| `MM_SQLSETTINGS_DRIVERNAME` | `postgres` | Configuration variable |
|
|
| `MM_SQLSETTINGS_DATASOURCE` | `postgres://mattermostuser:changeME-strong@mattermost-db:5432/mattermost?sslmode=disable&connect_timeout=10` | Configuration variable |
|
|
| `MM_BLEVESETTINGS_INDEXDIR` | `/mattermost/bleve-indexes` | Configuration variable |
|
|
| `MM_SERVICESETTINGS_SITEURL` | `https://mm.crista.love` | Configuration variable |
|
|
|
|
|
|
### Port Mappings
|
|
| Host Port | Container Port | Protocol | Purpose |
|
|
|-----------|----------------|----------|----------|
|
|
| 8065 | 8065 | TCP | Service port |
|
|
|
|
|
|
### Volume Mappings
|
|
| Host Path | Container Path | Type | Purpose |
|
|
|-----------|----------------|------|----------|
|
|
| `/mnt/atlantis_docker/mattermost/config` | `/mattermost/config` | bind | Configuration files |
|
|
| `/mnt/atlantis_docker/mattermost/data` | `/mattermost/data` | bind | Application data |
|
|
| `/mnt/atlantis_docker/mattermost/logs` | `/mattermost/logs` | bind | Log files |
|
|
| `/mnt/atlantis_docker/mattermost/plugins` | `/mattermost/plugins` | bind | Data storage |
|
|
| `/mnt/atlantis_docker/mattermost/client` | `/mattermost/client/plugins` | bind | Data storage |
|
|
| `/mnt/atlantis_docker/mattermost/indexes` | `/mattermost/bleve-indexes` | bind | Data storage |
|
|
|
|
|
|
## 🌐 Access Information
|
|
|
|
Service ports: 8065:8065
|
|
|
|
## 🔒 Security Considerations
|
|
|
|
- ✅ Security options configured
|
|
- ✅ Non-root user configured
|
|
|
|
## 📊 Resource Requirements
|
|
|
|
No resource limits configured
|
|
|
|
### Recommended Resources
|
|
- **Minimum RAM**: 512MB
|
|
- **Recommended RAM**: 1GB+
|
|
- **CPU**: 1 core minimum
|
|
- **Storage**: Varies by usage
|
|
|
|
### Resource Monitoring
|
|
Monitor resource usage with:
|
|
```bash
|
|
docker stats
|
|
```
|
|
|
|
## 🔍 Health Monitoring
|
|
|
|
⚠️ No health check configured
|
|
Consider adding a health check:
|
|
```yaml
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:PORT/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
```
|
|
|
|
### Manual Health Checks
|
|
```bash
|
|
# Check container health
|
|
docker inspect --format='{{.State.Health.Status}}' CONTAINER_NAME
|
|
|
|
# View health check logs
|
|
docker inspect --format='{{range .State.Health.Log}}{{.Output}}{{end}}' CONTAINER_NAME
|
|
```
|
|
|
|
## 🚨 Troubleshooting
|
|
|
|
### Common Issues
|
|
**Service won't start**
|
|
- Check Docker logs: `docker-compose logs service-name`
|
|
- Verify port availability: `netstat -tulpn | grep PORT`
|
|
- Check file permissions on mounted volumes
|
|
|
|
**Can't access web interface**
|
|
- Verify service is running: `docker-compose ps`
|
|
- Check firewall settings
|
|
- Confirm correct port mapping
|
|
|
|
**Performance issues**
|
|
- Monitor resource usage: `docker stats`
|
|
- Check available disk space: `df -h`
|
|
- Review service logs for errors
|
|
|
|
### Useful Commands
|
|
```bash
|
|
# Check service status
|
|
docker-compose ps
|
|
|
|
# View real-time logs
|
|
docker-compose logs -f mattermost
|
|
|
|
# Restart service
|
|
docker-compose restart mattermost
|
|
|
|
# Update service
|
|
docker-compose pull mattermost
|
|
docker-compose up -d mattermost
|
|
|
|
# Access service shell
|
|
docker-compose exec mattermost /bin/bash
|
|
# or
|
|
docker-compose exec mattermost /bin/sh
|
|
```
|
|
|
|
## 📚 Additional Resources
|
|
|
|
- **Official Documentation**: Check the official docs for mattermost
|
|
- **Docker Hub**: [mattermost/mattermost-team-edition:latest](https://hub.docker.com/r/mattermost/mattermost-team-edition:latest)
|
|
- **Community Forums**: Search for community discussions and solutions
|
|
- **GitHub Issues**: Check the project's GitHub for known issues
|
|
|
|
## 🔗 Related Services
|
|
|
|
Other services in the communication category on homelab_vm
|
|
|
|
---
|
|
|
|
*This documentation is auto-generated from the Docker Compose configuration. For the most up-to-date information, refer to the official documentation and the actual compose file.*
|
|
|
|
**Last Updated**: 2025-11-17
|
|
**Configuration Source**: `homelab_vm/mattermost.yml`
|