2024-07-25 10:21:56 +02:00
|
|
|
FROM rust:1.79.0 AS dioxus
|
2024-04-29 22:48:53 +02:00
|
|
|
RUN cargo install dioxus-cli@^0.5
|
|
|
|
|
2024-07-25 10:21:56 +02:00
|
|
|
FROM dioxus AS builder
|
2024-04-29 22:48:53 +02:00
|
|
|
WORKDIR /athome/
|
2024-07-25 10:21:56 +02:00
|
|
|
RUN apt-get update && apt-get install nodejs npm libssl-dev musl-tools -y && rm -rf /var/lib/apt/lists/*
|
2024-05-21 22:54:44 +02:00
|
|
|
RUN npm install -D tailwindcss
|
2024-04-29 22:48:53 +02:00
|
|
|
COPY ./src/ ./src/
|
|
|
|
COPY ./assets/ ./assets/
|
|
|
|
COPY ./Cargo.toml ./Cargo.toml
|
|
|
|
COPY ./input.css ./input.css
|
|
|
|
COPY ./Dioxus.toml ./Dioxus.toml
|
|
|
|
COPY ./tailwind.config.js ./tailwind.config.js
|
2024-05-21 22:54:44 +02:00
|
|
|
RUN npx tailwindcss -i ./input.css -o ./assets/tailwind.css && dx build --platform fullstack --release
|
|
|
|
|
2024-07-25 10:21:56 +02:00
|
|
|
FROM dioxus AS runner
|
2024-05-21 22:54:44 +02:00
|
|
|
WORKDIR /app/
|
|
|
|
COPY --from=builder /athome/docs/ ./docs/
|
|
|
|
CMD [ "./docs/athome" ]
|