Docker
This commit is contained in:
2 files changed
+20
No files matched your search
@@ -0,0 +1,16 @@
|
||||
FROM docker.io/library/rust:alpine AS build
|
||||
RUN apk add --no-cache build-base
|
||||
WORKDIR /app
|
||||
COPY Cargo.toml Cargo.lock README.md ./
|
||||
COPY src ./src
|
||||
COPY templates ./templates
|
||||
RUN cargo build --release --locked
|
||||
|
||||
FROM docker.io/library/alpine:latest
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/target/release/pastable /usr/local/bin/pastable
|
||||
COPY static ./static
|
||||
ENV DATABASE_URL=sqlite:///data/pastable.db
|
||||
VOLUME ["/data"]
|
||||
EXPOSE 3000
|
||||
CMD ["pastable"]
|
||||
Reference in new issue
Block a user