diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5309fc3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,40 @@ +################## +### BASE STAGE ### +################## +FROM rust:1.57 as base + +# Install build dependencies +RUN cargo install --locked trunk strip_cargo_version +RUN rustup target add wasm32-unknown-unknown + +WORKDIR /app +RUN mkdir frontend backend common + +########################### +### STRIP-VERSION STAGE ### +########################### +FROM base AS strip-version + +COPY Cargo.lock Cargo.toml ./ +RUN strip_cargo_version + +################### +### BUILD STAGE ### +################### +FROM base AS build + +RUN cargo init --lib . +COPY --from=strip-version /app/Cargo.toml /app/Cargo.lock /app/ + +RUN cargo build --release --target wasm32-unknown-unknown + +COPY . . + +RUN trunk build --release + +######################## +### PRODUCTION STAGE ### +######################## +FROM nginx:alpine + +COPY --from=base /app/dist/* /usr/share/nginx/html/ diff --git a/static/styles/common.scss b/static/styles/common.scss index eb1ff2d..6950e7e 100644 --- a/static/styles/common.scss +++ b/static/styles/common.scss @@ -12,17 +12,23 @@ body { -webkit-box-align: center; -ms-flex-align: center; align-items: center; - background-image: url(/images/background.svg); - background-repeat: no-repeat; - background-blend-mode: multiply; - background-size: 100vh; - background-position: top; background-color: #0c2738; color: #ffffff; height: 100%; font-family: Ubuntu,serif; } +body::after { + display: absolute; + top: 0; + bottom: 100vh; + left: 0; + right: 100vw; + + background-image: url(/images/background.svg); + background-repeat: no-repeat; +} + .nobr { white-space: nowrap; }