docs(gremlin): create vscode
This commit is contained in:
parent
c8a3db66b9
commit
1a2c006965
1 changed files with 111 additions and 0 deletions
111
Netgrimoire/Services/vscode/vscode.md
Normal file
111
Netgrimoire/Services/vscode/vscode.md
Normal file
|
|
@ -0,0 +1,111 @@
|
||||||
|
# vscode
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
This Stack provides a Docker Swarm-based installation of Code Server, a lightweight, self-hosted version control server for Git repositories.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Architecture
|
||||||
|
| Service | Image | Port | Role |
|
||||||
|
|---------|-------|------|------|
|
||||||
|
- **Host:** docker4
|
||||||
|
- **Network:** netgrimoire
|
||||||
|
- **Exposed via:** code.netgrimoire.com, Internal only
|
||||||
|
- **Homepage group:** Development
|
||||||
|
|
||||||
|
---
|
||||||
|
### Build & Configuration
|
||||||
|
|
||||||
|
#### Prerequisites
|
||||||
|
No specific prerequisites for this stack.
|
||||||
|
|
||||||
|
#### Volume Setup
|
||||||
|
```bash
|
||||||
|
mkdir -p /DockerVol/code/config
|
||||||
|
chown -R code:code /DockerVol/code/
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Environment Variables
|
||||||
|
```bash
|
||||||
|
# generate: openssl rand -hex 32
|
||||||
|
PUID=1964
|
||||||
|
PGID=1964
|
||||||
|
SUDO_PASSWORD=F@lcon13
|
||||||
|
PROXY_DOMAIN=code.netgrimoire.com
|
||||||
|
TZ=America/Chicago
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Deploy
|
||||||
|
```bash
|
||||||
|
cd services/swarm/stack/vscode
|
||||||
|
set -a && source .env && set +a
|
||||||
|
docker stack config --compose-file vscode-stack.yml > resolved.yml
|
||||||
|
docker stack deploy --compose-file resolved.yml vscode
|
||||||
|
rm resolved.yml
|
||||||
|
docker stack services vscode
|
||||||
|
```
|
||||||
|
|
||||||
|
#### First Run
|
||||||
|
This process is automatically handled by the Docker Swarm deployment.
|
||||||
|
|
||||||
|
---
|
||||||
|
### User Guide
|
||||||
|
|
||||||
|
#### Accessing vscode
|
||||||
|
| Service | URL | Purpose |
|
||||||
|
- **Host:** code.netgrimoire.com:8443
|
||||||
|
- Internal only
|
||||||
|
|
||||||
|
#### 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/).
|
||||||
|
|
||||||
|
#### 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
|
||||||
|
|
||||||
|
---
|
||||||
|
### Operations
|
||||||
|
|
||||||
|
#### Monitoring
|
||||||
|
```bash
|
||||||
|
docker stack services vscode
|
||||||
|
docker service logs vscode -f
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Backups
|
||||||
|
Critical vs. reconstructable paths:
|
||||||
|
- Critical: /DockerVol/code/data
|
||||||
|
- Reconstructable: /DockerVol/code/config
|
||||||
|
|
||||||
|
#### 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. |
|
||||||
|
|
||||||
|
---
|
||||||
|
### 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. |
|
||||||
|
|
||||||
|
---
|
||||||
|
### Notes
|
||||||
|
- Generated by Gremlin on 2026-05-01T18:43:05.753Z
|
||||||
|
- Source: swarm/vscode.yaml
|
||||||
|
- Review User Guide and Changelog sections
|
||||||
Loading…
Add table
Add a link
Reference in a new issue