Skip to content

Deployment

Chuck edited this page Nov 30, 2026 · 5 revisions

Glint is a single stateless HTTP service. Run it however you run other small services; this page covers the common options.

Network requirements

Direction Needs
GitLab → Glint GitLab must reach http(s)://<glint-host>:<port>/webhook
Glint → GitLab HTTPS (or HTTP) to GITLAB_BASE_URL
Glint → AI provider HTTPS to api.anthropic.com, or to the host in OPENAI_BASE_URL (for example a local Ollama on port 11434)

Docker image

Images are published to GitHub Container Registry for linux/amd64 and linux/arm64:

Tag Contents
ghcr.io/smith8ca/glint:vX.Y.Z A specific release — recommended for production
ghcr.io/smith8ca/glint:latest The most recent release
ghcr.io/smith8ca/glint:dev The current dev branch — unreleased, for testing only

Pin a version tag so an update only happens when you choose it; see Releases for what changed.

The image is based on node:22-alpine, runs as the unprivileged user glint (UID 1001), listens on port 3000, and has a built-in health check against GET /health. It contains no configuration or secrets.

docker run

docker run -d --name glint --restart unless-stopped \
  -p 3000:3000 \
  --env-file /etc/glint/glint.env \
  ghcr.io/smith8ca/glint:v1.0.0

Docker Compose

The repository's docker-compose.yml is an example with placeholder values. Before using it:

  1. Credentials. The example sets placeholder values inline under environment:. Either replace them, or — better — delete the environment: block and uncomment env_file: so values come from webhook-receiver/.env. Values under environment: take precedence over env_file:, so leaving the placeholders in place would override your real .env.
  2. Image. It builds from source (build: ./webhook-receiver). To use the published image, replace build: with image: ghcr.io/smith8ca/glint:vX.Y.Z.
  3. Network. It joins an external Docker network called docker-shared, intended for a reverse proxy on the same host. Create it once with docker network create docker-shared, or remove the networks: block to use Compose's default network.

A minimal production file:

services:
  glint:
    image: ghcr.io/smith8ca/glint:v1.0.0
    container_name: glint
    env_file:
      - ./glint.env
    ports:
      - "3000:3000"
    restart: unless-stopped
    # Private CA for GitLab (see Private CA and TLS)
    # volumes:
    #   - /etc/glint/ca.crt:/certs/ca.crt:ro
docker compose up -d            # start, or apply .env changes
docker compose logs -f glint    # follow logs
docker compose pull && docker compose up -d   # update to the tag in the file

Configuration is read when the container starts, so changing the env file only needs docker compose up -d (Compose recreates the container), not a rebuild.


Run with Node.js

Requires Node.js 22 or later.

git clone https://github.com/smith8ca/Glint.git
cd Glint/webhook-receiver
npm ci
npm run build                     # compiles TypeScript to dist/
cp .env.example .env              # then edit .env
npm start                         # runs node dist/index.js

systemd

/etc/systemd/system/glint.service:

[Unit]
Description=Glint webhook receiver
After=network-online.target
Wants=network-online.target

[Service]
User=glint
WorkingDirectory=/opt/glint/webhook-receiver
ExecStart=/usr/bin/node dist/index.js
EnvironmentFile=/etc/glint/glint.env
Restart=on-failure
RestartSec=5
NoNewPrivileges=true
ProtectSystem=strict
ProtectHome=true
PrivateTmp=true

[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable --now glint
journalctl -u glint -f

Glint stops cleanly on SIGTERM, finishing in-flight HTTP requests first. Background work that has already been accepted (a summary in progress) is dropped on shutdown.

PM2

cd webhook-receiver
pm2 start dist/index.js --name glint
pm2 save && pm2 startup

PM2 runs from webhook-receiver/, so Glint picks up webhook-receiver/.env.


Behind a reverse proxy

Glint itself only speaks plain HTTP. To give GitLab an HTTPS endpoint, put a reverse proxy in front of it. With nginx:

server {
    listen 443 ssl;
    server_name glint.example.com;

    ssl_certificate     /etc/ssl/certs/glint.example.com.crt;
    ssl_certificate_key /etc/ssl/private/glint.example.com.key;

    # Only the webhook endpoint needs to be reachable from GitLab
    location = /webhook {
        proxy_pass http://127.0.0.1:3000;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }

    location / { return 404; }
}

Then use https://glint.example.com/webhook as the webhook URL. Caddy, Traefik and HAProxy work the same way: forward POST /webhook to port 3000 without modifying the body (HMAC signatures cover the exact bytes).

If GitLab and Glint are on the same trusted network, plain HTTP is acceptable; with a signing token, the payload is still integrity-protected.


Running more than one instance

Glint keeps no state, so several instances behind a load balancer work. Each delivery is processed by whichever instance receives it. There is no de-duplication on any setup: if the same event reaches Glint twice (a manual Resend in GitLab, or both a project and a group webhook pointing at Glint), the MR gets two comments.


Updating

  • Docker: change the tag and recreate the container (docker compose pull && docker compose up -d).
  • Source: git pull, then npm ci && npm run build in webhook-receiver/, then restart the service.

Check the changelog for new or changed settings before updating.


Production checklist

  • Image pinned to a vX.Y.Z tag
  • WEBHOOK_SIGNING_TOKEN (or a long random WEBHOOK_SECRET) configured
  • GITLAB_TOKEN is a project/group or bot token with access only to the reviewed projects
  • Env file readable only by the service user (chmod 600)
  • TLS verification on; private CA trusted via GITLAB_CA_FILE
  • Only /webhook exposed beyond the host, ideally only to GitLab's address
  • Logs collected (stdout, JSON lines) so background failures are visible; LOG_LEVEL at info or warn

More detail in Security.

Clone this wiki locally