-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
136 lines (131 loc) · 3.48 KB
/
Copy pathdocker-compose.yml
File metadata and controls
136 lines (131 loc) · 3.48 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
services:
nats:
image: nats:2.10-alpine
ports:
- "4222:4222"
- "8222:8222"
command: "-js -m 8222"
volumes:
- nats_data:/data
deploy:
resources:
limits:
memory: 256M
healthcheck:
test: ["CMD", "nats", "server", "check", "connection"]
interval: 5s
timeout: 3s
retries: 5
clickhouse:
image: clickhouse/clickhouse-server:24.12-alpine
ports:
- "9000:9000" # native protocol
- "8123:8123" # HTTP interface
environment:
CLICKHOUSE_DB: featuresignals
CLICKHOUSE_USER: featuresignals
CLICKHOUSE_PASSWORD: chdev
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: "1"
volumes:
- clickhouse_data:/var/lib/clickhouse
- ./server/internal/migrate/clickhouse:/docker-entrypoint-initdb.d
healthcheck:
test: ["CMD", "clickhouse-client", "--query", "SELECT 1"]
interval: 10s
timeout: 5s
retries: 3
postgres:
image: postgres:16-alpine
ports:
- "5432:5432"
environment:
POSTGRES_DB: featuresignals
POSTGRES_USER: fs
POSTGRES_PASSWORD: fsdev
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U fs -d featuresignals"]
interval: 5s
timeout: 3s
retries: 5
server:
build:
context: ./server
dockerfile: ../deploy/docker/Dockerfile.server
ports:
- "8080:8080"
depends_on:
postgres:
condition: service_healthy
nats:
condition: service_healthy
environment:
DATABASE_URL: postgres://fs:fsdev@postgres:5432/featuresignals?sslmode=disable
JWT_SECRET: dev-secret-change-in-production
PORT: "8080"
CORS_ENABLED: "true"
ALLOWED_ORIGINS: "http://localhost:3000,http://127.0.0.1:3000,http://localhost"
DEPLOYMENT_MODE: cloud
EMAIL_PROVIDER: ${EMAIL_PROVIDER:-none}
APP_BASE_URL: http://localhost:8080
DASHBOARD_URL: http://localhost:3000
CLUSTER_NAME: local-dev
LOCAL_REGION: local
ROUTER_DOMAIN: localhost
ROUTER_EMAIL: dev@localhost
PAYU_MODE: test
STRIPE_MODE: test
SALES_NOTIFY_EMAIL: dev@featuresignals.com
SUPER_MODE_DOMAIN: featuresignals.com
EVENT_BUS_PROVIDER: ${EVENT_BUS_PROVIDER:-noop}
NATS_URL: ${NATS_URL:-nats://nats:4222}
CLICKHOUSE_ENABLED: ${CLICKHOUSE_ENABLED:-false}
CLICKHOUSE_HOST: clickhouse
CLICKHOUSE_PORT: "9000"
CLICKHOUSE_DATABASE: featuresignals
CLICKHOUSE_USER: featuresignals
CLICKHOUSE_PASSWORD: chdev
healthcheck:
test:
[
"CMD",
"wget",
"--no-verbose",
"--tries=1",
"--spider",
"http://localhost:8080/health",
]
interval: 10s
timeout: 5s
retries: 3
dashboard:
build:
context: ./dashboard
dockerfile: ../deploy/docker/Dockerfile.dashboard
depends_on:
server:
condition: service_healthy
# ports: disabled temporarily for Docker for Mac port conflict
# Access via Docker internal network through router
environment:
PORT: "3000"
HOSTNAME: "0.0.0.0"
NEXT_PUBLIC_API_URL: http://localhost:8080
healthcheck:
test:
[
"CMD",
"wget",
"--no-verbose",
"--tries=1",
"--spider",
"http://127.0.0.1:3000/api/health",
]
interval: 10s
timeout: 5s
retries: 3
volumes:
pgdata:
nats_data:
clickhouse_data: