Added docker push script and build cicd
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
This commit is contained in:
18
Dockerfile
18
Dockerfile
@@ -1,17 +1,19 @@
|
||||
FROM rust:1.77.2 as builder
|
||||
WORKDIR /athome/
|
||||
FROM rust:1.77.2 as dioxus
|
||||
RUN cargo install dioxus-cli@^0.5
|
||||
RUN apt update && apt install nodejs npm -y && rm -rf /var/lib/apt/lists/*
|
||||
RUN npm install -D tailwindcss
|
||||
|
||||
FROM builder
|
||||
FROM dioxus as builder
|
||||
WORKDIR /athome/
|
||||
RUN apt-get update && apt-get install nodejs npm -y && rm -rf /var/lib/apt/lists/*
|
||||
RUN npm install -D tailwindcss
|
||||
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
|
||||
RUN npx tailwindcss -i ./input.css -o ./assets/tailwind.css
|
||||
RUN dx build --platform fullstack --release
|
||||
ENTRYPOINT [ "./docs/athome" ]
|
||||
RUN npx tailwindcss -i ./input.css -o ./assets/tailwind.css && dx build --platform fullstack --release
|
||||
|
||||
FROM dioxus as runner
|
||||
WORKDIR /app/
|
||||
COPY --from=builder /athome/docs/ ./docs/
|
||||
CMD [ "./docs/athome" ]
|
||||
|
||||
Reference in New Issue
Block a user