Skip to content

Commit 5038642

Browse files
committed
Fix address binding and test docker build
1 parent 3b58974 commit 5038642

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

Dockerfile

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
1-
FROM rust:alpine as builder
1+
FROM rust:latest as builder
22

33
WORKDIR /cdn-api
44

55
COPY . .
66

7-
RUN apk add musl-dev
8-
97
RUN cargo build --release
108

11-
FROM alpine:latest
9+
FROM debian:latest
1210

1311
WORKDIR /cdn-api
1412

15-
RUN apk add ffmpeg
13+
RUN apt-get update && apt-get install -y ffmpeg
1614

1715
COPY --from=builder /cdn-api/target/release/cdn-api .
1816

19-
CMD ["./cdn-api"]
17+
CMD ["./cdn-api"]

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ async fn init() -> anyhow::Result<()> {
3535
info!("Starting HTTP server on {}", address);
3636

3737
HttpServer::new(move || App::new().service(api::routes()).app_data(storage.clone()))
38-
.bind(("127.0.0.1", 8080))?
38+
.bind(address)?
3939
.run()
4040
.await?;
4141

0 commit comments

Comments
 (0)