45 lines
1.1 KiB
Makefile
45 lines
1.1 KiB
Makefile
_default:
|
|
@just --unsorted --list
|
|
|
|
check:
|
|
bc-check
|
|
|
|
fmt:
|
|
fd --extension=rs --exec-batch leptosfmt
|
|
bc-fmt
|
|
|
|
serve:
|
|
RUST_LOG=debug RUST_BACKTRACE=1 cargo leptos watch -- serve
|
|
|
|
build-release:
|
|
rm -rf dist
|
|
mkdir dist
|
|
cargo leptos build --release -vv
|
|
cp target/release/ascend dist/
|
|
cp -r target/site dist/
|
|
|
|
run-release:
|
|
#!/usr/bin/env bash
|
|
cd dist
|
|
LEPTOS_SITE_ROOT="site" LEPTOS_SITE_ADDR="127.0.0.1:1337" ./ascend serve
|
|
|
|
reset-state:
|
|
cargo run --features ssr -- reset-state
|
|
|
|
# Open firewall port for development
|
|
open-firewall:
|
|
sudo nixos-firewall-tool open tcp 1337
|
|
|
|
# Remove local datastore and copy prod datastore
|
|
cp-prod-datastore:
|
|
rm -r datastore
|
|
rsync --human-readable --recursive --info=stats1,progress2 --archive 192.168.1.3:/home/ascend/datastore .
|
|
|
|
# Update ascend input and nixos-rebuild switch
|
|
prod-deploy:
|
|
ssh 192.168.1.3 'cd /home/plul/repos/gitlab.com/plul/nixexprs; just update-ascend'
|
|
ssh -t 192.168.1.3 'cd /home/plul/repos/gitlab.com/plul/nixexprs; just switch'
|
|
|
|
prod-logs:
|
|
ssh 192.168.1.3 'journalctl --unit ascend.service'
|