From 24ede1210894dbbaa0c639f6475d5c2f7c65c5bc Mon Sep 17 00:00:00 2001 From: wyatt Date: Sun, 5 Jan 2025 20:29:44 -0800 Subject: [PATCH] Shuttle migration (#6) * bump runtime version * ignore shuttle specific artifacts * deployment inclusion specification * postbuild script for frontend * change base url in config --- .gitignore | 2 ++ Shuttle.toml | 9 +++++++-- backend/Cargo.toml | 4 ++-- config/src/lib.rs | 2 +- shuttle_postbuild.sh | 4 ++++ 5 files changed, 16 insertions(+), 5 deletions(-) create mode 100644 shuttle_postbuild.sh diff --git a/.gitignore b/.gitignore index 8653890..22e811b 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,5 @@ Cargo.lock # wasm related /frontend/dist/ +.shuttle* +Secrets*.toml diff --git a/Shuttle.toml b/Shuttle.toml index 19c2370..a332b05 100644 --- a/Shuttle.toml +++ b/Shuttle.toml @@ -1,4 +1,9 @@ -assets = [ +[deploy] +include = [ ".env", - "frontend/dist/*" +] + +[build] +assets = [ + "frontend/dist/*", ] diff --git a/backend/Cargo.toml b/backend/Cargo.toml index 4ca65bf..f629078 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -22,6 +22,6 @@ yew = "0.21.0" log = "0.4.21" env_logger = "0.11.3" chrono = "0.4.38" -shuttle-actix-web = "0.46.0" -shuttle-runtime = "0.46.0" +shuttle-actix-web = "0.49" +shuttle-runtime = "0.49.0" actix-cors = "0.7.0" diff --git a/config/src/lib.rs b/config/src/lib.rs index 6c206ae..4baea08 100644 --- a/config/src/lib.rs +++ b/config/src/lib.rs @@ -15,7 +15,7 @@ pub const ENV: Env = Env { }; pub const ENDPOINT: Endpoint = Endpoint { - base: "https://feframe.shuttleapp.rs", + base: "https://feframe-wa5w.shuttle.app", github: "/api/github", lastfm: "/api/lastfm", letterboxd: "/api/letterboxd", diff --git a/shuttle_postbuild.sh b/shuttle_postbuild.sh new file mode 100644 index 0000000..0fd3fa9 --- /dev/null +++ b/shuttle_postbuild.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +cd frontend || exit +trunk build --release