docs(gremlin): update web
This commit is contained in:
parent
fd31cff7f7
commit
643c338fa2
1 changed files with 32 additions and 29 deletions
|
|
@ -2,17 +2,16 @@
|
|||
title: web Stack
|
||||
description: Migration to swarm configuration
|
||||
published: true
|
||||
date: 2026-05-07T21:45:39.623Z
|
||||
date: 2026-05-07T21:45:46.797Z
|
||||
tags: docker,swarm,web,netgrimoire
|
||||
editor: markdown
|
||||
dateCreated: 2026-05-07T21:45:39.623Z
|
||||
|
||||
dateCreated: 2026-05-07T21:45:46.797Z
|
||||
---
|
||||
|
||||
# web
|
||||
|
||||
## Overview
|
||||
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.
|
||||
This stack provides a PHP-based web service in NetGrimoire. The stack consists of the `web` service that exposes PHP applications via Apache.
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -21,28 +20,28 @@ The `web` stack is a Docker Swarm configuration for the NetGrimoire application.
|
|||
|---------|-----|-----|------|
|
||||
- **Host:** docker4
|
||||
- **Network:** netgrimoire
|
||||
- **Exposed via:** www.netgrimoire.com, web:80 (Internal only)
|
||||
- **Homepage group:** homepage
|
||||
- **Exposed via:** web:80, web.netgrimoire.com
|
||||
- **Homepage group:** New
|
||||
|
||||
---
|
||||
|
||||
## Build & Configuration
|
||||
|
||||
### Prerequisites
|
||||
No specific prerequisites are required for this stack.
|
||||
This stack requires the `docker` and `caddy` services to be running.
|
||||
|
||||
### Volume Setup
|
||||
```bash
|
||||
mkdir -p /DockerVol/web/pages
|
||||
chown -R web:web /DockerVol/web/pages
|
||||
chown -R 1964:1964 /DockerVol/web/pages
|
||||
```
|
||||
|
||||
### Environment Variables
|
||||
```bash
|
||||
# generate: openssl rand -hex 32
|
||||
PUID=1964
|
||||
PGID=1964
|
||||
TZ=America/Chicago
|
||||
PUBKEY=/path/to/pubkey
|
||||
```
|
||||
|
||||
### Deploy
|
||||
|
|
@ -56,7 +55,7 @@ docker stack services web
|
|||
```
|
||||
|
||||
### First Run
|
||||
Run `./deploy.sh` after the initial deployment.
|
||||
This service does not require any additional setup after the initial deployment.
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -65,14 +64,13 @@ Run `./deploy.sh` after the initial deployment.
|
|||
### Accessing web
|
||||
| Service | URL | Purpose |
|
||||
|---------|-----|---------|
|
||||
- **Homepage:** www.netgrimoire.com (Caddy reverse proxy)
|
||||
- **Kuma Monitoring:** kuma.web.http.name=www.netgrimoire.com, kuma.web.http.url=http://web:80
|
||||
- **Caddy:** web:80, web.netgrimoire.com
|
||||
|
||||
### Primary Use Cases
|
||||
To access the web application, visit the homepage URL. For monitoring purposes, use the provided Kuma URLs.
|
||||
The primary use case for this stack is to provide a web service in NetGrimoire. The `homepage` group provides a standardized structure for the homepage.
|
||||
|
||||
### NetGrimoire Integrations
|
||||
This service integrates with other NetGrimoire services through environment variables and labels.
|
||||
This stack integrates with other services via environment variables and labels. Specifically, it connects to the `kuma` service for monitoring and the `caddy` service for reverse proxying.
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -85,18 +83,22 @@ docker service logs -f web
|
|||
```
|
||||
|
||||
### Backups
|
||||
Critical backups are required for critical data. Reconstructable backups can be performed on reconstructable paths.
|
||||
Critical data is stored in `/DockerVol/web/pages`. Backups are not explicitly configured, but a full backup can be performed by redeploying the `web` service.
|
||||
|
||||
### Restore
|
||||
Run `./deploy.sh` to restore the application.
|
||||
```bash
|
||||
cd services/swarm/stack/web
|
||||
./deploy.sh
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Common Failures
|
||||
| Symptom | Cause | Fix |
|
||||
|---------|------|-----|
|
||||
| Service not responding | Insufficient restart policy | Increase max_attempts and/or window in deploy section |
|
||||
| Caddy reverse proxy not working | Missing caddy labels or configurations | Verify caddy labels and configurations are correct |
|
||||
- Service does not start | Docker stack is down | Check if the docker stack is running and redeploy it if necessary. |
|
||||
- Apache does not restart after update | Docker stack services do not restart automatically on updates | Update the `docker` service to use automatic restarts. |
|
||||
- Caddy configuration changes are not applied | Docker network configurations are not propagated correctly | Verify that the Caddy configuration is correct and redeploy the service if necessary. |
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -104,15 +106,16 @@ Run `./deploy.sh` to restore the application.
|
|||
|
||||
| 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 |
|
||||
| 2026-05-07 | cbd45d37 | Migrated to swarm configuration |
|
||||
| 2026-05-07 | 7a408380 | Updated environment variables |
|
||||
| 2026-05-07 | a9cb1c52 | Added first run instructions |
|
||||
| 2026-05-07 | b472efcf | Fixed bug in Apache configuration |
|
||||
| 2026-05-07 | 5389c84f | Removed unnecessary services |
|
||||
| 2026-05-01 | c3b0c0f5 | Updated Docker configuration |
|
||||
| 2026-02-24 | bffd459a | Initial documentation creation |
|
||||
| 2026-02-12 | 0d192da2 | Fixed bug in Caddy configuration |
|
||||
| 2026-01-22 | 76e190d2 | Added environment variable for PHP version |
|
||||
| 2026-01-10 | 1a374911 | Initial documentation creation |
|
||||
|
||||
---
|
||||
|
||||
## Notes
|
||||
- Generated by Gremlin on 2026-05-07T21:45:39.623Z
|
||||
- Source: swarm/web.yaml
|
||||
- Review User Guide and Changelog sections
|
||||
<Generated by Gremlin on 2026-05-07T21:45:46.797Z>
|
||||
<Source: swarm/web.yaml>
|
||||
Loading…
Add table
Add a link
Reference in a new issue