This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
85 lines (56 loc) · 1.55 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
SHELL=/bin/sh
UID := $(shell id -u)
GID := $(shell id -g)
# include .env
# export
setup: build db-prepare
build:
docker compose build
deps:
yarn install && rm -rf ./node_modules
bundle install
up:
docker compose up
down:
docker compose down
clear:
docker compose down -v --rmi all
creds:
EDITOR='code --wait' bin/rails credentials:edit
ash:
docker compose run --rm app ash
console:
docker compose run --rm app bundle exec rails c
yarn:
docker compose run --rm app yarn install
bundle:
docker compose run --rm app bundle install
rubocop:
docker compose run --rm app bundle exec rubocop --config /rails/config/rubocop.yml
rubocop-verbose:
docker compose run --rm app bundle exec rubocop
rubocopA:
docker compose run --rm app bundle exec rubocop --config /rails/config/rubocop.yml -A
db-psql:
docker compose run --rm app psql -d ${POSTGRES_DB} -U ${POSTGRES_USER} -W -h db
db-prepare: db-drop db-create db-migrate db-seed
db-create:
docker compose run --rm app bin/rails db:create RAILS_ENV=development
db-migrate:
docker compose run --rm app bin/rails db:migrate
db-rollback:
docker compose run --rm app bin/rails db:rollback
db-seed:
docker compose run --rm app bin/rails db:seed
db-reset:
docker compose run --rm app bin/rails db:reset
db-drop:
docker compose run --rm app bin/rails db:drop
deploy:
kamal deploy
ci-build:
docker compose build -q
ci-up-healthy: db-prepare
docker compose up -d --wait --wait-timeout 60
ci-rubocop: rubocop
ci-clear: clear