-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
46 lines (35 loc) · 848 Bytes
/
Copy pathmakefile
File metadata and controls
46 lines (35 loc) · 848 Bytes
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
include services/chat/.env
export
.PHONY: up down build rebuild logs migrate-up migrate-down restart web infra
# Start everything (DB + Redis + Web)
up:
docker compose up -d
# Start only infrastructure
infra:
docker compose up -d db redis
# Start web only
web:
docker compose up web
# Stop everything
down:
docker compose down
# Build images
build:
docker compose build
# Force rebuild
rebuild:
docker compose build --no-cache
# View logs
logs:
docker compose logs -f
# Run migrations up
migrate-up:
docker compose --profile tools run --rm migrate \
migrate -path /app/migrations -database $$DATABASE_URL up
# Rollback one migration
migrate-down:
docker compose --profile tools run --rm migrate \
migrate -path /app/migrations -database $$DATABASE_URL down 1
# Restart web container
restart:
docker compose restart web