diff --git a/.drone.yml b/.drone.yml index 95efe75..62e235e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,33 +1,2 @@ -kind: pipeline -name: default -type: docker -steps: - - name: server - image: plugins/docker - environment: - DOCKER_BUILDKIT: 1 - settings: - username: kasperhermansen - password: - from_secret: docker_secret - repo: kasperhermansen/scel - tags: latest - context: . - dockerfile: Dockerfile - cache_from: kasperhermansen/scel:latest - when: - event: - include: - - push - - tag - - promote - - - name: send telegram notification - image: appleboy/drone-telegram - settings: - token: - from_secret: telegram_token - to: 2129601481 - format: markdown - when: - status: [failure] +kind: template +load: cuddle-rust-service-plan.yaml diff --git a/cuddle.yaml b/cuddle.yaml new file mode 100644 index 0000000..5f7f35b --- /dev/null +++ b/cuddle.yaml @@ -0,0 +1,21 @@ +# yaml-language-server: $schema=https://git.front.kjuulh.io/kjuulh/cuddle/raw/branch/main/schemas/base.json + +base: "git@git.front.kjuulh.io:kjuulh/cuddle-rust-service-plan.git" + +vars: + service: "scel" + registry: kasperhermansen + + clusters: + clank-prod: + replicas: "3" + namespace: prod + + +deployment: + registry: git@git.front.kjuulh.io:kjuulh/clank-clusters + env: + prod: + clusters: + - clank-prod + diff --git a/data/downloads/The Blimp Extinction.mp4.part b/data/downloads/The Blimp Extinction.mp4.part new file mode 100644 index 0000000..8705f3a Binary files /dev/null and b/data/downloads/The Blimp Extinction.mp4.part differ diff --git a/src/lib/scel_api/src/lib.rs b/src/lib/scel_api/src/lib.rs index 73de3c4..cd2916f 100644 --- a/src/lib/scel_api/src/lib.rs +++ b/src/lib/scel_api/src/lib.rs @@ -68,7 +68,7 @@ impl Server { .expect("Could not parse url"), ]; - let app = Router::new() + let api_router = Router::new() .route( "/graphql", routing::get(graphql_playground).post(graphql_handler), @@ -93,6 +93,10 @@ impl Server { ) .layer(TraceLayer::new_for_http().make_span_with(DefaultMakeSpan::default())); + let app = Router::new() + .nest("/api", api_router) + .fallback(svc) + let addr = SocketAddr::from(([0, 0, 0, 0], 3000)); Server { app, addr } diff --git a/src/lib/scel_core/src/services/mod.rs b/src/lib/scel_core/src/services/mod.rs index d9497a3..877e49c 100644 --- a/src/lib/scel_core/src/services/mod.rs +++ b/src/lib/scel_core/src/services/mod.rs @@ -44,14 +44,7 @@ impl InMemoryDownloadService { let id = Uuid::new_v4().to_string(); d.id = Some(id.clone()); - downloads.insert( - id.clone(), - ( - Arc::new(Mutex::new(d.clone())), - shared_tx, - rx, - ), - ); + downloads.insert(id.clone(), (Arc::new(Mutex::new(d.clone())), shared_tx, rx)); let args = vec![ Arg::new("--progress"), diff --git a/src/web/src/App.css b/src/web/src/App.css deleted file mode 100644 index 2c5e2ef..0000000 --- a/src/web/src/App.css +++ /dev/null @@ -1,41 +0,0 @@ -#root { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - text-align: center; -} - -.logo { - height: 6em; - padding: 1.5em; - will-change: filter; -} -.logo:hover { - filter: drop-shadow(0 0 2em #646cffaa); -} -.logo.react:hover { - filter: drop-shadow(0 0 2em #61dafbaa); -} - -@keyframes logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} - -@media (prefers-reduced-motion: no-preference) { - a:nth-of-type(2) .logo { - animation: logo-spin infinite 20s linear; - } -} - -.card { - padding: 2em; -} - -.read-the-docs { - color: #888; -} diff --git a/src/web/src/App.tsx b/src/web/src/App.tsx index cd20136..c06c5fc 100644 --- a/src/web/src/App.tsx +++ b/src/web/src/App.tsx @@ -1,34 +1,12 @@ -import { useState } from 'react' -import reactLogo from './assets/react.svg' -import './App.css' +import Body from "./components/body/Body" +import Navbar from "./components/navbar/Navbar" +import RequestDownload from "./components/request-download/RequestDownload" -function App() { - const [count, setCount] = useState(0) - - return ( -
- Edit src/App.tsx
and save to test HMR
-
- Click on the Vite and React logos to learn more -
-