-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
83 lines (78 loc) · 2.26 KB
/
Copy pathdocker-compose.yml
File metadata and controls
83 lines (78 loc) · 2.26 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
# Usage:
# docker compose up # db only
# docker compose --profile clickhouse up # db + clickhouse
# docker compose --profile production up # db + server (with envoy) + dashboard
# docker compose --profile production --profile clickhouse up # all services
services:
db:
image: postgres:15
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: scrawn
ports:
- "5432:5432"
volumes:
- ./data/pgdata:/var/lib/postgresql/data
- ./scrawn.init.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
clickhouse:
profiles:
- clickhouse
image: clickhouse/clickhouse-server:latest
restart: always
ports:
- "8123:8123"
- "9000:9000"
environment:
CLICKHOUSE_USER: default
CLICKHOUSE_PASSWORD: clickhouse
CLICKHOUSE_DB: scrawn
volumes:
- ./data/chdata:/var/lib/clickhouse
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:8123/ping"]
interval: 5s
timeout: 5s
retries: 5
server:
profiles:
- production
image: scrawndotdev/scrawn:latest
restart: unless-stopped
ports:
- "8060:8060"
depends_on:
db:
condition: service_healthy
# clickhouse:
# condition: service_healthy
environment:
DATABASE_URL: postgres://postgres:postgres@db:5432/scrawn
CLICKHOUSE_URL: http://default:clickhouse@clickhouse:8123/scrawn
NODE_ENV: production
HMAC_SECRET: ${HMAC_SECRET}
APP_URL: ${APP_URL}
MASTER_API_KEY_HASH: ${MASTER_API_KEY_HASH}
dashboard:
profiles:
- production
image: scrawndotdev/dashboard:latest
restart: unless-stopped
ports:
- "3000:3000"
depends_on:
db:
condition: service_healthy
environment:
DATABASE_URL: postgres://postgres:postgres@db:5432/dashboard
BETTER_AUTH_SECRET: ${BETTER_AUTH_SECRET}
BETTER_AUTH_URL: http://localhost:3000
SCRAWN_BASE_URL: http://server:8060
SCRAWN_HTTP_URL: http://server:8060
MASTER_API_KEY: ${MASTER_API_KEY}