diff options
-rw-r--r-- | .github/workflows/test.yml | 2 | ||||
-rw-r--r-- | Dockerfile.build | 16 | ||||
-rw-r--r-- | src/main.rs | 4 |
3 files changed, 19 insertions, 3 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c1bfdf7..bf170f5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml | |||
@@ -54,4 +54,4 @@ jobs: | |||
54 | push: true | 54 | push: true |
55 | tags: | | 55 | tags: | |
56 | ghcr.io/fxqnlr/webol:dev-latest | 56 | ghcr.io/fxqnlr/webol:dev-latest |
57 | ghcr.io/fxqnlr/webol:dev-${{ github.run_number }} \ No newline at end of file | 57 | ghcr.io/fxqnlr/webol:dev-${{ github.run_number }} |
diff --git a/Dockerfile.build b/Dockerfile.build new file mode 100644 index 0000000..3bbaf39 --- /dev/null +++ b/Dockerfile.build | |||
@@ -0,0 +1,16 @@ | |||
1 | FROM rust:1.73 as builder | ||
2 | WORKDIR /usr/src/webol | ||
3 | COPY . . | ||
4 | # RUN rustup target add armv7-unknown-linux-gnueabihf | ||
5 | # RUN apt update && apt install gcc-arm-linux-gnueabihf -y | ||
6 | # RUN CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc cargo install --path . --target armv7-unknown-linux-gnueabihf | ||
7 | RUN cargo install --path . | ||
8 | |||
9 | # FROM --platform=arm64 debian:bullseye-slim | ||
10 | FROM debian:trixie-slim | ||
11 | # RUN apt-get update && apt-get install -y libc6 && rm -rf /var/lib/apt/lists/* | ||
12 | WORKDIR /usr/local/webol | ||
13 | COPY --from=builder /usr/local/cargo/bin/webol /usr/local/bin/webol | ||
14 | |||
15 | EXPOSE 7229 | ||
16 | CMD ["webol"] | ||
diff --git a/src/main.rs b/src/main.rs index bb37dc2..e6c746c 100644 --- a/src/main.rs +++ b/src/main.rs | |||
@@ -51,7 +51,7 @@ async fn main() { | |||
51 | .route("/device", post(post_device)) | 51 | .route("/device", post(post_device)) |
52 | .with_state(shared_state); | 52 | .with_state(shared_state); |
53 | 53 | ||
54 | // run it with hyper on localhost:3000 | 54 | // TODO: Add to config |
55 | axum::Server::bind(&"0.0.0.0:3000".parse().unwrap()) | 55 | axum::Server::bind(&"0.0.0.0:3000".parse().unwrap()) |
56 | .serve(app.into_make_service()) | 56 | .serve(app.into_make_service()) |
57 | .await | 57 | .await |
@@ -76,4 +76,4 @@ async fn init_db_pool() -> PgPool { | |||
76 | info!("dbPool successfully connected to '{}'", db_url); | 76 | info!("dbPool successfully connected to '{}'", db_url); |
77 | 77 | ||
78 | pool | 78 | pool |
79 | } \ No newline at end of file | 79 | } |