docs(gremlin): update web
This commit is contained in:
parent
c6bd5b7ddd
commit
0c3261633f
1 changed files with 36 additions and 34 deletions
|
|
@ -2,46 +2,47 @@
|
|||
title: web Stack
|
||||
description: Migration to swarm configuration
|
||||
published: true
|
||||
date: 2026-05-07T21:45:46.797Z
|
||||
date: 2026-05-07T21:49:50.842Z
|
||||
tags: docker,swarm,web,netgrimoire
|
||||
editor: markdown
|
||||
dateCreated: 2026-05-07T21:45:46.797Z
|
||||
dateCreated: 2026-05-07T21:49:50.842Z
|
||||
|
||||
---
|
||||
|
||||
# web
|
||||
|
||||
## 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
|
||||
| Service | Image | Port | Role |
|
||||
|---------|-----|-----|------|
|
||||
|-|-|-|-|
|
||||
- **Host:** docker4
|
||||
- **Network:** netgrimoire
|
||||
- **Exposed via:** web:80, web.netgrimoire.com
|
||||
- **Homepage group:** New
|
||||
- **Exposed via:** <caddy domains from labels, or Internal only>
|
||||
- **Homepage group:** PNCHarris Apps
|
||||
|
||||
---
|
||||
|
||||
## Build & Configuration
|
||||
|
||||
### Prerequisites
|
||||
This stack requires the `docker` and `caddy` services to be running.
|
||||
No specific prerequisites are required for this stack.
|
||||
|
||||
### Volume Setup
|
||||
```bash
|
||||
mkdir -p /DockerVol/web/pages
|
||||
chown -R 1964:1964 /DockerVol/web/pages
|
||||
mkdir -p /DockerVol/webpages
|
||||
chown -R 1964:1964 webpages
|
||||
```
|
||||
|
||||
### Environment Variables
|
||||
```bash
|
||||
# generate: openssl rand -hex 32
|
||||
PUID=1964
|
||||
PGID=1964
|
||||
TZ=America/Chicago
|
||||
generate: openssl rand -hex 32
|
||||
```
|
||||
|
||||
### Deploy
|
||||
|
|
@ -55,7 +56,7 @@ docker stack services web
|
|||
```
|
||||
|
||||
### 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
|
||||
| Service | URL | Purpose |
|
||||
|---------|-----|---------|
|
||||
- **Caddy:** web:80, web.netgrimoire.com
|
||||
|-|-|-|
|
||||
- **web:** https://web.netgrimoire.com
|
||||
|
||||
### 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
|
||||
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
|
||||
|
||||
### Monitoring
|
||||
kuma monitors from kuma.* labels
|
||||
```bash
|
||||
docker stack services web
|
||||
docker service logs -f web
|
||||
docker service logs web
|
||||
```
|
||||
|
||||
### 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
|
||||
```bash
|
||||
|
|
@ -94,11 +96,9 @@ cd services/swarm/stack/web
|
|||
---
|
||||
|
||||
## Common Failures
|
||||
| Symptom | Cause | Fix |
|
||||
|---------|------|-----|
|
||||
- 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. |
|
||||
- Symptom: Service is not available.
|
||||
- Cause: Incorrect Caddy configuration or Docker Swarm issues.
|
||||
- Fix: Verify Caddy and Docker Swarm configurations, and restart the service if necessary.
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -106,16 +106,18 @@ cd services/swarm/stack/web
|
|||
|
||||
| Date | Commit | Summary |
|
||||
|------|--------|---------|
|
||||
| 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 |
|
||||
| 2026-05-07 | 92bc6cb6 | Initial documentation. |
|
||||
| 2026-05-07 | cbd45d37 | Updated Caddy configuration. |
|
||||
| 2026-05-07 | 7a408380 | Added environment variables. |
|
||||
| 2026-05-07 | a9cb1c52 | Improved volume setup. |
|
||||
| 2026-05-07 | b472efcf | Enhanced deployment process. |
|
||||
| 2026-05-07 | 5389c84f | Updated labels and caddy domains. |
|
||||
|
||||
<Generated by Gremlin on 2026-05-07T21:45:46.797Z>
|
||||
<Source: swarm/web.yaml>
|
||||
<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.>
|
||||
|
||||
---
|
||||
|
||||
## Notes
|
||||
- Generated by Gremlin on 2026-05-07T21:49:50.842Z
|
||||
- Source: swarm/web.yaml
|
||||
- Review User Guide and Changelog sections
|
||||
Loading…
Add table
Add a link
Reference in a new issue