Repository navigation
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
186 lines (176 loc) · 5.21 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
186 lines (176 loc) · 5.21 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# THIS DOCKER-COMPOSE.YML ONLY FOR DEVELOPMENT
# DO NOT USE IT IN PROD, PLEASE ~_~
services:
redis:
image: redis:7-alpine
restart: always
command: redis-server --appendonly yes
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
start_period: 5s
volumes:
- redis_data:/data
ports:
- "6379:6379"
clickhouse:
image: clickhouse/clickhouse-server:26.3.17.110
profiles: ["analytics"]
restart: unless-stopped
environment:
CLICKHOUSE_DB: ${CLICKHOUSE_DATABASE:-lunastore_analytics}
CLICKHOUSE_USER: ${CLICKHOUSE_USER:-analytics}
CLICKHOUSE_PASSWORD: ${CLICKHOUSE_PASSWORD:-analytics}
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: "1"
ports:
- "8123:8123"
- "9000:9000"
volumes:
- clickhouse_data:/var/lib/clickhouse
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://localhost:8123/ping || exit 1"]
interval: 10s
timeout: 5s
retries: 5
start_period: 20s
meilisearch:
image: getmeili/meilisearch:v1.53
restart: unless-stopped
environment:
MEILI_ENV: development
MEILI_MASTER_KEY: ${MEILI_MASTER_KEY:-dev-master-key}
# Allows in-place DB upgrade when the Meilisearch image version changes.
MEILI_UPGRADE_DB: "true"
volumes:
- meili_data:/meili_data
ports:
- "7700:7700"
healthcheck:
test: ["CMD-SHELL", "wget --no-verbose --spider http://127.0.0.1:7700/health || exit 1"]
interval: 10s
timeout: 5s
retries: 12
start_period: 30s
db:
image: postgres:18-alpine
container_name: lunastore_db
environment:
POSTGRES_DB: ${DB_NAME:-lunastore_dev}
POSTGRES_USER: ${DB_USER:-postgres}
POSTGRES_PASSWORD: ${DB_PASSWORD:-password}
PGDATA: /var/lib/postgresql/data/pgdata
ports:
- "5432:5432"
volumes:
- pg_data:/var/lib/postgresql/data
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U ${DB_USER:-postgres} -d ${DB_NAME:-lunastore}",
]
interval: 5s
timeout: 5s
retries: 5
lunaspire:
build: ./lunaspire/
image: lunaspire:local
env_file:
- ./lunaspire/.env
restart: unless-stopped
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- ./lunaspire/public:/root/public
- ./lunaspire/storage:/root/storage
ports:
- "6080:8080"
command: >
sh -c "./main"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/"]
interval: 10s
timeout: 5s
retries: 3
start_period: 5s
admin:
build: .
container_name: lunastore_admin
command: python manage.py runserver 0.0.0.0:8088 --nostatic
environment:
DJANGO_ROOT_URLCONF: lunastore.urls_private
ports:
- "8088:8088"
depends_on:
db:
condition: service_healthy
meilisearch:
condition: service_healthy
env_file:
- .env
volumes:
- .:/app
- static_volume:/app/static
- ./media:/root/lunastore/media
web:
build: .
container_name: lunastore_web
command: python manage.py runserver 0.0.0.0:9088 --nostatic
env_file:
- .env
ports:
- "9088:9088"
depends_on:
db:
condition: service_healthy
meilisearch:
condition: service_healthy
volumes:
- .:/app
- static_volume:/app/static
- ./media:/root/lunastore/media
api:
build: .
container_name: lunastore_api
command: python manage.py runserver 0.0.0.0:7088
environment:
DJANGO_ROOT_URLCONF: lunastore.urls_api
env_file:
- .env
ports:
- "7088:7088"
depends_on:
db:
condition: service_healthy
meilisearch:
condition: service_healthy
volumes:
- .:/app
- static_volume:/app/static
- ./media:/root/lunastore/media
worker:
build: .
container_name: lunastore_worker
command: python manage.py run_tasks_worker --continuous --interval 1.0
env_file:
- .env
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- .:/app
- ./media:/root/lunastore/media
volumes:
static_volume:
media_volume:
pg_data:
redis_data:
clickhouse_data:
meili_data: