-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
109 lines (103 loc) · 2.5 KB
/
docker-compose.yml
File metadata and controls
109 lines (103 loc) · 2.5 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
# version: "3.8"
services:
clickhouse:
image: clickhouse/clickhouse-server:23.12
container_name: elysia-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.1
container_name: elysia-postgres
restart: unless-stopped
environment:
POSTGRES_DB: elysia_db
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:7-alpine
container_name: elysia-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
app:
build: .
container_name: elysia-app
restart: unless-stopped
environment:
DATABASE_URL: postgres://postgres:postgres@postgres:5432/elysia_db
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: password123
REDIS_DB: 0
PORT: 3000
ports:
- "3000:3000"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
- app_network
volumes:
postgres_data:
driver: local
redis_data:
driver: local
clickhouse_data:
driver: local
clickhouse_logs:
driver: local
networks:
app_network:
driver: bridge