-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (33 loc) · 1009 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
43
44
45
46
include .env
export
.PHONY: dev css templates air stop db goose bootstrap deploy ngrok sync test
ngrok:
docker run -it -e NGROK_AUTHTOKEN="${NGROK_TOKEN}" ngrok/ngrok:latest http host.docker.internal:1323
dev:
make db && make goose && make air & make templates & make css
db:
docker compose up -d
sleep 3
goose: db
cd ./internal/repositories/schema && GOOSE_DRIVER=turso GOOSE_DBSTRING="${LOCAL_DB_URL}" goose up
bootstrap: goose
go run ./cmd/admin/main.go create-user --email "${LOCAL_USER}" --password "${LOCAL_PASSWORD}"
air:
air
templates:
templ generate --watch
css:
npx tailwindcss -i ./static/css/input.css -o ./static/css/main.css --watch --minify
deploy:
cd terraform && terraform apply -var-file="secret.tfvars" --auto-approve && cd .. && make sync
sync:
@echo "Syncing S3 bucket..."
aws s3 sync static/ "${S3_URI}" --delete
test:
go test ./... -v
stop:
pkill -f "air" || true
pkill -f "templ" || true
pkill -f "tailwindcss" || true
docker compose down
templ generate