feat: update scel
Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
parent
13321a44a2
commit
15dd5ce45e
35
.drone.yml
35
.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
|
||||
|
21
cuddle.yaml
Normal file
21
cuddle.yaml
Normal file
@ -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
|
||||
|
BIN
data/downloads/The Blimp Extinction.mp4.part
Normal file
BIN
data/downloads/The Blimp Extinction.mp4.part
Normal file
Binary file not shown.
@ -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 }
|
||||
|
@ -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"),
|
||||
|
@ -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;
|
||||
}
|
@ -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 (
|
||||
<div className="App">
|
||||
<div>
|
||||
<a href="https://vitejs.dev" target="_blank">
|
||||
<img src="/vite.svg" className="logo" alt="Vite logo" />
|
||||
</a>
|
||||
<a href="https://reactjs.org" target="_blank">
|
||||
<img src={reactLogo} className="logo react" alt="React logo" />
|
||||
</a>
|
||||
</div>
|
||||
<h1>Vite + React</h1>
|
||||
<div className="card">
|
||||
<button onClick={() => setCount((count) => count + 1)}>
|
||||
count is {count}
|
||||
</button>
|
||||
<p>
|
||||
Edit <code>src/App.tsx</code> and save to test HMR
|
||||
</p>
|
||||
</div>
|
||||
<p className="read-the-docs">
|
||||
Click on the Vite and React logos to learn more
|
||||
</p>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
const App = () => <div>
|
||||
<Navbar />
|
||||
<Body>
|
||||
<RequestDownload />
|
||||
</Body>
|
||||
</div>
|
||||
|
||||
export default App
|
||||
|
8
src/web/src/components/body/Body.tsx
Normal file
8
src/web/src/components/body/Body.tsx
Normal file
@ -0,0 +1,8 @@
|
||||
import { FC, ReactNode } from "react"
|
||||
|
||||
interface BodyProps {
|
||||
children?: ReactNode
|
||||
}
|
||||
const Body: FC<BodyProps> = ({ children }) => <div>{children}</div>
|
||||
|
||||
export default Body
|
10
src/web/src/components/navbar/Navbar.tsx
Normal file
10
src/web/src/components/navbar/Navbar.tsx
Normal file
@ -0,0 +1,10 @@
|
||||
import { getServerUrl } from "../../lib/env"
|
||||
|
||||
const Navbar = () => {
|
||||
return <nav>
|
||||
<div>Scel</div>
|
||||
<a href={`${getServerUrl()}/auth/gitea`}>Login</a>
|
||||
</nav>
|
||||
}
|
||||
|
||||
export default Navbar
|
@ -0,0 +1,7 @@
|
||||
const RequestDownload = () => {
|
||||
return <div>
|
||||
<input type="text" placeholder="Request download"></input>
|
||||
</div>
|
||||
}
|
||||
|
||||
export default RequestDownload
|
@ -1,70 +0,0 @@
|
||||
:root {
|
||||
font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
|
||||
font-size: 16px;
|
||||
line-height: 24px;
|
||||
font-weight: 400;
|
||||
|
||||
color-scheme: light dark;
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
background-color: #242424;
|
||||
|
||||
font-synthesis: none;
|
||||
text-rendering: optimizeLegibility;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
a {
|
||||
font-weight: 500;
|
||||
color: #646cff;
|
||||
text-decoration: inherit;
|
||||
}
|
||||
a:hover {
|
||||
color: #535bf2;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
display: flex;
|
||||
place-items: center;
|
||||
min-width: 320px;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 3.2em;
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
button {
|
||||
border-radius: 8px;
|
||||
border: 1px solid transparent;
|
||||
padding: 0.6em 1.2em;
|
||||
font-size: 1em;
|
||||
font-weight: 500;
|
||||
font-family: inherit;
|
||||
background-color: #1a1a1a;
|
||||
cursor: pointer;
|
||||
transition: border-color 0.25s;
|
||||
}
|
||||
button:hover {
|
||||
border-color: #646cff;
|
||||
}
|
||||
button:focus,
|
||||
button:focus-visible {
|
||||
outline: 4px auto -webkit-focus-ring-color;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
:root {
|
||||
color: #213547;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
a:hover {
|
||||
color: #747bff;
|
||||
}
|
||||
button {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
}
|
3
src/web/src/lib/env.ts
Normal file
3
src/web/src/lib/env.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export const getServerUrl = (): string => {
|
||||
return import.meta.env.VITE_SERVER_BASE_URL
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
import React from 'react'
|
||||
import ReactDOM from 'react-dom/client'
|
||||
import App from './App'
|
||||
import './index.css'
|
||||
|
||||
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
|
||||
<React.StrictMode>
|
||||
|
Loading…
Reference in New Issue
Block a user