-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
53 lines (48 loc) · 1.4 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
53 lines (48 loc) · 1.4 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
# BrandPulse 开发环境一键编排(可选)
#
# 说明:项目默认走本地安装(见 src/frontend/README.dev.md 与根 README)。
# 本 compose 仅作为 dev infra 样例,提供 Postgres + Redis + Prometheus。
# backend / frontend 服务需要先在本地启动,或自行扩展 Dockerfile。
version: "3.8"
services:
postgres:
image: postgres:16-alpine
container_name: bp-postgres
environment:
POSTGRES_USER: brandpulse
POSTGRES_PASSWORD: brandpulse123
POSTGRES_DB: brandpulse
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./brandpulse-infra/init-scripts:/docker-entrypoint-initdb.d:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U brandpulse -d brandpulse"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
container_name: bp-redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
prometheus:
image: prom/prometheus:v2.55.0
container_name: bp-prometheus
ports:
- "9090:9090"
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- ./brandpulse-infra/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
volumes:
postgres_data:
redis_data:
prometheus_data: