Add working container file

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/1/head
trivernis 3 years ago
parent eed1e2db2c
commit de9f733daf
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -0,0 +1,3 @@
dist
target
.idea

@ -0,0 +1,28 @@
FROM docker.io/bitnami/minideb:bullseye AS build-base
RUN apt update
RUN apt install -y \
build-essential \
curl \
bash \
clang \
nodejs \
wget \
npm
RUN curl https://sh.rustup.rs -sSf | bash -s -- --profile minimal -y
ENV PATH="/root/.cargo/bin:${PATH}"
RUN rustup target add wasm32-unknown-unknown
RUN wget -qO- https://github.com/thedodd/trunk/releases/latest/download/${VERSION}/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf-
RUN cp trunk /bin
RUN trunk --version
RUN rm -rf /var/lib/{apt,dpkg,cache,log}/ /var/cache
FROM build-base AS builder
WORKDIR /usr/src
COPY . .
RUN cargo fetch --target wasm32-unknown-unknown
RUN ls
RUN trunk build --release
FROM docker.io/nginx:alpine
COPY --from=builder /usr/src/dist/ /usr/share/nginx/html
CMD ["nginx", "-g", "daemon off;"]

@ -3,6 +3,6 @@
<link data-trunk rel="css" href="src/styles/yew-styles.css"/>
<link data-trunk rel="sass" href="src/styles/yew-styles-overrides.scss"/>
<link data-trunk rel="sass" href="src/styles/main.scss"/>
<link data-trunk rel="copy-dir" href="/src/assets"/>
<link data-trunk rel="copy-dir" href="src/assets"/>
</head>
</html>
Loading…
Cancel
Save