feat: setup Dockerfile
This commit is contained in:
13
api/Dockerfile
Normal file
13
api/Dockerfile
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
FROM rust:1.92-alpine3.20 AS builder
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN apk update && apk add musl-dev libressl-dev
|
||||||
|
|
||||||
|
RUN cargo build --release
|
||||||
|
|
||||||
|
FROM alpine:3.20
|
||||||
|
|
||||||
|
COPY --from=builder /target/release/api /usr/local/bin/api
|
||||||
|
|
||||||
|
CMD ["/usr/local/bin/api"]
|
||||||
@@ -97,7 +97,7 @@ async fn run() -> std::io::Result<()> {
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
.bind(("127.0.0.1", 8080))?
|
.bind(("0.0.0.0", 8080))?
|
||||||
.run()
|
.run()
|
||||||
.await
|
.await
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user