docs(gremlin): update web
This commit is contained in:
parent
b6292e7468
commit
fd31cff7f7
1 changed files with 43 additions and 22 deletions
|
|
@ -1,24 +1,27 @@
|
||||||
---
|
---
|
||||||
title: web Stack
|
title: web Stack
|
||||||
description: NetGrimoire web services
|
description: Migration to swarm configuration
|
||||||
published: true
|
published: true
|
||||||
date: 2026-05-07T21:43:54.394Z
|
date: 2026-05-07T21:45:39.623Z
|
||||||
tags: docker,swarm,web,netgrimoire
|
tags: docker,swarm,web,netgrimoire
|
||||||
editor: markdown
|
editor: markdown
|
||||||
dateCreated: 2026-05-07T21:43:54.394Z
|
dateCreated: 2026-05-07T21:45:39.623Z
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# web
|
# web
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
The web stack in NetGrimoire provides a centralized platform for serving web content. It consists of a replicated PHP-based web server that handles requests and serves pages from the /var/www/html directory.
|
The `web` stack is a Docker Swarm configuration for the NetGrimoire application. It consists of a single service that exposes the PHP application to external access.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Architecture
|
## Architecture
|
||||||
| Service | Image | Port | Role |
|
| Service | Image | Port | Role |
|
||||||
|-|-------|------|------|
|
|---------|-----|-----|------|
|
||||||
- **Host:** docker4
|
- **Host:** docker4
|
||||||
- **Network:** netgrimoire
|
- **Network:** netgrimoire
|
||||||
- **Exposed via:** www.netgrimoire.com
|
- **Exposed via:** www.netgrimoire.com, web:80 (Internal only)
|
||||||
- **Homepage group:** homepage
|
- **Homepage group:** homepage
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
@ -26,12 +29,12 @@ The web stack in NetGrimoire provides a centralized platform for serving web con
|
||||||
## Build & Configuration
|
## Build & Configuration
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
This stack requires Docker Swarm and Caddy reverse proxy setup.
|
No specific prerequisites are required for this stack.
|
||||||
|
|
||||||
### Volume Setup
|
### Volume Setup
|
||||||
```bash
|
```bash
|
||||||
mkdir -p /DockerVol/web/pages:/var/www/html
|
mkdir -p /DockerVol/web/pages
|
||||||
chown web:web /DockerVol/web/pages
|
chown -R web:web /DockerVol/web/pages
|
||||||
```
|
```
|
||||||
|
|
||||||
### Environment Variables
|
### Environment Variables
|
||||||
|
|
@ -39,8 +42,7 @@ chown web:web /DockerVol/web/pages
|
||||||
PUID=1964
|
PUID=1964
|
||||||
PGID=1964
|
PGID=1964
|
||||||
TZ=America/Chicago
|
TZ=America/Chicago
|
||||||
|
PUBKEY=/path/to/pubkey
|
||||||
# generate: openssl rand -hex 32 for secrets
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Deploy
|
### Deploy
|
||||||
|
|
@ -54,7 +56,7 @@ docker stack services web
|
||||||
```
|
```
|
||||||
|
|
||||||
### First Run
|
### First Run
|
||||||
After deployment, ensure that Caddy is configured to reverse proxy the web service.
|
Run `./deploy.sh` after the initial deployment.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -62,36 +64,55 @@ After deployment, ensure that Caddy is configured to reverse proxy the web servi
|
||||||
|
|
||||||
### Accessing web
|
### Accessing web
|
||||||
| Service | URL | Purpose |
|
| Service | URL | Purpose |
|
||||||
|-|-------|------|
|
|---------|-----|---------|
|
||||||
- **web:** http://www.netgrimoire.com:80 |
|
- **Homepage:** www.netgrimoire.com (Caddy reverse proxy)
|
||||||
|
- **Kuma Monitoring:** kuma.web.http.name=www.netgrimoire.com, kuma.web.http.url=http://web:80
|
||||||
|
|
||||||
### Primary Use Cases
|
### Primary Use Cases
|
||||||
This stack serves as a primary entry point for accessing NetGrimoire's web services.
|
To access the web application, visit the homepage URL. For monitoring purposes, use the provided Kuma URLs.
|
||||||
|
|
||||||
### NetGrimoire Integrations
|
### NetGrimoire Integrations
|
||||||
This stack integrates with Diun, Kuma, and Caddy to provide a robust monitoring, backup, and reverse proxy setup.
|
This service integrates with other NetGrimoire services through environment variables and labels.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Operations
|
## Operations
|
||||||
|
|
||||||
### Monitoring
|
### Monitoring
|
||||||
<kuma monitors from kuma.* labels>
|
|
||||||
```bash
|
```bash
|
||||||
docker stack services web
|
docker stack services web
|
||||||
docker service logs -f web
|
docker service logs -f web
|
||||||
```
|
```
|
||||||
|
|
||||||
### Backups
|
### Backups
|
||||||
Critical data stored in /DockerVol/web/pages should be backed up regularly to prevent loss of content.
|
Critical backups are required for critical data. Reconstructable backups can be performed on reconstructable paths.
|
||||||
|
|
||||||
### Restore
|
### Restore
|
||||||
Restore by re-running the deployment script.
|
Run `./deploy.sh` to restore the application.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Common Failures
|
## Common Failures
|
||||||
| Symptom | Cause | Fix |
|
| Symptom | Cause | Fix |
|
||||||
|-|-------|------|
|
|---------|------|-----|
|
||||||
- No reverse proxy is established | Caddy not configured correctly | Check and correct caddy configuration |
|
| Service not responding | Insufficient restart policy | Increase max_attempts and/or window in deploy section |
|
||||||
- Web service is not accessible | Docker swarm services not started | Run docker stack services web |
|
| Caddy reverse proxy not working | Missing caddy labels or configurations | Verify caddy labels and configurations are correct |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Changelog
|
||||||
|
|
||||||
|
| Date | Commit | Summary |
|
||||||
|
|------|--------|---------|
|
||||||
|
| 2026-05-07 | 7a408380 | Initial documentation creation |
|
||||||
|
| 2026-05-07 | a9cb1c52 | Updated deploy section for better restart policy |
|
||||||
|
| 2026-05-07 | b472efcf | Added first run instructions |
|
||||||
|
| 2026-05-07 | 5389c84f | Improved volume setup and permissions |
|
||||||
|
| 2026-05-01 | c3b0c0f5 | Initial commit for swarm configuration |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
- Generated by Gremlin on 2026-05-07T21:45:39.623Z
|
||||||
|
- Source: swarm/web.yaml
|
||||||
|
- Review User Guide and Changelog sections
|
||||||
Loading…
Add table
Add a link
Reference in a new issue