-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
42 lines (34 loc) · 974 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
console:
bundle exec rails console
dev:
bin/dev
server:
bin/rails s -p 3010
jobs:
bin/jobs start
# job=DailyReportJob make enqueue
enqueue:
bin/rake jobs:enqueue
# config=.env.deploy.staging make deploy
.ONESHELL:
deploy:
export DEPLOY_REGISTRY_PASSWORD=`aws ecr get-login-password --profile docker`
dotenv -f $(config) kamal deploy
test_prepare:
RAILS_ENV=test bin/rake db:migrate
# file=./test/models/scheduler_test.rb make test
.PHONY: test
test:
bin/rails test $(file)
prepare_database:
mysql <<-EOF
create database scheduler_development;
grant all privileges on scheduler_development.* to 'user'@'%';
create database scheduler_development_cache;
grant all privileges on scheduler_development_cache.* to 'user'@'%';
create database scheduler_development_queue;
grant all privileges on scheduler_development_queue.* to 'user'@'%';
create database scheduler_test;
grant all privileges on scheduler_test.* to 'user'@'%';
EOF
bin/rake db:prepare