-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjustfile
82 lines (69 loc) · 1.69 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
set dotenv-load
# List commands, default
default:
just --list
# Download new markets to cache
[working-directory: 'download']
download *args:
cargo run -r -- {{args}}
# Extract markets from cache
[working-directory: 'extract']
extract *args:
cargo run -r -- {{args}}
# Start the database containers
db-up:
docker compose up -d
# Stop the database containers
db-down:
docker compose down
# Stop the database containers
db-logs:
docker compose logs -f
# Get the database schema
db-run-sql file:
docker compose exec -T postgres psql \
--username=$POSTGRES_USER \
--dbname=$POSTGRES_DB \
< {{file}}
# Get the database schema
db-schema:
docker compose exec postgres pg_dump \
--username=$POSTGRES_USER \
--dbname=$POSTGRES_DB \
--schema-only
# Run a manual database backup
db-backup:
docker compose exec pgbackups /backup.sh
# Build the astro site
astro-build:
-docker run -it --rm \
-v .:/app \
-w /app/site \
-u "$(id -u):$(id -g)" \
-p 4321:4321 \
--name astro \
node:23-bookworm \
npx astro build
# Start the astro dev server
astro-dev:
-docker run -it --rm \
-v .:/app \
-w /app/site \
-u "$(id -u):$(id -g)" \
-p 4321:4321 \
--name astro \
node:23-bookworm \
npx astro dev --host
# Start a shell in the astro environment
astro-shell:
-docker run -it --rm \
-v .:/app \
-w /app/site \
-u "$(id -u):$(id -g)" \
-p 4321:4321 \
--name astro \
node:23-bookworm \
bash
# Build the site and deploy with rclone
deploy: astro-build
rclone sync site/dist $RCLONE_TARGET --progress