-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathMakefile
More file actions
445 lines (403 loc) Β· 22.6 KB
/
Copy pathMakefile
File metadata and controls
445 lines (403 loc) Β· 22.6 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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
# =============================================================================
# Root Makefile - Full Stack Docker Orchestration
# Manages: Hocuspocus Server + Webapp + Infrastructure
# =============================================================================
.PHONY: help build build-dev build-prod-ci build-prod-backend run-prod-backend up-prod up-dev infra-up infra-down infra-logs dev-local dev-backend down logs logs-webapp logs-backend restart clean scale-webapp scale-hocuspocus ps stats deploy-prod rollback-prod status-prod logs-traefik swarm-demo swarm-stress
help:
@echo "Docsplus Full Stack Docker Commands"
@echo ""
@echo "Building:"
@echo " make build - Build all services (production)"
@echo " make build-dev - Build all services (development)"
@echo " make build-prod-ci - Build prod images with stub env (no .env.production needed)"
@echo " make build-prod-backend - Build only backend prod images (rest-api, hocuspocus, worker)"
@echo ""
@echo "Running:"
@echo " make up-prod - Start all services (production)"
@echo " make up-dev - Start all services (development - Docker)"
@echo ""
@echo "Local Development (one command):"
@echo " make dev-local - Install/deps, DB, Supabase, backend + webapp"
@echo " make dev-backend - Same bootstrap, backend processes only"
@echo " make infra-up - Start Postgres + Redis only"
@echo " make infra-down - Stop Postgres + Redis"
@echo " make infra-logs - Tail Postgres + Redis logs"
@echo ""
@echo "Individual processes (Bun, not Make):"
@echo " bun run dev - Frontend (webapp)"
@echo " bun run dev:admin - Admin dashboard"
@echo " bun --filter @docs.plus/hocuspocus dev:rest - REST API"
@echo " bun --filter @docs.plus/hocuspocus dev:ws - WebSocket server"
@echo " bun --filter @docs.plus/hocuspocus dev:worker - Worker"
@echo " bun --filter @docs.plus/supabase_back start|stop - Supabase up / down"
@echo ""
@echo "Document swarm (local/stage only β @docs.plus/document-swarm):"
@echo " make swarm-demo URL=<doc> - Watchable multi-user demo (headed; Ctrl+C to stop)"
@echo " make swarm-stress URL=<doc> - Concurrent load run (headless, bounded)"
@echo " vars: URL (required), USERS=<n>, ARGS=\"--shuffle --duration 2m --force\""
@echo " provision the pool once first:"
@echo " bun run --filter @docs.plus/document-swarm provision --count <n>"
@echo ""
@echo "Production Deployment (Traefik):"
@echo " make deploy-prod - Deploy full stack with Traefik"
@echo " make rollback-prod - Rollback to previous deployment"
@echo " make status-prod - Check production status"
@echo " make logs-traefik - View Traefik logs"
@echo ""
@echo "Scaling (production only):"
@echo " make scale-webapp - Scale webapp to 3 replicas"
@echo " make scale-hocuspocus - Scale hocuspocus services"
@echo ""
@echo "Management:"
@echo " make down - Stop all services (auto-detects dev/prod/local)"
@echo " make logs - View all logs (auto-detects dev/prod/local)"
@echo " make logs-webapp - View webapp logs (auto-detects dev/prod)"
@echo " make logs-backend - View backend logs (rest-api, hocuspocus-server, worker) (auto-detects dev/prod)"
@echo " make restart - Restart all services (auto-detects dev/prod)"
@echo " make clean - Clean everything (auto-detects dev/prod/local)"
@echo ""
@echo "Utilities:"
@echo " make ps - Show running containers (auto-detects dev/prod/local)"
@echo " make stats - Show resource usage"
# =============================================================================
# BUILD COMMANDS
# =============================================================================
build:
@echo "ποΈ Building all services (production)..."
@docker compose -f docker-compose.prod.yml --env-file .env.production build
@echo "β
All services built"
# Build prod images with stub env β run before push to catch Docker build failures.
# Does not require .env.production. Uses same compose + BuildKit as CI deploy.
build-prod-ci:
@echo "ποΈ Validating production Docker build (stub env)..."
@test -f scripts/env.production.build-stub || (echo "β scripts/env.production.build-stub missing"; exit 1)
DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 docker compose -f docker-compose.prod.yml --env-file scripts/env.production.build-stub build --parallel
@echo "β
Production build validation passed"
# Build only backend (rest-api, hocuspocus-server, hocuspocus-worker) prod images. Same image, 3 services.
# Use before pushing to verify backend Dockerfile builds.
build-prod-backend:
@echo "ποΈ Building backend production images (rest-api, hocuspocus-server, hocuspocus-worker)..."
@test -f scripts/env.production.build-stub || (echo "β scripts/env.production.build-stub missing"; exit 1)
DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 docker compose -f docker-compose.prod.yml --env-file scripts/env.production.build-stub build rest-api hocuspocus-server hocuspocus-worker
@echo "β
Backend production images built"
# Run backend prod images locally: Redis + rest-api + hocuspocus-server + hocuspocus-worker (1 replica each).
# Uses .env.local for DATABASE_URL and secrets. No Traefik; override publishes 4000/4001/4002.
run-prod-backend: build-prod-backend
@test -f .env.local || (echo "β .env.local required (DATABASE_URL, SUPABASE_*, JWT_SECRET, etc.)"; exit 1)
@echo "π Starting backend (prod images) + Redis locally..."
# DEPLOY_TAG must match build-prod-backend's build-stub tag, else compose looks for :latest.
DEPLOY_TAG=build-validate DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 docker compose -f docker-compose.prod.yml -f docker-compose.backend-local.override.yml --env-file .env.local up -d redis rest-api hocuspocus-server hocuspocus-worker
@echo "β
Backend running. REST: http://localhost:4000 WS: ws://localhost:4001 Health: http://localhost:4000/health"
@echo " make logs-backend - view logs"
build-dev:
@echo "ποΈ Building all services (development)..."
@docker compose -f docker-compose.dev.yml --env-file .env.development build
@echo "β
All services built"
# =============================================================================
# RUN COMMANDS
# =============================================================================
up-prod: build
@echo "π Starting full stack production environment (Traefik)..."
@echo ""
@echo "Services:"
@echo " π Traefik (ports 80, 443) - reverse proxy + SSL"
@echo " π΄ Redis (internal) - cache & pub/sub"
@echo " π REST API - 2 replicas"
@echo " π Hocuspocus WS - 2 replicas"
@echo " βοΈ Worker - 1 replica"
@echo " π» Webapp - 2 replicas"
@echo ""
@docker compose -f docker-compose.prod.yml --env-file .env.production up -d \
--scale rest-api=2 \
--scale hocuspocus-server=2 \
--scale hocuspocus-worker=1 \
--scale webapp=2
@echo ""
@echo "β
Full stack started!"
@echo ""
@echo "URLs:"
@echo " Webapp: https://docs.plus"
@echo " API: https://prodback.docs.plus/api"
@echo " WebSocket: wss://prodback.docs.plus/hocuspocus"
@echo " Dashboard: https://traefik.docs.plus"
@echo ""
@echo "Commands:"
@echo " make logs - View all logs"
@echo " make logs-traefik - View Traefik logs"
@echo " make status-prod - Check production status"
@echo " make down - Stop all services"
up-dev: build-dev
@echo "π Starting full stack development environment..."
@echo "π§Ή Cleaning up any existing containers..."
@docker compose -f docker-compose.dev.yml --env-file .env.development down 2>/dev/null || true
@CONTAINERS=$$(docker ps -a -q --filter "name=docsy-" 2>/dev/null); \
if [ -n "$$CONTAINERS" ]; then \
echo "Removing stale containers..."; \
docker rm -f $$CONTAINERS 2>/dev/null || true; \
fi
@echo ""
@if [ ! -f .env.development ]; then \
echo "β .env.development missing β run: cp .env.example .env.development"; \
exit 1; \
fi
@echo "Services:"
@echo " π¦ PostgreSQL (port 5432)"
@echo " π΄ Redis (port 6379)"
@echo " π REST API (port 4000) - hot reload enabled"
@echo " π Hocuspocus WS (port 4001) - hot reload enabled"
@echo " βοΈ Worker (port 4002) - hot reload enabled"
@echo " π» Webapp (port 3000) - hot reload enabled"
@echo ""
@docker compose -f docker-compose.dev.yml --env-file .env.development up -d
@echo ""
@echo "β
Development environment started!"
@echo ""
@echo "Access points:"
@echo " Webapp: http://localhost:3000"
@echo " REST API: http://localhost:4000"
@echo " WebSocket: ws://localhost:4001"
@echo " Worker: http://localhost:4002"
@echo " PostgreSQL: localhost:5432"
@echo " Redis: localhost:6379"
@echo ""
@echo "π‘ Hot reload is enabled - code changes will auto-reload"
@echo ""
@echo "Common commands:"
@echo " make logs - View all logs (auto-detects dev/prod)"
@echo " make logs-webapp - View webapp logs (auto-detects dev/prod)"
@echo " make logs-backend - View backend logs (auto-detects dev/prod)"
@echo " make ps - Show running containers (auto-detects dev/prod)"
@echo " make down - Stop all services (auto-detects dev/prod)"
@echo " make restart - Restart all services (auto-detects dev/prod)"
# =============================================================================
# LOCAL DEVELOPMENT COMMANDS (Infrastructure Only in Docker)
# =============================================================================
infra-up:
@echo "π Starting infrastructure services (PostgreSQL + Redis)..."
@if [ ! -f .env.local ]; then \
if [ ! -f .env.development ]; then \
echo "β .env.local missing and .env.development not found"; exit 1; \
fi; \
echo "β’ Creating .env.local from .env.development β review secrets"; \
cp .env.development .env.local; \
fi
@docker compose -f docker-compose.local.yml --env-file .env.local up -d --wait
@echo ""
@echo "β
Infrastructure started!"
@echo ""
@echo "Services:"
@echo " π¦ PostgreSQL: localhost:$${DB_PORT:-5432}"
@echo " π΄ Redis: localhost:$${REDIS_PORT:-6379}"
@echo ""
@echo "Next: make dev-local"
infra-down:
@echo "π Stopping infrastructure services..."
@docker compose -f docker-compose.local.yml --env-file .env.local down
@echo "β
Infrastructure stopped"
infra-logs:
@echo "π Infrastructure logs..."
@docker compose -f docker-compose.local.yml --env-file .env.local logs -f
# Bootstraps env/deps/DB/extensions then starts processes (implementation: scripts/dev-local-preflight.ts).
dev-local:
@bun scripts/dev-local-preflight.ts
@echo "π Starting local development (REST + WS + Worker + Webapp)..."
@bunx concurrently --kill-others-on-fail -n "REST,WS,WORKER,WEBAPP" -c "blue,green,yellow,magenta" \
"bun --filter @docs.plus/hocuspocus dev:rest" \
"bun --filter @docs.plus/hocuspocus dev:ws" \
"bun --filter @docs.plus/hocuspocus dev:worker" \
"bun --filter @docs.plus/webapp dev"
dev-backend:
@bun scripts/dev-local-preflight.ts
@echo "π Starting backend services (REST API, WebSocket, Worker)..."
@bunx concurrently --kill-others-on-fail -n "REST,WS,WORKER" -c "blue,green,yellow" \
"bun --filter @docs.plus/hocuspocus dev:rest" \
"bun --filter @docs.plus/hocuspocus dev:ws" \
"bun --filter @docs.plus/hocuspocus dev:worker"
# =============================================================================
# DOCUMENT SWARM (local/stage bot β @docs.plus/document-swarm)
# =============================================================================
# Sugar over `bun run --filter @docs.plus/document-swarm run β¦`. Provision the actor
# pool once first: `bun run --filter @docs.plus/document-swarm provision --count <n>`.
# Vars: URL=<doc-url> (required), USERS=<n>, ARGS="--shuffle --duration 2m --force".
# The tool itself refuses non-local/stage hosts and enforces per-host actor caps.
SWARM_RUN = bun run --filter @docs.plus/document-swarm run
swarm-demo:
@test -n "$(URL)" || { echo "β URL is required β e.g. make swarm-demo URL=http://localhost:3000/<slug>"; exit 1; }
@$(SWARM_RUN) --mode demo --url "$(URL)" $(if $(USERS),--users $(USERS)) $(ARGS)
swarm-stress:
@test -n "$(URL)" || { echo "β URL is required β e.g. make swarm-stress URL=http://localhost:3000/<slug>"; exit 1; }
@$(SWARM_RUN) --mode stress --url "$(URL)" $(if $(USERS),--users $(USERS)) $(ARGS)
# =============================================================================
# SCALING COMMANDS
# =============================================================================
scale-webapp:
@echo "π Scaling webapp to 3 replicas..."
@docker compose -f docker-compose.prod.yml --env-file .env.production up -d --scale webapp=3
@echo "β
Webapp scaled to 3 replicas"
scale-hocuspocus:
@echo "π Scaling hocuspocus services..."
@docker compose -f docker-compose.prod.yml --env-file .env.production up -d --scale rest-api=3 --scale hocuspocus-server=5 --scale hocuspocus-worker=3
@echo "β
Hocuspocus services scaled"
# =============================================================================
# MANAGEMENT COMMANDS
# =============================================================================
down:
@if docker compose -f docker-compose.dev.yml --env-file .env.development ps -q 2>/dev/null | grep -q .; then \
echo "π Stopping all services (development)..."; \
docker compose -f docker-compose.dev.yml --env-file .env.development down; \
echo "β
All services stopped"; \
elif docker compose -f docker-compose.prod.yml --env-file .env.production ps -q 2>/dev/null | grep -q .; then \
echo "π Stopping all services (production)..."; \
docker compose -f docker-compose.prod.yml --env-file .env.production down; \
echo "β
All services stopped"; \
elif docker compose -f docker-compose.local.yml --env-file .env.local ps -q 2>/dev/null | grep -q .; then \
echo "π Stopping infrastructure services (local)..."; \
docker compose -f docker-compose.local.yml --env-file .env.local down; \
echo "β
Infrastructure stopped"; \
echo "π‘ Apps run natively - stop them with Ctrl+C; Supabase: bun --filter @docs.plus/supabase_back stop"; \
else \
echo "β οΈ No running containers found. Start with 'make dev-local' (local) or 'make up-dev' (Docker)"; \
fi
logs:
@if docker compose -f docker-compose.dev.yml --env-file .env.development ps -q 2>/dev/null | grep -q .; then \
echo "π Detected development environment - showing all logs..."; \
docker compose -f docker-compose.dev.yml --env-file .env.development logs -f; \
elif docker compose -f docker-compose.prod.yml --env-file .env.production ps -q 2>/dev/null | grep -q .; then \
echo "π Detected production environment - showing all logs..."; \
docker compose -f docker-compose.prod.yml --env-file .env.production logs -f; \
elif docker compose -f docker-compose.local.yml --env-file .env.local ps -q 2>/dev/null | grep -q .; then \
echo "π Local mode: infra logs below; app logs live in the 'make dev-local' terminal..."; \
docker compose -f docker-compose.local.yml --env-file .env.local logs -f; \
else \
echo "β οΈ No running containers found. Start with 'make dev-local' (local) or 'make up-dev' (Docker)"; \
fi
logs-webapp:
@if docker compose -f docker-compose.dev.yml --env-file .env.development ps -q webapp 2>/dev/null | grep -q .; then \
docker compose -f docker-compose.dev.yml --env-file .env.development logs -f webapp; \
elif docker compose -f docker-compose.prod.yml --env-file .env.production ps -q webapp 2>/dev/null | grep -q .; then \
docker compose -f docker-compose.prod.yml --env-file .env.production logs -f webapp; \
else \
echo "β οΈ Webapp container not found. Under 'make dev-local' the webapp runs natively β see the WEBAPP stream in that terminal"; \
fi
logs-backend:
@if docker compose -f docker-compose.dev.yml --env-file .env.development ps -q rest-api 2>/dev/null | grep -q .; then \
docker compose -f docker-compose.dev.yml --env-file .env.development logs -f rest-api hocuspocus-server hocuspocus-worker; \
elif docker compose -f docker-compose.prod.yml --env-file .env.production ps -q rest-api 2>/dev/null | grep -q .; then \
docker compose -f docker-compose.prod.yml --env-file .env.production logs -f rest-api hocuspocus-server hocuspocus-worker; \
else \
echo "β οΈ Backend containers not found. Under 'make dev-local' the backend runs natively β see the REST/WS/WORKER streams in that terminal"; \
fi
restart:
@if docker compose -f docker-compose.dev.yml --env-file .env.development ps -q 2>/dev/null | grep -q .; then \
echo "π Restarting all services (development)..."; \
docker compose -f docker-compose.dev.yml --env-file .env.development restart; \
echo "β
All services restarted"; \
elif docker compose -f docker-compose.prod.yml --env-file .env.production ps -q 2>/dev/null | grep -q .; then \
echo "π Restarting all services (production)..."; \
docker compose -f docker-compose.prod.yml --env-file .env.production restart; \
echo "β
All services restarted"; \
else \
echo "β οΈ No running containers found. Start with 'make dev-local' (local) or 'make up-dev' (Docker)"; \
fi
# =============================================================================
# CLEANUP COMMANDS
# =============================================================================
clean:
@if docker compose -f docker-compose.dev.yml --env-file .env.development ps -q 2>/dev/null | grep -q .; then \
echo "π§Ή Cleaning up (development)..."; \
docker compose -f docker-compose.dev.yml --env-file .env.development down -v; \
docker rmi docsplus-webapp:dev 2>/dev/null || true; \
echo "β
Development cleanup complete"; \
elif docker compose -f docker-compose.prod.yml --env-file .env.production ps -q 2>/dev/null | grep -q .; then \
echo "π§Ή Cleaning up (production)..."; \
docker compose -f docker-compose.prod.yml --env-file .env.production down -v; \
docker rmi docsplus-webapp:latest docsplus-hocuspocus:latest 2>/dev/null || true; \
echo "β
Production cleanup complete"; \
elif docker compose -f docker-compose.local.yml --env-file .env.local ps -q 2>/dev/null | grep -q .; then \
echo "π§Ή Cleaning up (local)..."; \
docker compose -f docker-compose.local.yml --env-file .env.local down -v; \
echo "β
Local cleanup complete"; \
else \
echo "π§Ή No running containers found. Cleaning up project images..."; \
docker rmi docsplus-webapp:dev docsplus-webapp:latest docsplus-hocuspocus:latest 2>/dev/null || true; \
docker volume rm docsy-postgres-dev docsy-redis-dev docsy-postgres-prod docsy-redis-prod docsy-postgres-local docsy-redis-local 2>/dev/null || true; \
docker network rm docsy-network-dev docsy-network docsy-network-local 2>/dev/null || true; \
echo "β
Cleanup complete"; \
fi
# =============================================================================
# UTILITY COMMANDS
# =============================================================================
ps:
@if docker compose -f docker-compose.dev.yml --env-file .env.development ps -q 2>/dev/null | grep -q .; then \
docker compose -f docker-compose.dev.yml --env-file .env.development ps; \
elif docker compose -f docker-compose.prod.yml --env-file .env.production ps -q 2>/dev/null | grep -q .; then \
docker compose -f docker-compose.prod.yml --env-file .env.production ps; \
elif docker compose -f docker-compose.local.yml --env-file .env.local ps -q 2>/dev/null | grep -q .; then \
docker compose -f docker-compose.local.yml --env-file .env.local ps; \
echo ""; \
echo "π‘ Apps are running natively (not shown above)"; \
else \
echo "β οΈ No running containers found. Start with 'make dev-local' (local) or 'make up-dev' (Docker)"; \
fi
stats:
@if docker compose -f docker-compose.dev.yml --env-file .env.development ps -q 2>/dev/null | grep -q .; then \
docker stats $$(docker compose -f docker-compose.dev.yml --env-file .env.development ps -q); \
elif docker compose -f docker-compose.prod.yml --env-file .env.production ps -q 2>/dev/null | grep -q .; then \
docker stats $$(docker compose -f docker-compose.prod.yml --env-file .env.production ps -q); \
else \
echo "β οΈ No running containers found. Start with 'make dev-local' (local) or 'make up-dev' (Docker)"; \
fi
# =============================================================================
# PRODUCTION DEPLOYMENT COMMANDS (Traefik)
# =============================================================================
deploy-prod:
@echo "π Deploying to production with Traefik..."
@if [ ! -f .env.production ]; then \
echo "β .env.production not found"; \
exit 1; \
fi
@echo "Building images..."
@docker compose -f docker-compose.prod.yml --env-file .env.production build
@echo "Deploying services (zero-downtime)..."
@docker compose -f docker-compose.prod.yml --env-file .env.production up -d \
--scale rest-api=2 \
--scale hocuspocus-server=2 \
--scale hocuspocus-worker=1 \
--scale webapp=2
@echo "β
Production deployed"
@docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}" | head -15
rollback-prod:
@echo "π Rolling back production..."
@PREV_TAG=$$(docker images docsplus-webapp --format "{{.Tag}}" | grep -v latest | head -1); \
if [ -n "$$PREV_TAG" ]; then \
echo "Rolling back to: $$PREV_TAG"; \
sed -i.bak "s/DEPLOY_TAG=.*/DEPLOY_TAG=$$PREV_TAG/" .env.production; \
docker compose -f docker-compose.prod.yml --env-file .env.production up -d; \
echo "β
Rollback complete"; \
else \
echo "β No previous version found"; \
fi
status-prod:
@echo "π Production Status"
@echo "===================="
@docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}" 2>/dev/null || echo "No containers running"
@echo ""
@echo "Traefik Dashboard: https://traefik.docs.plus"
@echo ""
@echo "Health Checks:"
@curl -sf https://docs.plus/api/health 2>/dev/null && echo " β
docs.plus" || echo " β docs.plus"
@curl -sf https://prodback.docs.plus/api/health 2>/dev/null && echo " β
prodback.docs.plus/api" || echo " β prodback.docs.plus/api"
logs-traefik:
@docker logs traefik -f --tail 100
# --- Observability (server-only; run on the prod droplet) ---
OBS_COMPOSE = docker-compose.observability.yml
OBS_ENV = /opt/projects/prod.docs.plus/.env.observability
.PHONY: observability-up observability-down observability-logs observability-pull
observability-up:
docker compose -f $(OBS_COMPOSE) --env-file $(OBS_ENV) up -d --remove-orphans
observability-down:
docker compose -f $(OBS_COMPOSE) --env-file $(OBS_ENV) down
observability-logs:
docker compose -f $(OBS_COMPOSE) --env-file $(OBS_ENV) logs -f --tail=200
observability-pull:
docker compose -f $(OBS_COMPOSE) --env-file $(OBS_ENV) pull