-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
88 lines (83 loc) · 2.06 KB
/
docker-compose.yml
File metadata and controls
88 lines (83 loc) · 2.06 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
# version: "3.8"
services:
clickhouse:
image: clickhouse/clickhouse-server:23.12
container_name: fastify-clickhouse
hostname: clickhouse
ports:
- "8123:8123"
- "9000:9000"
environment:
CLICKHOUSE_DB: app
CLICKHOUSE_USER: app
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 1
CLICKHOUSE_PASSWORD: secret
volumes:
- clickhouse_data:/var/lib/clickhouse
- clickhouse_logs:/var/log/clickhouse-server
# - ./infra/clickhouse/config.xml:/etc/clickhouse-server/config.xml
# - ./infra/clickhouse/users.xml:/etc/clickhouse-server/users.xml
# - ./infra/clickhouse/init-scripts:/docker-entrypoint-initdb.d
ulimits:
nproc: 65535
nofile:
soft: 262144
hard: 262144
healthcheck:
test: ["CMD", "clickhouse-client", "--query", "SELECT 1"]
interval: 30s
timeout: 10s
retries: 3
restart: unless-stopped
networks:
- app_network
postgres:
image: postgres:18-alpine
container_name: fastify-postgres
restart: unless-stopped
environment:
POSTGRES_DB: hono_clean
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
PGDATA: /var/lib/postgresql/data/pgdata
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
networks:
- app_network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 30s
timeout: 10s
retries: 3
redis:
image: redis:8-alpine
container_name: fastify-redis
restart: unless-stopped
command: redis-server --appendonly yes --requirepass password123
volumes:
- redis_data:/data
ports:
- "6379:6379"
networks:
- app_network
environment:
- ALLOW_EMPTY_PASSWORD=yes
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
timeout: 10s
retries: 3
volumes:
postgres_data:
driver: local
redis_data:
driver: local
clickhouse_data:
driver: local
clickhouse_logs:
driver: local
networks:
app_network:
driver: bridge