-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.development.yml
More file actions
155 lines (141 loc) · 4.6 KB
/
docker-compose.development.yml
File metadata and controls
155 lines (141 loc) · 4.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# Development/Debug Configuration
# Usage: docker compose -f docker-compose.development.yml up -d
#
# This configuration exposes services directly via ports (no Traefik required)
# Access:
# - Bugsink: http://localhost:8080
services:
### Application Services ###
bugsink-server:
# image: bugsink/bugsink:${BUGSINK_VERSION:-2}
build:
context: ./src
dockerfile: Dockerfile
args:
- BUGSINK_VERSION=${BUGSINK_VERSION:-2}
restart: unless-stopped
container_name: BUGSINK_SERVER
healthcheck:
test: ["CMD-SHELL", "python -c 'import requests; requests.get(\"http://localhost:8000/\").raise_for_status()'"]
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
logging:
driver: json-file
options:
max-size: "50m"
max-file: "3"
environment:
- TZ=${TIME_ZONE:-UTC}
# Core Configuration
- SECRET_KEY=${SECRET_KEY}
- PORT=8000
- BASE_URL=https://${SERVICE_HOSTNAME}
- BEHIND_HTTPS_PROXY=true
- SITE_TITLE=${SITE_TITLE:-Bugsink}
- ALLOWED_HOSTS=${SERVICE_HOSTNAME},localhost,127.0.0.1,${ALLOWED_HOSTS:-::1}
# Database Connection
- DATABASE_URL=postgresql://bugsink:${DATABASE_PASSWORD}@database-server:5432/bugsink
# Initial Admin User (remove after first start)
- CREATE_SUPERUSER=${CREATE_SUPERUSER:-}
# User Registration & Permissions
- SINGLE_USER=${SINGLE_USER:-false}
- SINGLE_TEAM=${SINGLE_TEAM:-false}
- USER_REGISTRATION=${USER_REGISTRATION:-CB_ADMINS}
- USER_REGISTRATION_VERIFY_EMAIL=${USER_REGISTRATION_VERIFY_EMAIL:-true}
- TEAM_CREATION=${TEAM_CREATION:-CB_ADMINS}
# Email Configuration (SMTP)
- EMAIL_HOST=${EMAIL_HOST:-}
- EMAIL_PORT=${EMAIL_PORT:-587}
- EMAIL_HOST_USER=${EMAIL_HOST_USER:-}
- EMAIL_HOST_PASSWORD=${EMAIL_HOST_PASSWORD:-}
- EMAIL_USE_TLS=${EMAIL_USE_TLS:-true}
- EMAIL_USE_SSL=${EMAIL_USE_SSL:-false}
- EMAIL_TIMEOUT=${EMAIL_TIMEOUT:-5}
- DEFAULT_FROM_EMAIL=${DEFAULT_FROM_EMAIL:-}
- EMAIL_LOGGING=${EMAIL_LOGGING:-false}
# Rate Limits & Maximums (tuned for ~100 projects)
- MAX_EVENT_SIZE=${MAX_EVENT_SIZE:-2097152}
- MAX_ENVELOPE_SIZE=${MAX_ENVELOPE_SIZE:-104857600}
- MAX_ENVELOPE_COMPRESSED_SIZE=${MAX_ENVELOPE_COMPRESSED_SIZE:-20971520}
- MAX_EVENTS_PER_PROJECT_PER_5_MINUTES=${MAX_EVENTS_PER_PROJECT_PER_5_MINUTES:-2500}
- MAX_EVENTS_PER_PROJECT_PER_HOUR=${MAX_EVENTS_PER_PROJECT_PER_HOUR:-15000}
- MAX_EMAILS_PER_MONTH=${MAX_EMAILS_PER_MONTH:-}
# Background Worker (tuned for ~100 projects)
- TASK_ALWAYS_EAGER=${TASK_ALWAYS_EAGER:-false}
- SNAPPEA_NUM_WORKERS=${SNAPPEA_NUM_WORKERS:-4}
# Privacy & Debugging
- PHONEHOME=${PHONEHOME:-false}
- DEBUG=${DEBUG:-false}
expose:
- 8000/tcp
links:
- database-server
depends_on:
database-server:
condition: service_healthy
networks:
local:
ports:
- "${SERVER_PORT:-8080}:8000"
### Support Services ###
# PostgreSQL Database Server
# Tuned for: 4-8 GB RAM, SSD/NVMe storage
database-server:
image: postgres:${POSTGRES_VERSION:-18}
restart: unless-stopped
container_name: BUGSINK_DATABASE
command: >
-c max_connections=${DATABASE_POOLMAXSIZE:-100}
-c shared_buffers=512MB
-c work_mem=4MB
-c effective_cache_size=1536MB
-c maintenance_work_mem=128MB
-c max_wal_size=1GB
-c min_wal_size=256MB
-c random_page_cost=1.1
-c seq_page_cost=1.0
-c effective_io_concurrency=200
-c max_parallel_workers_per_gather=2
-c max_parallel_workers=4
-c max_parallel_maintenance_workers=2
-c checkpoint_completion_target=0.9
-c wal_buffers=16MB
-c default_statistics_target=100
healthcheck:
test: ["CMD-SHELL", "pg_isready -U bugsink -d bugsink"]
interval: 10s
timeout: 5s
retries: 5
start_period: 20s
logging:
driver: json-file
options:
max-size: "50m"
max-file: "3"
environment:
- TZ=${TIME_ZONE:-UTC}
- PG_TZ=${TIME_ZONE:-UTC}
- POSTGRES_DB=bugsink
- POSTGRES_USER=bugsink
- POSTGRES_PASSWORD=${DATABASE_PASSWORD}
expose:
- 5432/tcp
volumes:
- 'database-server:/var/lib/postgresql'
networks:
local:
### Volumes ###
volumes:
# PostgreSQL data persistence
database-server:
driver: local
name: BUGSINK-postgres
### Networks ###
networks:
# Internal network for service communication (IPv4 + IPv6)
local:
driver: bridge
name: BUGSINK
enable_ipv6: true