Create container
This commit is contained in:
parent
a67701039d
commit
7f4132e486
3 changed files with 20 additions and 0 deletions
3
.dockerignore
Normal file
3
.dockerignore
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
/target
|
||||||
|
/static
|
||||||
|
/.git
|
|
@ -1,4 +1,10 @@
|
||||||
*:80 {
|
*:80 {
|
||||||
|
route /favicon.ico {
|
||||||
|
file_server {
|
||||||
|
root ./static
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
route /static/* {
|
route /static/* {
|
||||||
uri strip_prefix /static
|
uri strip_prefix /static
|
||||||
file_server {
|
file_server {
|
||||||
|
|
11
Dockerfile
Normal file
11
Dockerfile
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
FROM rust:1.67-slim as build
|
||||||
|
|
||||||
|
COPY ./ ./
|
||||||
|
|
||||||
|
RUN cargo build --release
|
||||||
|
|
||||||
|
FROM debian:stable-slim
|
||||||
|
|
||||||
|
COPY --from=build ./target/release/personal-site .
|
||||||
|
|
||||||
|
CMD ["./personal-site"]
|
Reference in a new issue