-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjustfile
More file actions
68 lines (47 loc) · 1.46 KB
/
justfile
File metadata and controls
68 lines (47 loc) · 1.46 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# vim: set ft=make :
# If Just isn't installed, install it with homebrew
# brew install just
set dotenv-load
appname := 'sonosnow'
binname := 'pr'
deps:
mix deps.get
migrate:
mix ecto.migrate
start_pg:
brew services start postgresql@14
stop:
brew services stop postgresql@14
setup: deps start_pg migrate
echo "You'll need to enter a pasword in a min" && \
echo "It's just for development, so you you use 1234 you wont have to edit config/{dev|test}.exs" && \
createuser -P -s -e {{binname}}_user && echo "User created" || echo "User not created, never mind, maybe you already did?" && \
mix ecto.setup
dev: deps start_pg migrate
mix phx.server
iex:
iex --erl "-kernel shell_history enabled" -S mix
rollback:
mix ecto.rollback
test_watch: deps start_pg migrate
mix test.watch
test: deps start_pg migrate
mix test
format_code:
mix format mix.exs "lib/**/*.{ex,exs}" "test/**/*.{ex,exs}"
proxy_production:
fly proxy 5433:5432 --app {{appname}}-db
proxy_staging:
fly proxy 5433:5432 --app {{appname}}-staging-db
console_staging:
fly ssh console --app {{appname}}-staging
console_production:
fly ssh console --app {{appname}}
remote_staging:
fly ssh console -C "/home/elixir/app/bin/{{binname}} remote" --app {{appname}}-staging
remote_production:
fly ssh console -C "/home/elixir/app/bin/{{binname}} remote" --app {{appname}}
tunnel:
cloudflared tunnel run --token ${CLOUDFLARE_TOKEN}
clear:
fly ssh console --app {{appname}} --command ./scripts/clear.sh