allpaca/Dockerfile

27 lines
479 B
Docker
Raw Normal View History

2024-11-07 14:19:09 +01:00
FROM rust:slim AS build
RUN rustup default nightly
RUN rustup target add wasm32-unknown-unknown
RUN cargo install cargo-watch trunk
RUN apt update && apt install -y\
pkg-config librust-openssl-dev
ADD ./ /
WORKDIR /backend
RUN cargo build --release
WORKDIR /frontend
RUN trunk build --release
FROM nginx:latest
COPY --from=build /target/release/oracle /bin
COPY --from=build /frontend/dist /srv/www
ADD init.sh /bin/init.sh
ENV WEB_WORKERS=4
EXPOSE 80
CMD [ "init.sh" ]