-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
67 lines (52 loc) · 1.3 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
58
59
60
61
62
63
64
65
66
67
default:
@air -c .air.toml
restart: generate css js
generate:
@go generate
css:
@node_modules/.bin/tailwindcss \
--input ./dist/main.scss \
--output resources/main.css \
--config ./tailwind.config.js
js:
@node_modules/.bin/esbuild \
--bundle \
--minify \
--outdir=resources \
--platform=browser \
--format=esm \
./dist/main.js
# database
migration_status:
@atlas migrate status \
--dir "file://migrations" \
--url "sqlite://georgslauf.db"
migration_generate migration_name="migration":
@atlas migrate diff {{ migration_name }} \
--dir "file://migrations" \
--to "file://schema.hcl" \
--dev-url "sqlite://file?mode=memory"
migration_apply:
@atlas migrate apply \
--dir "file://migrations" \
--url "sqlite://georgslauf.db"
# build
container_update: build_arm_container save_arm_image copy_arm_image
build_arm_container:
@podman build \
-f arm64.containerfile \
--platform linux/arm64 \
-t localhost/georgslauf:latest \
.
save_arm_image:
@rm ./georgslauf.tar.gz
@podman save localhost/georgslauf:latest \
-o georgslauf.tar.gz
copy_arm_image:
@echo "confirm"
@scp ./georgslauf.tar.gz georgslauf:~/containers/georgslauf/
migrations_save:
@tar -czf migrations.tar.gz migrations
migrations_copy:
@echo "confirm"
@scp migrations.tar.gz georgslauf:~/containers/georgslauf/