1 Commits

Author SHA1 Message Date
sol
a766419277 policies: add standard docs policy files
- Add .editorconfig, .prettierrc, .prettierignore, .gitignore
- Add Makefile with fmt, fmt-check, secret-scan targets
- Add package.json with prettier
- Add tools/secret-scan.sh
- Auto-format with prettier
- make check passes clean
2026-03-01 07:31:42 +00:00
9 changed files with 69 additions and 60 deletions

View File

@@ -1,5 +0,0 @@
.git
node_modules
coverage
*.md
!README.md

View File

@@ -2,14 +2,8 @@ root = true
[*]
indent_style = space
indent_size = 4
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
[Makefile]
indent_style = tab

9
.gitignore vendored
View File

@@ -1,10 +1 @@
node_modules/
coverage/
dist/
.env
.env.*
!.env.example
*.log
.DS_Store
*.swp
*~

View File

@@ -1,4 +1,3 @@
node_modules
*.min.js
coverage
dist
node_modules/
*.sh
package-lock.json

View File

@@ -1,6 +1,6 @@
{
"singleQuote": true,
"trailingComma": "all",
"tabWidth": 4,
"proseWrap": "always"
"singleQuote": true,
"trailingComma": "all",
"printWidth": 100,
"tabWidth": 2
}

View File

@@ -1,28 +1,17 @@
.PHONY: check test lint fmt fmt-check secret-scan
export NODE_ENV := development
check: lint fmt-check secret-scan test
.PHONY: check install fmt fmt-check secret-scan
test:
@echo "Running tests..."
@if [ -d tests ] && ls tests/test-*.sh >/dev/null 2>&1; then \
for t in tests/test-*.sh; do echo " $$t"; bash "$$t"; done; \
else \
echo " No tests found"; \
fi
check: install fmt-check secret-scan
lint:
@echo "Linting..."
@if command -v shellcheck >/dev/null 2>&1; then \
find . -name '*.sh' -not -path './.git/*' -not -path './node_modules/*' -exec shellcheck {} +; \
else \
echo " shellcheck not installed, skipping"; \
fi
install:
npm install
fmt:
@echo "No formatter configured for shell scripts"
npx prettier --write .
fmt-check:
@echo "No format check for shell scripts"
npx prettier --check .
secret-scan:
bash tools/secret-scan.sh .

View File

@@ -12,13 +12,13 @@ One-command deployment of **Mattermost Team Edition** on Ubuntu/Debian, pre-conf
## Prerequisites
| Requirement | Details |
|---|---|
| **OS** | Ubuntu 20.04+ / Debian 11+ |
| **Access** | Root (sudo) |
| **Ports** | 80 and 443 open to the internet |
| **DNS** | A record pointing your domain to this server's IP |
| **RAM** | 2 GB minimum (4 GB recommended) |
| Requirement | Details |
| ----------- | ------------------------------------------------- |
| **OS** | Ubuntu 20.04+ / Debian 11+ |
| **Access** | Root (sudo) |
| **Ports** | 80 and 443 open to the internet |
| **DNS** | A record pointing your domain to this server's IP |
| **RAM** | 2 GB minimum (4 GB recommended) |
## Quick Start
@@ -32,6 +32,7 @@ sudo bash install.sh
```
The wizard will ask you for:
1. **Domain name** (e.g. `chat.example.com`)
2. **Email** (for Let's Encrypt SSL)
3. **Port** (default: 8000)
@@ -81,12 +82,12 @@ docker compose ps
## Troubleshooting
| Issue | Fix |
|---|---|
| SSL cert failed | Verify DNS A record points to this server; check ports 80/443 are open |
| Container won't start | Check logs: `docker compose logs mattermost` |
| 502 Bad Gateway | Container may still be booting — wait 30s and refresh |
| Permission denied | Run installer with `sudo` |
| Issue | Fix |
| --------------------- | ---------------------------------------------------------------------- |
| SSL cert failed | Verify DNS A record points to this server; check ports 80/443 are open |
| Container won't start | Check logs: `docker compose logs mattermost` |
| 502 Bad Gateway | Container may still be booting — wait 30s and refresh |
| Permission denied | Run installer with `sudo` |
## License

31
package-lock.json generated Normal file
View File

@@ -0,0 +1,31 @@
{
"name": "openclaw-mattermost",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "openclaw-mattermost",
"version": "1.0.0",
"devDependencies": {
"prettier": "^3.2.0"
}
},
"node_modules/prettier": {
"version": "3.8.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.8.1.tgz",
"integrity": "sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg==",
"dev": true,
"license": "MIT",
"bin": {
"prettier": "bin/prettier.cjs"
},
"engines": {
"node": ">=14"
},
"funding": {
"url": "https://github.com/prettier/prettier?sponsor=1"
}
}
}
}

9
package.json Normal file
View File

@@ -0,0 +1,9 @@
{
"name": "openclaw-mattermost",
"version": "1.0.0",
"private": true,
"description": "OpenClaw Mattermost Integration",
"devDependencies": {
"prettier": "^3.2.0"
}
}