A focused Docker Compose management web application.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: create dockerfile

Brooke 86fd1ac1 9f5a4a2d

+51 -18
+2 -1
.dockerignore
··· 1 1 node_modules 2 - target 2 + target 3 + .env
+10 -10
Cargo.lock
··· 1837 1837 checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" 1838 1838 1839 1839 [[package]] 1840 - name = "luminary-macros" 1841 - version = "0.1.0" 1842 - dependencies = [ 1843 - "proc-macro2", 1844 - "quote", 1845 - "syn 2.0.116", 1846 - ] 1847 - 1848 - [[package]] 1849 - name = "luminary-node" 1840 + name = "luminary" 1850 1841 version = "0.1.0" 1851 1842 dependencies = [ 1852 1843 "async-stream", ··· 1873 1864 "tracing", 1874 1865 "tracing-subscriber", 1875 1866 "uuid", 1867 + ] 1868 + 1869 + [[package]] 1870 + name = "luminary-macros" 1871 + version = "0.1.0" 1872 + dependencies = [ 1873 + "proc-macro2", 1874 + "quote", 1875 + "syn 2.0.116", 1876 1876 ] 1877 1877 1878 1878 [[package]]
+28
Dockerfile
··· 1 + FROM rust:alpine AS backend-builder 2 + 3 + WORKDIR /opt/app 4 + 5 + COPY . . 6 + 7 + RUN cargo build --release 8 + 9 + FROM node:22-alpine AS frontend-builder 10 + 11 + RUN npm -g install pnpm 12 + 13 + WORKDIR /opt/app 14 + 15 + COPY . . 16 + 17 + RUN pnpm install --frozen-lockfile 18 + 19 + RUN pnpm build 20 + 21 + FROM alpine:latest 22 + 23 + WORKDIR /opt/app 24 + 25 + COPY --from=backend-builder /opt/app/target/release/luminary . 26 + COPY --from=frontend-builder /opt/app/packages/panel/build ./static 27 + 28 + CMD ["./luminary"]
+1 -1
packages/node/Cargo.toml
··· 1 1 [package] 2 - name = "luminary-node" 2 + name = "luminary" 3 3 version = { workspace = true } 4 4 edition = { workspace = true } 5 5
+1 -1
packages/node/src/main.rs
··· 22 22 23 23 #[tokio::main] 24 24 async fn main() -> Result<()> { 25 - dotenvy::dotenv()?; 25 + dotenvy::dotenv().ok(); 26 26 27 27 // Set up logging 28 28 let broadcast_layer = logging::BroadcastLayer::new();
+9 -5
packages/panel/plugin.ts
··· 1 1 import openapiTS, { astToString } from "openapi-typescript"; 2 2 import { writeFileSync } from "node:fs"; 3 + import { existsSync } from "node:fs"; 3 4 import type { Plugin } from "vite"; 5 + 6 + const OPENAPI_PATH = new URL("static/openapi.json", import.meta.url); 4 7 5 8 async function generateTypes() { 6 - const output = await openapiTS(new URL("static/openapi.json", import.meta.url)); 9 + if (!existsSync(OPENAPI_PATH)) return; 10 + const output = await openapiTS(OPENAPI_PATH); 7 11 writeFileSync(new URL("src/lib/api/openapi.ts", import.meta.url), astToString(output)); 8 12 } 9 13 ··· 13 17 enforce: "pre", 14 18 buildStart: generateTypes, 15 19 configureServer(server) { 16 - const path = new URL("static/openapi.json", import.meta.url).toString(); 17 - server.watcher.add(path); 18 - server.watcher.on("change", async (path) => { 19 - if (path === path) await generateTypes(); 20 + const openapiPath = OPENAPI_PATH.pathname; 21 + server.watcher.add(openapiPath); 22 + server.watcher.on("change", async (changedPath) => { 23 + if (changedPath === openapiPath) await generateTypes(); 20 24 }); 21 25 }, 22 26 };