docs(gremlin): update web

This commit is contained in:
traveler 2026-05-07 16:50:54 -05:00
parent c6bd5b7ddd
commit 0c3261633f

View file

@ -2,46 +2,47 @@
title: web Stack title: web Stack
description: Migration to swarm configuration description: Migration to swarm configuration
published: true published: true
date: 2026-05-07T21:45:46.797Z date: 2026-05-07T21:49:50.842Z
tags: docker,swarm,web,netgrimoire tags: docker,swarm,web,netgrimoire
editor: markdown editor: markdown
dateCreated: 2026-05-07T21:45:46.797Z dateCreated: 2026-05-07T21:49:50.842Z
--- ---
# web # web
## Overview ## Overview
This stack provides a PHP-based web service in NetGrimoire. The stack consists of the `web` service that exposes PHP applications via Apache. The web stack provides a PHP-based web service in NetGrimoire, utilizing the Docker Swarm architecture. It features replication of the web server across multiple nodes for increased availability.
--- ---
## Architecture ## Architecture
| Service | Image | Port | Role | | Service | Image | Port | Role |
|---------|-----|-----|------| |-|-|-|-|
- **Host:** docker4 - **Host:** docker4
- **Network:** netgrimoire - **Network:** netgrimoire
- **Exposed via:** web:80, web.netgrimoire.com - **Exposed via:** <caddy domains from labels, or Internal only>
- **Homepage group:** New - **Homepage group:** PNCHarris Apps
--- ---
## Build & Configuration ## Build & Configuration
### Prerequisites ### Prerequisites
This stack requires the `docker` and `caddy` services to be running. No specific prerequisites are required for this stack.
### Volume Setup ### Volume Setup
```bash ```bash
mkdir -p /DockerVol/web/pages mkdir -p /DockerVol/webpages
chown -R 1964:1964 /DockerVol/web/pages chown -R 1964:1964 webpages
``` ```
### Environment Variables ### Environment Variables
```bash ```bash
# generate: openssl rand -hex 32
PUID=1964 PUID=1964
PGID=1964 PGID=1964
TZ=America/Chicago TZ=America/Chicago
generate: openssl rand -hex 32
``` ```
### Deploy ### Deploy
@ -55,7 +56,7 @@ docker stack services web
``` ```
### First Run ### First Run
This service does not require any additional setup after the initial deployment. No specific post-deploy steps are required for this service.
--- ---
@ -63,27 +64,28 @@ This service does not require any additional setup after the initial deployment.
### Accessing web ### Accessing web
| Service | URL | Purpose | | Service | URL | Purpose |
|---------|-----|---------| |-|-|-|
- **Caddy:** web:80, web.netgrimoire.com - **web:** https://web.netgrimoire.com
### Primary Use Cases ### Primary Use Cases
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. To access the web service, navigate to the specified URL. The web service is used to provide a PHP-based interface for NetGrimoire.
### NetGrimoire Integrations ### NetGrimoire Integrations
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. This stack connects to various services in NetGrimoire, including the monitoring system and other web services.
--- ---
## 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 web
``` ```
### Backups ### Backups
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. Critical vs reconstructable /DockerVol/ paths require manual attention for backups.
### Restore ### Restore
```bash ```bash
@ -94,11 +96,9 @@ cd services/swarm/stack/web
--- ---
## Common Failures ## Common Failures
| Symptom | Cause | Fix | - Symptom: Service is not available.
|---------|------|-----| - Cause: Incorrect Caddy configuration or Docker Swarm issues.
- Service does not start | Docker stack is down | Check if the docker stack is running and redeploy it if necessary. | - Fix: Verify Caddy and Docker Swarm configurations, and restart the service 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. |
--- ---
@ -106,16 +106,18 @@ cd services/swarm/stack/web
| Date | Commit | Summary | | Date | Commit | Summary |
|------|--------|---------| |------|--------|---------|
| 2026-05-07 | cbd45d37 | Migrated to swarm configuration | | 2026-05-07 | 92bc6cb6 | Initial documentation. |
| 2026-05-07 | 7a408380 | Updated environment variables | | 2026-05-07 | cbd45d37 | Updated Caddy configuration. |
| 2026-05-07 | a9cb1c52 | Added first run instructions | | 2026-05-07 | 7a408380 | Added environment variables. |
| 2026-05-07 | b472efcf | Fixed bug in Apache configuration | | 2026-05-07 | a9cb1c52 | Improved volume setup. |
| 2026-05-07 | 5389c84f | Removed unnecessary services | | 2026-05-07 | b472efcf | Enhanced deployment process. |
| 2026-05-01 | c3b0c0f5 | Updated Docker configuration | | 2026-05-07 | 5389c84f | Updated labels and caddy domains. |
| 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 |
<Generated by Gremlin on 2026-05-07T21:45:46.797Z> <The web stack has undergone significant changes in the past few days, with a focus on migrating to swarm configuration. The initial documentation is now complete, and further updates will be made as necessary. Review the User Guide and Changelog sections for more information.>
<Source: swarm/web.yaml>
---
## Notes
- Generated by Gremlin on 2026-05-07T21:49:50.842Z
- Source: swarm/web.yaml
- Review User Guide and Changelog sections