single snapshot test

This commit is contained in:
Thea Kindinger
2026-04-08 18:42:05 -04:00
commit a272d6709f
1502 changed files with 601058 additions and 0 deletions

51
docs/INSTALL.md Normal file
View File

@@ -0,0 +1,51 @@
# Install
## Local runtime
```bash
cd /opt
unzip /path/to/mailcow-plugin-runtime-v0.2.0.zip
cd mailcow-plugin-runtime-v0.2.0
cp .env.example .env
npm install
npm run build
node dist/server.js
```
## Docker
```bash
docker compose up -d --build
```
## Test
```bash
curl http://127.0.0.1:4110/health
curl http://127.0.0.1:4110/plugins-runtime/api/runtime/plugins
curl http://127.0.0.1:4110/plugins-runtime/api/runtime/hooks
```
## Mailcow nginx integration
Add a proxy block similar to:
```nginx
location /plugins-runtime/ {
proxy_pass http://mailcow-plugin-runtime:4110/plugins-runtime/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
```
Inject the bootstrap script into your Mailcow UI shell:
```html
<script src="/plugins-runtime/runtime/bootstrap.js"></script>
```
Recommended hook anchors in Mailcow markup:
```html
<div data-mailcow-plugin-hook="mail.compose.toolbar"></div>
<div data-mailcow-plugin-hook="mail.compose.attachments"></div>
```