forked from OperationCode/operationcode_old_site
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (33 loc) · 793 Bytes
/
Makefile
File metadata and controls
47 lines (33 loc) · 793 Bytes
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
RAILS_CONTAINER := web
.PHONY: all
all: run
.PHONY: run
run:
docker-compose up --build
.PHONY: open
open:
open http://localhost:3000
.PHONY: build
build:
docker-compose build
.PHONY: console
console:
docker-compose run ${RAILS_CONTAINER} rails console
.PHONY: db_create
db_create:
docker-compose run ${RAILS_CONTAINER} rake db:create
.PHONY: db_migrate
db_migrate:
docker-compose run ${RAILS_CONTAINER} rake db:migrate
.PHONY: test
test:
docker-compose run ${RAILS_CONTAINER} bash -c 'export RAILS_ENV=test && rake db:test:prepare && rake db:seed && rake test'
.PHONY: blog
blog:
docker-compose run ${RAILS_CONTAINER} bash -c 'cd /app && bin/build_blog'
setup: db_create db_migrate
publish: build
bin/publish
upgrade: publish
bin/rancher_update
travis: build blog test