forked from vtambourine/it61-rails
-
-
Notifications
You must be signed in to change notification settings - Fork 22
/
Makefile
23 lines (16 loc) · 793 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
prepare:
docker-compose -f docker/docker-compose.yml pull rails
docker-compose -f docker/docker-compose.yml run rails sh -c "yarn install && bundle install"
docker-compose -f docker/docker-compose.yml run rails sh -c "bin/rails db:setup"
build:
docker build -f docker/Dockerfile -t it52/rails:latest --cache-from it52/rails:latest .
lint:
docker-compose -f docker/docker-compose.yml run rails sh -c "bin/rubocop && yarn run lint"
rspec:
docker-compose -f docker/docker-compose.yml run rails sh -c "bundle exec rspec"
test: lint rspec
build_prod:
docker build -f docker/Dockerfile.production -t it52/rails:production --build-arg RAILS_MASTER_KEY --cache-from it52/rails:production .
publish_prod:
docker push it52/rails:production
build_and_publish_prod: build_prod publish_prod