This repository has been archived by the owner on Jul 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
82 lines (64 loc) · 2.08 KB
/
Makefile
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
#!/usr/bin/make
build: # build all containers
if [ -d "pgdata" ]; then sudo chmod -R 755 pgdata; fi
docker build -t interns-backend:latest -t registry.digitalocean.com/akatsuki/interns-backend:latest .
run-bg: # run all containers in the background
docker-compose up -d \
interns-backend \
postgres \
redis
run: # run all containers in the foreground
docker-compose up \
interns-backend \
postgres \
redis
stop: # stop all containers
docker-compose down
lint: # run pre-commit hooks
pre-commit run -a
logs: # attach to the containers live to view their logs
docker-compose logs -f
test: # run the tests
docker-compose exec interns-backend /scripts/run-tests.sh
test-dbg: # run the tests in debug mode
docker-compose exec interns-backend /scripts/run-tests.sh --dbg
view-cov: # open the coverage report in the browser
if grep -q WSL2 /proc/sys/kernel/osrelease; then \
wslview tests/htmlcov/index.html; \
else \
xdg-open tests/htmlcov/index.html; \
fi
up-migrations: # apply up migrations from current state
docker-compose exec interns-backend /scripts/migrate-db.sh up
down-migrations: # apply down migrations from current state
docker-compose exec interns-backend /scripts/migrate-db.sh down
up-seeds: # apply up seeds from current state
docker-compose exec interns-backend /scripts/seed-db.sh up
down-seeds: # apply down seeds from current state
docker-compose exec interns-backend /scripts/seed-db.sh down
push:
docker push registry.digitalocean.com/akatsuki/interns-backend:latest
install:
helm install \
--atomic \
--wait --timeout 480s \
--values chart/values.yaml \
interns-backend-staging \
../akatsuki/common-helm-charts/microservice-base/
uninstall:
helm uninstall \
--wait --timeout 480s \
interns-backend-staging
upgrade:
helm upgrade \
--atomic \
--wait --timeout 480s \
--values chart/values.yaml \
interns-backend-staging \
../akatsuki/common-helm-charts/microservice-base/
diff:
helm diff upgrade \
--allow-unreleased \
--values chart/values.yaml \
interns-backend-staging \
../akatsuki/common-helm-charts/microservice-base/