Files

93 lines
2.9 KiB
YAML

# Optional self-hosted error monitoring for hackerspace-management.
#
# Self-contained: its OWN Postgres + Redis, nothing shared with the app stack,
# so it works on any host with Docker regardless of how the app's database is
# run. Bound to 127.0.0.1 by default (no public surface); view the dashboard
# over an SSH tunnel or put your own reverse proxy in front.
#
# Quickstart:
# cp .env.example .env # then set POSTGRES_PASSWORD + SECRET_KEY
# docker compose up -d # migrate runs once, then web + worker start
# Then register the first user (open http://localhost:GLITCHTIP_PORT), create an
# organization + project, copy its DSN into the app's SENTRY_DSN, restart the app.
#
# Reproducibility: the `glitchtip/glitchtip` image is pinned to a release tag
# (bump it deliberately, then `docker compose pull && up -d`). See
# https://gitlab.com/glitchtip/glitchtip for versions.
name: glitchtip
services:
postgres:
image: postgres:16-alpine
restart: unless-stopped
mem_limit: 256m
environment:
POSTGRES_DB: glitchtip
POSTGRES_USER: glitchtip
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?set POSTGRES_PASSWORD in .env}
volumes:
- gt-postgres:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U glitchtip']
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
restart: unless-stopped
mem_limit: 128m
migrate:
image: glitchtip/glitchtip:6.1.6
command: ./manage.py migrate
restart: 'no'
env_file: [.env]
environment:
DATABASE_URL: postgres://glitchtip:${POSTGRES_PASSWORD}@postgres:5432/glitchtip
REDIS_URL: redis://redis:6379/0
depends_on:
postgres:
condition: service_healthy
web:
image: glitchtip/glitchtip:6.1.6
restart: unless-stopped
mem_limit: 768m
env_file: [.env]
environment:
DATABASE_URL: postgres://glitchtip:${POSTGRES_PASSWORD}@postgres:5432/glitchtip
REDIS_URL: redis://redis:6379/0
PORT: 8080
ports:
# Default 8100 (not 8000) so it does not collide with Supabase's Kong
# gateway, which binds 8000 on a self-hosted Supabase host.
- '127.0.0.1:${GLITCHTIP_PORT:-8100}:8080'
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
migrate:
condition: service_completed_successfully
worker:
image: glitchtip/glitchtip:6.1.6
command: ./bin/run-celery-with-beat.sh
restart: unless-stopped
mem_limit: 640m
env_file: [.env]
environment:
DATABASE_URL: postgres://glitchtip:${POSTGRES_PASSWORD}@postgres:5432/glitchtip
REDIS_URL: redis://redis:6379/0
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
migrate:
condition: service_completed_successfully
volumes:
gt-postgres: