docker stuff
This commit is contained in:
parent
eca32f0507
commit
d782352363
|
@ -0,0 +1,2 @@
|
|||
Dockerfile
|
||||
docker-compose.yml
|
|
@ -0,0 +1,15 @@
|
|||
FROM rust:1.75-alpine3.18 as build
|
||||
|
||||
RUN apk add --no-cache musl-dev upx
|
||||
|
||||
WORKDIR /opt/build
|
||||
COPY . .
|
||||
|
||||
RUN cargo install --path .
|
||||
RUN strip /usr/local/cargo/bin/blek-online-server && upx /usr/local/cargo/bin/blek-online-server
|
||||
|
||||
FROM alpine:3.18
|
||||
|
||||
COPY --from=build /usr/local/cargo/bin/blek-online-server /usr/bin/blek-online-server
|
||||
|
||||
CMD [ "/usr/bin/blek-online-server" ]
|
|
@ -0,0 +1,10 @@
|
|||
version: '3.8'
|
||||
services:
|
||||
server:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
restart: always
|
||||
ports:
|
||||
- 8000:80 # expose to "8000"
|
||||
|
Loading…
Reference in New Issue