-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile.tt
More file actions
45 lines (30 loc) · 1.22 KB
/
Copy pathMakefile.tt
File metadata and controls
45 lines (30 loc) · 1.22 KB
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
app-setup: app-build app-db-create
app-build:
docker-compose build
app-up:
docker-compose up
app-backend-ash:
docker-compose run --rm backend ash
app-backend-console:
docker-compose run --rm backend bundle exec rails c
app-db-psql:
docker-compose run --rm core psql -d <%= app_name.underscore %>_development -U postgres -W -h db
app-db-prepare: app-db-create app-db-migrate
app-db-create:
docker-compose run --rm backend rails db:create RAILS_ENV=development
app-db-migrate:
docker-compose run --rm backend rails db:migrate
app-db-seed:
docker-compose run --rm backend rails db:seed
app-db-reset:
docker-compose run --rm backend rails db:reset
app-db-drop:
docker-compose run --rm backend rails db:drop
TEST_PATH := $(or $(TEST_PATH),spec/)
test:
docker-compose run -e DATABASE_URL=postgresql://postgres@db/<%= app_name.underscore %>_test -e RAILS_ENV=test--rm backend rspec $(TEST_PATH)
test-db-prepare:
docker-compose run -e DATABASE_URL=postgresql://postgres@db/<%= app_name.underscore %>_test -e RAILS_ENV=test --rm backend rails db:test:prepare
test-db-drop:
docker-compose run -e DATABASE_URL=postgresql://postgres@db/<%= app_name.underscore %>_test -e RAILS_ENV=test --rm backend rails db:drop
.PHONY: app-up test