docs(gremlin): update vscode

This commit is contained in:
traveler 2026-05-01 13:45:16 -05:00
parent 1a2c006965
commit 12c7819825

View file

@ -1,41 +1,38 @@
# vscode
## Overview
This Stack provides a Docker Swarm-based installation of Code Server, a lightweight, self-hosted version control server for Git repositories.
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.
---
## Architecture
| Service | Image | Port | Role |
|---------|-------|------|------|
- **Host:** docker4
- **Network:** netgrimoire
- **Exposed via:** code.netgrimoire.com, Internal only
- **Exposed via:** `code.netgrimoire.com`
- **Homepage group:** Development
---
### Build & Configuration
#### Prerequisites
No specific prerequisites for this stack.
## Build & Configuration
#### Volume Setup
### Prerequisites
No specific prerequisites are required for this stack.
### Volume Setup
```bash
mkdir -p /DockerVol/code/config
chown -R code:code /DockerVol/code/
chown -R code:code /DockerVol/code/config
```
#### Environment Variables
### Environment Variables
```bash
# generate: openssl rand -hex 32
PUID=1964
PGID=1964
SUDO_PASSWORD=F@lcon13
PROXY_DOMAIN=code.netgrimoire.com
TZ=America/Chicago
generate: openssl rand -hex 32
```
#### Deploy
### Deploy
```bash
cd services/swarm/stack/vscode
set -a && source .env && set +a
@ -45,67 +42,64 @@ rm resolved.yml
docker stack services vscode
```
#### First Run
This process is automatically handled by the Docker Swarm deployment.
### First Run
After the initial deployment, users can access the Code Server instance by visiting `code.netgrimoire.com` in their web browser.
---
### User Guide
#### Accessing vscode
## User Guide
### Accessing vscode
| Service | URL | Purpose |
- **Host:** code.netgrimoire.com:8443
- Internal only
- **Code Server** | https://code.netgrimoire.com | Primary interface for accessing and managing code repositories |
#### Primary Use Cases
To access and contribute to your Git repositories, simply navigate to the Code Server interface via the provided URL. For detailed instructions, refer to the official [Code Server documentation](https://code-server.org/).
### 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.
#### NetGrimoire Integrations
This Stack integrates with other services in NetGrimoire through environment variables and labels:
- Caddy reverse proxy: caddy-docker-proxy:code.netgrimoire.com
- Kuma monitoring: kuma.cs.http.name:Code Server, kuma.cs.http.url:http://code-server:8443
- Diun image update monitoring: enabled
### NetGrimoire Integrations
This service connects to other NetGrimoire services, including Kuma for monitoring and Caddy for reverse proxying.
---
### Operations
#### Monitoring
## Operations
### Monitoring
```bash
docker stack services vscode
docker service logs vscode -f
docker service logs -f vscode
```
#### Backups
Critical vs. reconstructable paths:
- Critical: /DockerVol/code/data
- Reconstructable: /DockerVol/code/config
### 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.
#### Restore
### Restore
```bash
cd services/swarm/stack/vscode
./deploy.sh
```
---
### Common Failures
| Symptom | Cause | Fix |
|---------|-------|-----|
| Code Server does not start on docker4 | Incorrect PUID/PGID or SUDO_PASSWORD | Verify that these environment variables are set correctly in .env. |
| Connection issues with caddy reverse proxy | Invalid CADDY_PORT or proxy configuration in .env | Check the CADDY_PORT value and ensure that the `caddy` labels match the service name. |
| Kuma monitoring is not receiving updates | Missing `kuma.*` labels in service definition or incorrect logging levels | Ensure all required `kuma.*` labels are included in the service definition and adjust logging levels as needed. |
## Common Failures
| 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 |
---
### Changelog
## Changelog
| Date | Commit | Summary |
|------|--------|---------|
| 2026-05-01 | c9386fff | Initial documentation creation based on swarm/vscode.yaml. |
| 2026-05-01 | c3b0c0f5 | Added environment variables and configuration details for secure setup. |
| 2026-05-01 | 05fa151d | Improved user guide with example URL for accessing Code Server. |
| 2026-01-20 | 10f15112 | Initial deployment of this Stack to NetGrimoire. |
| 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 |
---
### Notes
- Generated by Gremlin on 2026-05-01T18:43:05.753Z
- Source: swarm/vscode.yaml
- Review User Guide and Changelog sections
Generated by Gremlin on 2026-05-01T18:43:10.694Z
Source: swarm/vscode.yaml
Review User Guide and Changelog sections