forgot the dockerfile lmao
Test build / build (push) Failing after 1m25s Details

This commit is contained in:
minish 2023-08-03 19:33:17 -04:00
parent b521c299fd
commit ce07c0ef3d
Signed by: min
GPG Key ID: FEECFF24EF0CE9E9
2 changed files with 20 additions and 4 deletions

19
Dockerfile Normal file
View File

@ -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" ]

View File

@ -1,5 +1,3 @@
use std::net::SocketAddr;
use axum::{Router, routing::get};
async fn index() -> &'static str {
@ -10,8 +8,7 @@ async fn index() -> &'static str {
async fn main() {
let app = Router::new().route("/", get(index));
let addr = SocketAddr::from(([0, 0, 0, 0], 8997));
axum::Server::bind(&addr)
axum::Server::bind(&"0.0.0.0:8000".parse().unwrap())
.serve(app.into_make_service())
.await
.unwrap();