File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ IMAGE_VERSION = latest
2+ REDIS_IMAGE_VERSION = alpine
3+
4+ # Generate with:
5+ # docker run --rm getsentry/sentry:${IMAGE_VERSION} config generate-secret-key
6+ SENTRY_SECRET_KEY = <GENERATE_A_SECRET_KEY>
7+
8+ # Public URL where Sentry will be served
9+ SENTRY_URL_PREFIX = https://sentry.pdxhackerspace.org
10+
11+ # PostgreSQL (shared postgresql service)
12+ SENTRY_POSTGRES_HOST = postgresql
13+ SENTRY_POSTGRES_PORT = 5432
14+ SENTRY_DB_NAME = sentry_db
15+ SENTRY_DB_USER = sentry_user
16+ SENTRY_DB_PASSWORD = <DATABASE_PASSWORD>
17+
18+ # Redis (local sentry-redis service)
19+ SENTRY_REDIS_HOST = sentry-redis
20+ SENTRY_REDIS_PORT = 6379
21+ SENTRY_REDIS_PASSWORD = <REDIS_PASSWORD>
22+
23+ # Optional SMTP configuration
24+ SENTRY_EMAIL_HOST = <MAIL_SERVER_HOSTNAME>
25+ SENTRY_EMAIL_PORT = 587
26+ SENTRY_EMAIL_USER = <MAIL_SERVER_USERNAME>
27+ SENTRY_EMAIL_PASSWORD = <MAIL_SERVER_PASSWORD>
28+ SENTRY_EMAIL_USE_TLS = true
29+ SENTRY_SERVER_EMAIL = info@pdxhackerspace.org
30+
31+ # Automatic database backup URL
32+ BACKUP_DATABASE_URLS = postgresql://sentry_user:<DATABASE_PASSWORD>@postgresql:5432/sentry_db
Original file line number Diff line number Diff line change 1+ # sentry
2+
3+ Self-hosted error tracking and application monitoring.
4+
5+ This stack includes a dedicated Redis container for Sentry background jobs and caching.
6+
7+ ## Configuration
8+
9+ ### Environment Variables
10+
11+ Copy ` .env.example ` to ` .env ` and configure:
12+
13+ ``` bash
14+ cp .env.example .env
15+ # Edit .env with your settings
16+ ```
17+
18+ Initialize or upgrade the database schema before first start:
19+
20+ ``` bash
21+ docker compose run --rm sentry upgrade
22+ ```
23+
24+ Create the first admin user:
25+
26+ ``` bash
27+ docker compose run --rm sentry createuser
28+ ```
29+
30+ ## Usage
31+
32+ ### Starting the service
33+
34+ ``` bash
35+ docker compose up -d
36+ ```
37+
38+ ### Stopping the service
39+
40+ ``` bash
41+ docker compose down
42+ ```
43+
44+ ### Viewing logs
45+
46+ ``` bash
47+ docker compose logs -f
48+ ```
Original file line number Diff line number Diff line change 1+ services :
2+ sentry-redis :
3+ image : redis:${REDIS_IMAGE_VERSION:-alpine}
4+ container_name : sentry-redis
5+ hostname : sentry-redis
6+ restart : unless-stopped
7+ command : " redis-server --requirepass ${SENTRY_REDIS_PASSWORD}"
8+ volumes :
9+ - ../../lib/sentry/redis:/data
10+ env_file :
11+ - .env
12+ networks :
13+ - redis
14+
15+ sentry :
16+ image : getsentry/sentry:${IMAGE_VERSION:-latest}
17+ container_name : sentry
18+ hostname : sentry
19+ restart : unless-stopped
20+ command : run web
21+ networks :
22+ - proxy
23+ - db
24+ - redis
25+ volumes :
26+ - ../../lib/sentry:/var/lib/sentry/files
27+ # ports:
28+ # - 9000:9000
29+ env_file :
30+ - .env
31+ depends_on :
32+ - sentry-redis
33+ healthcheck :
34+ test :
35+ [
36+ " CMD-SHELL" ,
37+ " python -c \" import urllib.request; urllib.request.urlopen('http://127.0.0.1:9000/_health/').read()\" " ,
38+ ]
39+ interval : 30s
40+ timeout : 5s
41+ retries : 5
42+ start_period : 30s
43+
44+ sentry-worker :
45+ image : getsentry/sentry:${IMAGE_VERSION:-latest}
46+ container_name : sentry-worker
47+ hostname : sentry-worker
48+ restart : unless-stopped
49+ command : run worker
50+ networks :
51+ - db
52+ - redis
53+ volumes :
54+ - ../../lib/sentry:/var/lib/sentry/files
55+ env_file :
56+ - .env
57+ depends_on :
58+ - sentry-redis
59+
60+ sentry-cron :
61+ image : getsentry/sentry:${IMAGE_VERSION:-latest}
62+ container_name : sentry-cron
63+ hostname : sentry-cron
64+ restart : unless-stopped
65+ command : run cron
66+ networks :
67+ - db
68+ - redis
69+ volumes :
70+ - ../../lib/sentry:/var/lib/sentry/files
71+ env_file :
72+ - .env
73+ depends_on :
74+ - sentry-redis
75+
76+ networks :
77+ proxy :
78+ external : true
79+ name : nginx-proxy-net
80+ db :
81+ external : true
82+ name : postgres-net
83+ redis :
84+ name : sentry-redis-net
You can’t perform that action at this time.
0 commit comments