-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
57 lines (48 loc) · 1.15 KB
/
justfile
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
set dotenv-load
default:
@just --choose
# Connect with the database
db:
usql $(echo $DATABASE_URL)
# Start the docker containers
start:
docker compose up
# Run the backend server, to migrate run `just run migrate`
run argv="@":
#!/usr/bin/env bash
set -euxo pipefail
if [[ {{ argv }} == "migrate" ]]
then
go run cmd/main.go -migrate
else
go run cmd/main.go
fi
redis argv="session":
#!/usr/bin/env bash
set -euxo pipefail
if [[ {{ argv }} == "session" ]]
then
nc localhost 6379 -v
elif [[ {{ argv }} == "email" ]]
then
nc localhost 6381 -v
elif [[ {{ argv }} == "system" ]]
then
nc localhost 6382 -v
elif [[ {{ argv }} == "ratelimiter" ]]
then
nc localhost 6380 -v
elif [[ {{ argv }} == "challenge" ]]
then
nc localhost 6383 -v
else
echo "Not a valid Redis database"
fi
test argv1 argv2 argument1="" argument2="" argument3="" argument4="":
#!/usr/bin/env bash
set -euxo pipefail
path="tests/{{ argv1 }}/{{ argv2 }}.lua"
lua "$path" {{ argument1 }} {{ argument2 }} {{ argument3 }} {{ argument4 }}
env:
doppler secrets download --no-file --format env > .env
cp .env ./api/Auth\ server