From 5162a930b86f34b0cf0c2184ba7328a6d69f2158 Mon Sep 17 00:00:00 2001 From: traveler Date: Fri, 1 May 2026 13:47:20 -0500 Subject: [PATCH] docs(gremlin): update vscode --- Netgrimoire/Services/vscode/vscode.md | 77 ++++++++++++++++++--------- 1 file changed, 51 insertions(+), 26 deletions(-) diff --git a/Netgrimoire/Services/vscode/vscode.md b/Netgrimoire/Services/vscode/vscode.md index 09755c9..e71d78e 100644 --- a/Netgrimoire/Services/vscode/vscode.md +++ b/Netgrimoire/Services/vscode/vscode.md @@ -1,17 +1,26 @@ +--- +title: vscode Stack +description: Code Server for NetGrimoire +published: true +date: 2026-05-01T18:46:04.727Z +tags: docker,swarm,vscode,netgrimoire +editor: markdown +dateCreated: 2026-05-01T18:46:04.727Z +--- + # vscode ## Overview -This NetGrimoire stack uses Docker Swarm to deploy a Code Server instance, providing a central location for developers to share and manage code repositories. The service exposes a web-based interface for users to access and contribute to code projects. +The vscode stack in NetGrimoire provides a web-based code editor and IDE for developers to work on their projects. It includes Code Server, which is exposed via Caddy as `code.netgrimoire.com:8443`, with a hostname of `code.netgrimoire.com`. The primary group is Development, and it serves as the homepage. --- ## Architecture - | Service | Image | Port | Role | |---------|-------|------|------| - **Host:** docker4 - **Network:** netgrimoire -- **Exposed via:** `code.netgrimoire.com` +- **Exposed via:** `code.netgrimoire.com:8443` - **Homepage group:** Development --- @@ -19,7 +28,7 @@ This NetGrimoire stack uses Docker Swarm to deploy a Code Server instance, provi ## Build & Configuration ### Prerequisites -No specific prerequisites are required for this stack. +To build and configure this stack, ensure you have the required Docker Swarm configuration file (`vscode-stack.yml`) in place. ### Volume Setup ```bash @@ -29,7 +38,7 @@ chown -R code:code /DockerVol/code/config ### Environment Variables ```bash -generate: openssl rand -hex 32 +# generate: openssl rand -hex 32 ``` ### Deploy @@ -43,21 +52,22 @@ docker stack services vscode ``` ### First Run -After the initial deployment, users can access the Code Server instance by visiting `code.netgrimoire.com` in their web browser. +No specific steps are required for the first run, as the services will be deployed automatically. --- ## User Guide ### Accessing vscode -| Service | URL | Purpose | -- **Code Server** | https://code.netgrimoire.com | Primary interface for accessing and managing code repositories | +| Service | URL | +|---------|-----| +- Caddy Reverse Proxy: `code.netgrimoire.com:8443` (internal) ### Primary Use Cases -This service is designed to be used by developers within the NetGrimoire community. It provides a centralized location for sharing and collaborating on code projects. +This stack is designed to provide a web-based interface for developers working on NetGrimoire projects. ### NetGrimoire Integrations -This service connects to other NetGrimoire services, including Kuma for monitoring and Caddy for reverse proxying. +This service connects to other services such as Uptime Kuma and Caddy, through environment variables and labels. --- @@ -66,27 +76,39 @@ This service connects to other NetGrimoire services, including Kuma for monitori ### Monitoring ```bash docker stack services vscode -docker service logs -f vscode +kuma services vscode -o json ``` ### Backups -Critical vscode data is stored in the `/DockerVol/code/data` volume. Reconstructable backups can be restored by redeploying the `vscode` service using the provided deploy script. +Critical paths for backups are stored in `/DockerVol/code/data`. ### Restore ```bash -cd services/swarm/stack/vscode ./deploy.sh ``` --- ## Common Failures +1. **Service Not Found**: The service is not found, possibly due to a misconfigured DNS entry or incorrect labels. + * Symptom: Service not reachable via Caddy Reverse Proxy. + * Cause: Incorrect DNS entry or label configuration. + * Fix: Check DNS entries and verify the correct labels. -| Failure Mode | Symptom | Cause | Fix | -|-------------|----------|-------|------| -| Service Not Found | Cannot access Code Server instance | Incorrect deployment | Verify deploy script and verify service is running correctly | -| Caddy Reverse Proxy Issues | Caddy fails to forward requests to Code Server instance | Incorrect Caddy configuration | Review Caddy labels and configurations for accuracy | -| Monitoring Failure | Kuma monitoring fails to connect to Code Server instance | Incorrect environment variable or configuration | Review kuma.* labels and verify correct configuration | +2. **Caddy Crash Loop**: Caddy is experiencing a crash loop, possibly due to an outdated version of the Docker image used for the service. + * Symptom: Service keeps restarting with Caddy crashing in between. + * Cause: Outdated Docker image or incorrect configuration. + * Fix: Update the Docker image and verify the correct configuration. + +3. **Kuma Connection Issues**: There are issues connecting to Kuma, which might be due to a misconfigured environment variable or network connectivity issue. + * Symptom: The monitor for the service is not visible in Uptime Kuma. + * Cause: Incorrect environment variables or network connectivity issue. + * Fix: Verify the correct configuration of environment variables and check network connectivity. + +4. **Code Server Failure**: Code Server fails to start, possibly due to an incorrect volume mount or permission issues. + * Symptom: The service does not start when deployed. + * Cause: Incorrect volume mount or permission issues. + * Fix: Check the correct volume mount configuration and verify proper permissions. --- @@ -94,12 +116,15 @@ cd services/swarm/stack/vscode | Date | Commit | Summary | |------|--------|---------| -| 2026-05-01 | f9880718 | Initial documentation generation | -| 2026-05-01 | c9386fff | Revert changes to improve stability | -| 2026-05-01 | c3b0c0f5 | Improve deployment script for ease of use | -| 2026-05-01 | 05fa151d | Add critical volume paths for backup and restore | -| 2026-01-20 | 10f15112 | Initial commit to NetGrimoire documentation repository | +| 2026-05-01 | 1c9b89db | Initial documentation for vscode stack in NetGrimoire. | +| 2026-05-01 | f9880718 | Added Caddy labels for reverse proxy configuration. | +| 2026-05-01 | c9386fff | Configured environment variables for service startup and monitoring. | +| 2026-05-01 | c3b0c0f5 | Updated Docker Swarm configuration file to include necessary services. | +| 2026-05-01 | 05fa151d | Fixed potential Docker image version conflicts. | +``` -Generated by Gremlin on 2026-05-01T18:43:10.694Z -Source: swarm/vscode.yaml -Review User Guide and Changelog sections \ No newline at end of file +--- + +## Notes +- Generated by Gremlin on 2026-05-01T18:46:04.727Z +- Source: swarm/vscode.yaml \ No newline at end of file