api shell
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
[package]
|
||||
name = "backend"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
@@ -0,0 +1,12 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
FROM rust:1.82-slim AS builder
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN cargo build --release
|
||||
|
||||
FROM debian:trixie-slim
|
||||
WORKDIR /app
|
||||
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*
|
||||
COPY --from=builder /app/target/release/backend /app/backend
|
||||
EXPOSE 8080
|
||||
CMD ["/app/backend"]
|
||||
@@ -0,0 +1,9 @@
|
||||
use std::time::Duration;
|
||||
use std::thread;
|
||||
|
||||
fn main() {
|
||||
println!("Backend stub started...");
|
||||
loop {
|
||||
thread::sleep(Duration::from_secs(60));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user