-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
86 lines (62 loc) · 1.32 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
83
84
85
86
WEB_DIR = web
SCRIPTS_DIR = scripts
# ----------
# Server
# ----------
check:
cargo clippy
fix:
cargo fmt
cargo fix --allow-dirty
run:
PORT=3000 cargo run --bin omics
production-run:
PORT=3000 ENV=production cargo run --bin omics
dependencies:
cargo update
build: dependencies
cargo build --release
api-test:
$(MAKE) -C $(SCRIPTS_DIR) test
clean-db:
$(MAKE) -C $(SCRIPTS_DIR) clean-db
migrate:
$(MAKE) -C $(SCRIPTS_DIR) migrate
populate:
$(MAKE) -C $(SCRIPTS_DIR) populate
old-populate:
$(MAKE) -C $(SCRIPTS_DIR) old-populate
test:
cargo test --color always
update-samples:
$(MAKE) -C $(SCRIPTS_DIR) update-samples
backup:
./scripts/scripts/backup.sh
# ----------
# Web
# ----------
web-run:
$(MAKE) -C $(WEB_DIR) run
web-dependencies:
$(MAKE) -C $(WEB_DIR) dependencies
web-build: web-dependencies
$(MAKE) -C $(WEB_DIR) build
web-deploy: web-build
$(MAKE) -C $(WEB_DIR) deploy
# ----------
# Docker
# ----------
SERVICES = \
postgres postgres-pgadmin \
redis redis-commander
docker-up:
docker-compose up -d $(SERVICES)
docker-down:
docker-compose down
docker:
docker build -t aboglioli/omics-server:latest .
docker push aboglioli/omics-server:latest
heroku: docker
docker tag aboglioli/omics-server registry.heroku.com/omics/web
docker push registry.heroku.com/omics/web
heroku container:release web