forked from aceleradora-TW/conecta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (41 loc) · 1.19 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
build:
@echo "Building Application"
docker-compose build
run:build
@echo "Starting Server"
docker-compose up web db
bash:
@echo "Starting Application Bash"
docker-compose run web bash
stop:
docker-compose stop
ps:
docker-compose ps
js-install:
npm install
test:
@echo "Starting Tests"
docker-compose up web_test
js-test:
npm test
db-start:
docker-compose up -d db
db-console:db-start
@echo "Starting psql console..."
@docker-compose exec db psql -d test_db -U test
db-reset:db-start
@echo "Cleaning up database..."
@docker-compose run web rake db:reset
@echo "Selecting count of institutions:"
@docker-compose exec -T db psql -d test_db -U test -c 'SELECT count(id) from institutions;'
db-migrate:db-start
@echo "Migrating database structure"
@docker-compose run web rake db:migrate
@echo "Created the following entities in test_db database:"
@docker-compose exec -T db psql -d test_db -U test -c '\d'
db-seed:db-migrate
@echo "Importing Data from CSV"
@docker-compose run web rake db:seed
@docker-compose run web rake db:seed_test_users
@echo "Selecting count of inserted institutions:"
@docker-compose exec -T db psql -d test_db -U test -c 'SELECT count(id) from institutions;'