-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
146 lines (139 loc) · 4.62 KB
/
docker-compose.yml
File metadata and controls
146 lines (139 loc) · 4.62 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
version: '3.8'
services:
# TimescaleDB service (PostgreSQL with TimescaleDB extension)
timescaledb:
image: timescale/timescaledb-ha:pg18-all
container_name: monoscope-timescaledb
restart: unless-stopped
ports:
- '5432:5432'
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=monoscope
- TZ=UTC
command: >
postgres
-c shared_preload_libraries='pg_stat_statements,timescaledb'
-c max_connections=200
-c log_statement='all'
-c log_duration=on
volumes:
- timescale_data:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 10s
timeout: 5s
retries: 5
networks:
- monoscope-network
# Monoscope application service
monoscope:
image: ghcr.io/monoscope-tech/monoscope:latest
container_name: monoscope-app
restart: unless-stopped
ports:
- '8080:8080' # HTTP API
- '4317:4317' # gRPC port for OpenTelemetry
environment:
- DATABASE_URL=host=timescaledb user=postgres password=postgres dbname=monoscope port=5432 sslmode=disable
- PORT=8080
- GRPC_PORT=4317
- MIGRATIONS_DIR=/opt/monoscope/static/migrations/
- ENVIRONMENT=DEV
- LOGGING_DESTINATION=StdOut
- BASIC_AUTH_ENABLED=True
- BASIC_AUTH_USERNAME=admin
- BASIC_AUTH_PASSWORD=changeme
- API_KEY_ENCRYPTION_SECRET_KEY=monoscope123456monoscope12345678
- MESSAGES_PER_PUBSUB_PULL_BATCH=100
- MIGRATE_AND_INITIALIZE_ON_START=True
- REQUEST_PUBSUB_TOPICS=monoscope-dev-1
- ENABLE_BACKGROUND_JOBS=True
- ENABLE_PUBSUB_SERVICE=False
- ENABLE_BROWSER_MONITORING=True
# Demo project - set to True to enable demo project in the UI
- SHOW_DEMO_PROJECT=False
# ConvertKit settings (optional - leave empty if not using)
- CONVERTKIT_API_KEY=${CONVERTKIT_API_KEY:-}
- CONVERTKIT_API_SECRET=${CONVERTKIT_API_SECRET:-}
# Auth0 settings (update these with your actual values)
- AUTH0_SECRET=${AUTH0_SECRET:-}
- AUTH0_CLIENT_ID=${AUTH0_CLIENT_ID:-}
- AUTH0_DOMAIN=${AUTH0_DOMAIN:-}
- AUTH0_LOGOUT_REDIRECT=http://localhost:8080
- AUTH0_CALLBACK=http://localhost:8080/auth_callback
# Email settings (optional)
- SENDGRIDAPIKEY=${SENDGRIDAPIKEY:-}
- SMTP_HOST=${SMTP_HOST:-}
- SMTP_PORT=${SMTP_PORT:-25}
- SMTP_USERNAME=${SMTP_USERNAME:-}
- SMTP_PASSWORD=${SMTP_PASSWORD:-}
- SMTP_SENDER=${SMTP_SENDER:-}
# Other optional settings
- SLACK_CLIENT_ID=${SLACK_CLIENT_ID:-}
- SLACK_CLIENT_SECRET=${SLACK_CLIENT_SECRET:-}
- SLACK_REDIRECT_URI=http://localhost:8080/slack/oauth/callback/
- GOOGLE_SERVICE_ACCOUNT_B64=${GOOGLE_SERVICE_ACCOUNT_B64:-}
- COURIER_CLIENT_KEY=${COURIER_CLIENT_KEY:-}
- COURIER_API_KEY=${COURIER_API_KEY:-}
- POSTMARK_TOKEN=${POSTMARK_TOKEN:-}
depends_on:
timescaledb:
condition: service_healthy
networks:
- monoscope-network
# Optional: TimescaleDB with ephemeral storage for testing
# Start with: docker-compose --profile test up
timescaledb-test:
image: timescale/timescaledb-ha:pg18-all
container_name: monoscope-timescaledb-test
profiles: ['test'] # Only starts when explicitly requested with --profile test
ports:
- '5433:5432' # Different port to avoid conflicts
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=monoscope_test_template
- TZ=UTC
command: >
postgres
-c shared_preload_libraries='pg_stat_statements,timescaledb'
-c max_connections=200
tmpfs:
- /var/lib/postgresql/data:size=1G
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 5s
timeout: 3s
retries: 5
networks:
- monoscope-network
# Optional: pgAdmin for database management
# Start with: docker-compose --profile dev up
pgadmin:
image: dpage/pgadmin4:latest
container_name: monoscope-pgadmin
profiles: ['dev'] # Only starts when explicitly requested with --profile dev
restart: unless-stopped
ports:
- '5050:80'
environment:
- PGADMIN_DEFAULT_EMAIL=admin@monoscope.tech
- PGADMIN_DEFAULT_PASSWORD=admin
- PGADMIN_CONFIG_SERVER_MODE=False
- PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED=False
volumes:
- pgadmin_data:/var/lib/pgadmin
depends_on:
- timescaledb
networks:
- monoscope-network
volumes:
timescale_data:
driver: local
pgadmin_data:
driver: local
networks:
monoscope-network:
driver: bridge