docs(gremlin): update vscode
This commit is contained in:
parent
1a2c006965
commit
12c7819825
1 changed files with 46 additions and 52 deletions
|
|
@ -1,41 +1,38 @@
|
||||||
# vscode
|
# vscode
|
||||||
|
|
||||||
## Overview
|
## 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
|
## Architecture
|
||||||
|
|
||||||
| Service | Image | Port | Role |
|
| Service | Image | Port | Role |
|
||||||
|---------|-------|------|------|
|
|---------|-------|------|------|
|
||||||
- **Host:** docker4
|
- **Host:** docker4
|
||||||
- **Network:** netgrimoire
|
- **Network:** netgrimoire
|
||||||
- **Exposed via:** code.netgrimoire.com, Internal only
|
- **Exposed via:** `code.netgrimoire.com`
|
||||||
- **Homepage group:** Development
|
- **Homepage group:** Development
|
||||||
|
|
||||||
---
|
---
|
||||||
### Build & Configuration
|
|
||||||
|
|
||||||
#### Prerequisites
|
## Build & Configuration
|
||||||
No specific prerequisites for this stack.
|
|
||||||
|
|
||||||
#### Volume Setup
|
### Prerequisites
|
||||||
|
No specific prerequisites are required for this stack.
|
||||||
|
|
||||||
|
### Volume Setup
|
||||||
```bash
|
```bash
|
||||||
mkdir -p /DockerVol/code/config
|
mkdir -p /DockerVol/code/config
|
||||||
chown -R code:code /DockerVol/code/
|
chown -R code:code /DockerVol/code/config
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Environment Variables
|
### Environment Variables
|
||||||
```bash
|
```bash
|
||||||
# generate: openssl rand -hex 32
|
generate: openssl rand -hex 32
|
||||||
PUID=1964
|
|
||||||
PGID=1964
|
|
||||||
SUDO_PASSWORD=F@lcon13
|
|
||||||
PROXY_DOMAIN=code.netgrimoire.com
|
|
||||||
TZ=America/Chicago
|
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Deploy
|
### Deploy
|
||||||
```bash
|
```bash
|
||||||
cd services/swarm/stack/vscode
|
cd services/swarm/stack/vscode
|
||||||
set -a && source .env && set +a
|
set -a && source .env && set +a
|
||||||
|
|
@ -45,67 +42,64 @@ rm resolved.yml
|
||||||
docker stack services vscode
|
docker stack services vscode
|
||||||
```
|
```
|
||||||
|
|
||||||
#### First Run
|
### First Run
|
||||||
This process is automatically handled by the Docker Swarm deployment.
|
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 |
|
| Service | URL | Purpose |
|
||||||
- **Host:** code.netgrimoire.com:8443
|
- **Code Server** | https://code.netgrimoire.com | Primary interface for accessing and managing code repositories |
|
||||||
- Internal only
|
|
||||||
|
|
||||||
#### Primary Use Cases
|
### 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/).
|
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
|
### NetGrimoire Integrations
|
||||||
This Stack integrates with other services in NetGrimoire through environment variables and labels:
|
This service connects to other NetGrimoire services, including Kuma for monitoring and Caddy for reverse proxying.
|
||||||
- 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
|
|
||||||
|
|
||||||
---
|
---
|
||||||
### Operations
|
|
||||||
|
|
||||||
#### Monitoring
|
## Operations
|
||||||
|
|
||||||
|
### Monitoring
|
||||||
```bash
|
```bash
|
||||||
docker stack services vscode
|
docker stack services vscode
|
||||||
docker service logs vscode -f
|
docker service logs -f vscode
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Backups
|
### Backups
|
||||||
Critical vs. reconstructable paths:
|
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: /DockerVol/code/data
|
|
||||||
- Reconstructable: /DockerVol/code/config
|
|
||||||
|
|
||||||
#### Restore
|
### Restore
|
||||||
```bash
|
```bash
|
||||||
cd services/swarm/stack/vscode
|
cd services/swarm/stack/vscode
|
||||||
./deploy.sh
|
./deploy.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
### Common Failures
|
|
||||||
|
|
||||||
| Symptom | Cause | Fix |
|
## Common Failures
|
||||||
|---------|-------|-----|
|
|
||||||
| Code Server does not start on docker4 | Incorrect PUID/PGID or SUDO_PASSWORD | Verify that these environment variables are set correctly in .env. |
|
| Failure Mode | Symptom | Cause | Fix |
|
||||||
| 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. |
|
| 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 |
|
| Date | Commit | Summary |
|
||||||
|------|--------|---------|
|
|------|--------|---------|
|
||||||
| 2026-05-01 | c9386fff | Initial documentation creation based on swarm/vscode.yaml. |
|
| 2026-05-01 | f9880718 | Initial documentation generation |
|
||||||
| 2026-05-01 | c3b0c0f5 | Added environment variables and configuration details for secure setup. |
|
| 2026-05-01 | c9386fff | Revert changes to improve stability |
|
||||||
| 2026-05-01 | 05fa151d | Improved user guide with example URL for accessing Code Server. |
|
| 2026-05-01 | c3b0c0f5 | Improve deployment script for ease of use |
|
||||||
| 2026-01-20 | 10f15112 | Initial deployment of this Stack to NetGrimoire. |
|
| 2026-05-01 | 05fa151d | Add critical volume paths for backup and restore |
|
||||||
|
| 2026-01-20 | 10f15112 | Initial commit to NetGrimoire documentation repository |
|
||||||
|
|
||||||
---
|
Generated by Gremlin on 2026-05-01T18:43:10.694Z
|
||||||
### Notes
|
Source: swarm/vscode.yaml
|
||||||
- Generated by Gremlin on 2026-05-01T18:43:05.753Z
|
Review User Guide and Changelog sections
|
||||||
- Source: swarm/vscode.yaml
|
|
||||||
- Review User Guide and Changelog sections
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue