-
Notifications
You must be signed in to change notification settings - Fork 1
/
justfile
25 lines (19 loc) · 895 Bytes
/
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
set dotenv-load := true
region := env_var_or_default("region", "<your_region>")
endpoint_uri := env_var_or_default("endpoint_uri", "<your_lambda_endpoint_uri>")
repo_uri := env_var_or_default("repo_uri", "<your_ecr_repository_uri>")
image_name := env_var_or_default("image_name", "emojifinder")
default:
@just --list
auth:
account_id=$(aws sts get-caller-identity --query Account --output text) \
&& aws ecr get-login-password | docker login --username AWS --password-stdin ${account_id}.dkr.ecr.{{region}}.amazonaws.com
deploy:
docker build -t {{image_name}} . --platform=linux/amd64
docker tag {{image_name}} {{repo_uri}}
docker push {{repo_uri}}
serverless deploy
query query n="16":
@curl -s -X POST {{endpoint_uri}} -d '{"query": "{{query}}", "n": {{n}}}'
emojis query n="16":
@just query "{{query}}" "{{n}}" | jq -r .emojis[].symbol | tr '\n' ' '