-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
121 lines (114 loc) · 3.08 KB
/
Copy pathdocker-compose.yml
File metadata and controls
121 lines (114 loc) · 3.08 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
services:
api:
build: .
command: sh -c "./uptime-migrate && ./uptime-api"
environment:
APP_ENV: development
APP_PORT: 8008
METRICS_PORT: 8009
DATABASE_URL: postgres://uptime:uptime@postgres:5432/uptime?sslmode=disable
REDIS_URL: redis://redis:6379/0
BROWSER_CHECK_ENABLED: "true"
UPTIME_BOOTSTRAP_API_KEY: dev_admin_key_change_me
ALLOW_PRIVATE_TARGETS: "false"
CHECK_WORKER_COUNT: 10
DEFAULT_CHECK_TIMEOUT_SECONDS: 10
LOG_LEVEL: info
WEBHOOK_SIGNING_SECRET: ""
WEBHOOK_TIMEOUT_SECONDS: 10
WEBHOOK_MAX_RETRIES: 3
SHUTDOWN_TIMEOUT_SECONDS: 15
ports:
- "8008:8008"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
healthcheck:
test: ["CMD", "wget", "-q", "-O-", "http://localhost:8008/health"]
interval: 15s
timeout: 5s
retries: 5
restart: unless-stopped
worker:
build: .
command: sh -c "./uptime-migrate && ./uptime-worker"
environment:
APP_ENV: development
APP_PORT: 8008
METRICS_PORT: 8009
DATABASE_URL: postgres://uptime:uptime@postgres:5432/uptime?sslmode=disable
REDIS_URL: redis://redis:6379/0
BROWSER_CHECK_ENABLED: "true"
UPTIME_BOOTSTRAP_API_KEY: dev_admin_key_change_me
ALLOW_PRIVATE_TARGETS: "false"
CHECK_WORKER_COUNT: 10
DEFAULT_CHECK_TIMEOUT_SECONDS: 10
LOG_LEVEL: info
WEBHOOK_SIGNING_SECRET: ""
WEBHOOK_TIMEOUT_SECONDS: 10
WEBHOOK_MAX_RETRIES: 3
SHUTDOWN_TIMEOUT_SECONDS: 15
ports:
- "8009:8009"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
restart: unless-stopped
browser-worker:
build:
context: .
dockerfile: Dockerfile.browser-worker
profiles: ["browser"]
environment:
REDIS_URL: redis://redis:6379/0
BROWSER_ARTIFACT_DIR: /artifacts
volumes:
- browser-artifacts:/artifacts
depends_on:
redis:
condition: service_started
restart: unless-stopped
postgres:
image: postgres:16
environment:
POSTGRES_USER: uptime
POSTGRES_PASSWORD: uptime
POSTGRES_DB: uptime
healthcheck:
test: ["CMD-SHELL", "pg_isready -U uptime -d uptime"]
interval: 5s
timeout: 5s
retries: 10
volumes:
- postgres-data:/var/lib/postgresql/data
redis:
image: redis:7
prometheus:
image: prom/prometheus:v2.55.0
profiles: ["external-metrics"]
ports:
- "9090:9090"
volumes:
- ./deployments/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
depends_on:
- api
- worker
grafana:
image: grafana/grafana:11.2.2
profiles: ["external-metrics"]
ports:
- "3000:3000"
environment:
GF_SECURITY_ADMIN_PASSWORD: admin
volumes:
- ./deployments/grafana/provisioning:/etc/grafana/provisioning:ro
- ./deployments/grafana/dashboards:/var/lib/grafana/dashboards:ro
depends_on:
- prometheus
volumes:
postgres-data:
browser-artifacts: