diff --git a/.sqlx/query-1a6f4d858c200757c1d25c22279ef0a6eb8589bb6dff47afe1554850c1bead57.json b/.sqlx/query-907e578fc43797b82c254fa3db3d976597f6deb761837d616d50aa93e9caef60.json similarity index 52% rename from .sqlx/query-1a6f4d858c200757c1d25c22279ef0a6eb8589bb6dff47afe1554850c1bead57.json rename to .sqlx/query-907e578fc43797b82c254fa3db3d976597f6deb761837d616d50aa93e9caef60.json index 979d26e..e6e4b18 100644 --- a/.sqlx/query-1a6f4d858c200757c1d25c22279ef0a6eb8589bb6dff47afe1554850c1bead57.json +++ b/.sqlx/query-907e578fc43797b82c254fa3db3d976597f6deb761837d616d50aa93e9caef60.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO tags (slug, name, icon)\n VALUES ($1, $2, $3)\n RETURNING id\n ", + "query": "\n INSERT INTO tags (slug, name, icon, color)\n VALUES ($1, $2, $3, $4)\n RETURNING id\n ", "describe": { "columns": [ { @@ -13,12 +13,13 @@ "Left": [ "Text", "Text", - "Text" + "Text", + "Varchar" ] }, "nullable": [ false ] }, - "hash": "1a6f4d858c200757c1d25c22279ef0a6eb8589bb6dff47afe1554850c1bead57" + "hash": "907e578fc43797b82c254fa3db3d976597f6deb761837d616d50aa93e9caef60" } diff --git a/Cargo.toml b/Cargo.toml index ed86f8d..aa2157e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,3 +37,6 @@ tracing-subscriber = { version = "0.3.22", features = ["env-filter", "json"] } ulid = { version = "1", features = ["serde"] } urlencoding = "2.1" uuid = { version = "1", features = ["serde", "v4"] } + +[profile.release] +strip = true diff --git a/Dockerfile b/Dockerfile index a9f5674..95600a4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,8 +28,7 @@ COPY src/ ./src/ RUN mkdir -p web/build/client && \ echo "placeholder" > web/build/client/.gitkeep -RUN cargo build --release && \ - strip target/release/xevion +RUN cargo build --release # ========== Stage 4: Frontend Builder ========== FROM oven/bun:1 AS frontend @@ -65,8 +64,7 @@ COPY --from=frontend /build/build/prerendered ./web/build/prerendered # Build with real assets (use sqlx offline mode) ENV SQLX_OFFLINE=true -RUN cargo build --release && \ - strip target/release/xevion +RUN cargo build --release # ========== Stage 6: Runtime ========== FROM oven/bun:1-alpine AS runtime diff --git a/railway.json b/railway.json index ddab65a..9296942 100644 --- a/railway.json +++ b/railway.json @@ -2,6 +2,6 @@ "$schema": "https://railway.com/railway.schema.json", "deploy": { "healthcheckPath": "/api/health", - "healthcheckTimeout": 30 + "healthcheckTimeout": 120 } } diff --git a/src/cli/seed.rs b/src/cli/seed.rs index 875920c..68aa44c 100644 --- a/src/cli/seed.rs +++ b/src/cli/seed.rs @@ -90,32 +90,48 @@ pub async fn run(pool: &PgPool) -> Result<(), Box> { // Seed tags let tags = vec![ - ("rust", "Rust", "simple-icons:rust"), - ("python", "Python", "simple-icons:python"), - ("typescript", "TypeScript", "simple-icons:typescript"), - ("javascript", "JavaScript", "simple-icons:javascript"), - ("web", "Web", "lucide:globe"), - ("cli", "CLI", "lucide:terminal"), - ("library", "Library", "lucide:package"), - ("game", "Game", "lucide:gamepad-2"), - ("data-structures", "Data Structures", "lucide:database"), - ("algorithms", "Algorithms", "lucide:cpu"), - ("multiplayer", "Multiplayer", "lucide:users"), - ("config", "Config", "lucide:settings"), + ("rust", "Rust", "simple-icons:rust", "CE422B"), + ("python", "Python", "simple-icons:python", "3776AB"), + ( + "typescript", + "TypeScript", + "simple-icons:typescript", + "3178C6", + ), + ( + "javascript", + "JavaScript", + "simple-icons:javascript", + "EAB308", + ), + ("web", "Web", "lucide:globe", "2563EB"), + ("cli", "CLI", "lucide:terminal", "64748B"), + ("library", "Library", "lucide:package", "8B5CF6"), + ("game", "Game", "lucide:gamepad-2", "EC4899"), + ( + "data-structures", + "Data Structures", + "lucide:database", + "10B981", + ), + ("algorithms", "Algorithms", "lucide:cpu", "F59E0B"), + ("multiplayer", "Multiplayer", "lucide:users", "06B6D4"), + ("config", "Config", "lucide:settings", "6366F1"), ]; let mut tag_ids = std::collections::HashMap::new(); - for (slug, name, icon) in tags { + for (slug, name, icon, color) in tags { let result = sqlx::query!( r#" - INSERT INTO tags (slug, name, icon) - VALUES ($1, $2, $3) + INSERT INTO tags (slug, name, icon, color) + VALUES ($1, $2, $3, $4) RETURNING id "#, slug, name, - icon + icon, + color ) .fetch_one(pool) .await?; diff --git a/src/db/mod.rs b/src/db/mod.rs index 493ab15..f9f3f6c 100644 --- a/src/db/mod.rs +++ b/src/db/mod.rs @@ -36,17 +36,18 @@ pub async fn create_pool(database_url: &str) -> Result { return Ok(pool); } Err(e) => { - last_error = Some(e); if attempt < max_attempts { tracing::warn!( attempt, max_attempts, delay_secs = delay.as_secs(), + error = %e, "Database connection failed, retrying..." ); sleep(delay).await; delay = (delay * 2).min(max_delay); } + last_error = Some(e); } } } diff --git a/web/src/lib/components/ProjectCard.svelte b/web/src/lib/components/ProjectCard.svelte index 7b9529e..fd37c2b 100644 --- a/web/src/lib/components/ProjectCard.svelte +++ b/web/src/lib/components/ProjectCard.svelte @@ -74,7 +74,7 @@ -
+
{#each project.tags as tag (tag.name)} {/each} diff --git a/web/static/apple-touch-icon.png.backup b/web/static/apple-touch-icon.png.backup deleted file mode 100644 index 468b809..0000000 Binary files a/web/static/apple-touch-icon.png.backup and /dev/null differ diff --git a/web/static/favicon.svg.backup b/web/static/favicon.svg.backup deleted file mode 100644 index ebd3a14..0000000 --- a/web/static/favicon.svg.backup +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/svelte.config.js b/web/svelte.config.js index ea7a43b..f6a1fa0 100644 --- a/web/svelte.config.js +++ b/web/svelte.config.js @@ -8,7 +8,7 @@ const config = { kit: { adapter: adapter({ out: "build", - precompress: true, + precompress: false, serveAssets: false, }), alias: {