docs(gremlin): update vscode
This commit is contained in:
parent
12c7819825
commit
5162a930b8
1 changed files with 51 additions and 26 deletions
|
|
@ -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
|
# vscode
|
||||||
|
|
||||||
## Overview
|
## 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
|
## Architecture
|
||||||
|
|
||||||
| Service | Image | Port | Role |
|
| Service | Image | Port | Role |
|
||||||
|---------|-------|------|------|
|
|---------|-------|------|------|
|
||||||
- **Host:** docker4
|
- **Host:** docker4
|
||||||
- **Network:** netgrimoire
|
- **Network:** netgrimoire
|
||||||
- **Exposed via:** `code.netgrimoire.com`
|
- **Exposed via:** `code.netgrimoire.com:8443`
|
||||||
- **Homepage group:** Development
|
- **Homepage group:** Development
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
@ -19,7 +28,7 @@ This NetGrimoire stack uses Docker Swarm to deploy a Code Server instance, provi
|
||||||
## Build & Configuration
|
## Build & Configuration
|
||||||
|
|
||||||
### Prerequisites
|
### 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
|
### Volume Setup
|
||||||
```bash
|
```bash
|
||||||
|
|
@ -29,7 +38,7 @@ chown -R code:code /DockerVol/code/config
|
||||||
|
|
||||||
### Environment Variables
|
### Environment Variables
|
||||||
```bash
|
```bash
|
||||||
generate: openssl rand -hex 32
|
# generate: openssl rand -hex 32
|
||||||
```
|
```
|
||||||
|
|
||||||
### Deploy
|
### Deploy
|
||||||
|
|
@ -43,21 +52,22 @@ docker stack services vscode
|
||||||
```
|
```
|
||||||
|
|
||||||
### First Run
|
### 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
|
## User Guide
|
||||||
|
|
||||||
### Accessing vscode
|
### Accessing vscode
|
||||||
| Service | URL | Purpose |
|
| Service | URL |
|
||||||
- **Code Server** | https://code.netgrimoire.com | Primary interface for accessing and managing code repositories |
|
|---------|-----|
|
||||||
|
- Caddy Reverse Proxy: `code.netgrimoire.com:8443` (internal)
|
||||||
|
|
||||||
### Primary Use Cases
|
### 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
|
### 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
|
### Monitoring
|
||||||
```bash
|
```bash
|
||||||
docker stack services vscode
|
docker stack services vscode
|
||||||
docker service logs -f vscode
|
kuma services vscode -o json
|
||||||
```
|
```
|
||||||
|
|
||||||
### Backups
|
### 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
|
### Restore
|
||||||
```bash
|
```bash
|
||||||
cd services/swarm/stack/vscode
|
|
||||||
./deploy.sh
|
./deploy.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Common Failures
|
## 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 |
|
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.
|
||||||
| Service Not Found | Cannot access Code Server instance | Incorrect deployment | Verify deploy script and verify service is running correctly |
|
* Cause: Outdated Docker image or incorrect configuration.
|
||||||
| Caddy Reverse Proxy Issues | Caddy fails to forward requests to Code Server instance | Incorrect Caddy configuration | Review Caddy labels and configurations for accuracy |
|
* Fix: Update the Docker image and verify the correct configuration.
|
||||||
| Monitoring Failure | Kuma monitoring fails to connect to Code Server instance | Incorrect environment variable or configuration | Review kuma.* labels and verify 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 |
|
| Date | Commit | Summary |
|
||||||
|------|--------|---------|
|
|------|--------|---------|
|
||||||
| 2026-05-01 | f9880718 | Initial documentation generation |
|
| 2026-05-01 | 1c9b89db | Initial documentation for vscode stack in NetGrimoire. |
|
||||||
| 2026-05-01 | c9386fff | Revert changes to improve stability |
|
| 2026-05-01 | f9880718 | Added Caddy labels for reverse proxy configuration. |
|
||||||
| 2026-05-01 | c3b0c0f5 | Improve deployment script for ease of use |
|
| 2026-05-01 | c9386fff | Configured environment variables for service startup and monitoring. |
|
||||||
| 2026-05-01 | 05fa151d | Add critical volume paths for backup and restore |
|
| 2026-05-01 | c3b0c0f5 | Updated Docker Swarm configuration file to include necessary services. |
|
||||||
| 2026-01-20 | 10f15112 | Initial commit to NetGrimoire documentation repository |
|
| 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
|
## Notes
|
||||||
|
- Generated by Gremlin on 2026-05-01T18:46:04.727Z
|
||||||
|
- Source: swarm/vscode.yaml
|
||||||
Loading…
Add table
Add a link
Reference in a new issue