forgot the dockerfile lmao
Test build / build (push) Failing after 1m25s
Details
Test build / build (push) Failing after 1m25s
Details
This commit is contained in:
parent
b521c299fd
commit
ce07c0ef3d
|
@ -0,0 +1,19 @@
|
||||||
|
# builder
|
||||||
|
FROM rust:1.70 as builder
|
||||||
|
|
||||||
|
WORKDIR /usr/src/actions-test
|
||||||
|
COPY . .
|
||||||
|
RUN cargo install --path .
|
||||||
|
|
||||||
|
# runner
|
||||||
|
FROM debian:bullseye-slim
|
||||||
|
|
||||||
|
RUN apt-get update && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
COPY --from=builder /usr/local/cargo/bin/actions-test /usr/local/bin/actions-test
|
||||||
|
|
||||||
|
RUN useradd -m runner
|
||||||
|
USER runner
|
||||||
|
|
||||||
|
EXPOSE 8000
|
||||||
|
CMD [ "actions-test" ]
|
|
@ -1,5 +1,3 @@
|
||||||
use std::net::SocketAddr;
|
|
||||||
|
|
||||||
use axum::{Router, routing::get};
|
use axum::{Router, routing::get};
|
||||||
|
|
||||||
async fn index() -> &'static str {
|
async fn index() -> &'static str {
|
||||||
|
@ -10,8 +8,7 @@ async fn index() -> &'static str {
|
||||||
async fn main() {
|
async fn main() {
|
||||||
let app = Router::new().route("/", get(index));
|
let app = Router::new().route("/", get(index));
|
||||||
|
|
||||||
let addr = SocketAddr::from(([0, 0, 0, 0], 8997));
|
axum::Server::bind(&"0.0.0.0:8000".parse().unwrap())
|
||||||
axum::Server::bind(&addr)
|
|
||||||
.serve(app.into_make_service())
|
.serve(app.into_make_service())
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
Loading…
Reference in New Issue