-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
134 lines (126 loc) · 3.31 KB
/
docker-compose.yaml
File metadata and controls
134 lines (126 loc) · 3.31 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
services:
frame:
build:
context: ./frame
dockerfile: Dockerfile
environment:
PORT: 3000
depends_on:
- studio
- paper
container_name: clutter
labels:
- traefik.enable=true
studio:
build:
context: ./studio
dockerfile: Dockerfile
environment:
BIND_ADDRESS: 0.0.0.0
DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/db
CLICKHOUSE_URL: clickhouse://clickhouse:9000?username=${CLICKHOUSE_USER}&password=${CLICKHOUSE_PASSWORD}&database=db
PORT: 8081
JWT_SECRET: ${JWT_SECRET}
SMTP_HOST: ${SMTP_HOST}
SMTP_PORT: $SMTP_PORT}
SMTP_FROM: ${SMTP_FROM}
SMTP_USERNAME: ${SMTP_USERNAME}
SMTP_PASSWORD: ${SMTP_PASSWORD}
depends_on:
db:
condition: service_healthy
clickhouse:
condition: service_healthy
migrate:
condition: service_completed_successfully
container_name: studio
labels:
- traefik.enable=true
paper:
build:
context: ./paper
dockerfile: Dockerfile
environment:
BIND_ADDRESS: 0.0.0.0
DATABASE_URL: clickhouse://clickhouse:9000?username=${CLICKHOUSE_USER}&password=${CLICKHOUSE_PASSWORD}&database=db
POSTGRES_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/db
REDIS_URL: redis://:${REDIS_PASSWORD}@redis:6379
PORT: 8080
depends_on:
redis:
condition: service_healthy
db:
condition: service_healthy
clickhouse:
condition: service_healthy
migrate:
condition: service_completed_successfully
container_name: paper
labels:
- traefik.enable=true
db:
image: postgres:16-alpine
volumes:
- db_data:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: db
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d db"]
interval: 10s
timeout: 5s
retries: 5
migrate:
image: migrate/migrate
volumes:
- ./studio/migrations:/migrations
command:
[
"-path",
"/migrations",
"-database",
"postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/db?sslmode=disable",
"up",
]
depends_on:
db:
condition: service_healthy
clickhouse:
image: clickhouse/clickhouse-server:25.3.2-alpine
ulimits:
nofile:
soft: 262144
hard: 262144
volumes:
- clickhouse_data:/var/lib/clickhouse
- clickhouse_log:/var/log/clickhouse-server
- ./clickhouse/init:/docker-entrypoint-initdb.d
healthcheck:
test: ["CMD", "clickhouse-client", "--query", "SELECT 1"]
interval: 10s
timeout: 5s
retries: 5
environment:
CLICKHOUSE_USER: ${CLICKHOUSE_USER}
CLICKHOUSE_PASSWORD: ${CLICKHOUSE_PASSWORD}
redis:
image: redis:7-alpine
command:
- /bin/sh
- -c
- redis-server --requirepass "$${REDIS_PASSWORD:?REDIS_PASSWORD variable is not set}"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
environment:
REDIS_PASSWORD: ${REDIS_PASSWORD:?}
volumes:
db_data:
clickhouse_data:
clickhouse_log:
redis_data: