Netgrimoire/Netgrimoire/Services/vscode/vscode.md

3.1 KiB

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.


Architecture

Service Image Port Role
  • Host: docker4
  • Network: netgrimoire
  • Exposed via: code.netgrimoire.com
  • Homepage group: Development

Build & Configuration

Prerequisites

No specific prerequisites are required for this stack.

Volume Setup

mkdir -p /DockerVol/code/config
chown -R code:code /DockerVol/code/config

Environment Variables

generate: openssl rand -hex 32

Deploy

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

After the initial deployment, users can access the Code Server instance by visiting code.netgrimoire.com in their web browser.


User Guide

Accessing vscode

| Service | URL | Purpose |

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 service connects to other NetGrimoire services, including Kuma for monitoring and Caddy for reverse proxying.


Operations

Monitoring

docker stack services vscode
docker service logs -f vscode

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

cd services/swarm/stack/vscode
./deploy.sh

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

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

Generated by Gremlin on 2026-05-01T18:43:10.694Z Source: swarm/vscode.yaml Review User Guide and Changelog sections