-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (35 loc) · 885 Bytes
/
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
COMPOSE_FILE = docker-compose.yml
.PHONY: all
all: build
.PHONY: up
up:
docker-compose -f $(COMPOSE_FILE) up --build
.PHONY: up-terminal
up-terminal:
docker-compose -f $(COMPOSE_FILE) up --build -d
.PHONY: down
down:
docker-compose -f $(COMPOSE_FILE) down
.PHONY: test-server
test-server:
docker-compose -f $(COMPOSE_FILE) run --rm server bundle exec rspec
.PHONY: test-app
test-app:
docker-compose -f $(COMPOSE_FILE) run --rm app bundle exec rspec
.PHONY: test
test: test-server test-app
.PHONY: import
import:
docker exec exams-server ruby import_from_csv.rb
.PHONY: server-bash
server-bash:
docker-compose -f $(COMPOSE_FILE) run server /bin/bash
.PHONY: app-bash
app-bash:
docker-compose -f $(COMPOSE_FILE) run app /bin/bash
.PHONY: sql
sql:
docker exec -it exams-db psql -U my_user -d my_database
.PHONY: clean
clean:
docker-compose -f $(COMPOSE_FILE) down -v