5eb085067d
All checks were successful
Build and Push Docker Image / build_and_push (push) Successful in 1m7s
20 lines
507 B
Docker
20 lines
507 B
Docker
# Stage 1: Build the Svelte frontend
|
|
FROM node:18 as frontend-builder
|
|
WORKDIR /app/frontend
|
|
COPY frontend/ .
|
|
RUN npm install
|
|
RUN npm run build
|
|
|
|
# Stage 2: Build the Rust backend
|
|
FROM rust:1.83 as backend-builder
|
|
WORKDIR /app/backend
|
|
COPY backend/ .
|
|
RUN cargo build --release
|
|
|
|
# Final Stage
|
|
FROM debian:bullseye-slim
|
|
WORKDIR /app
|
|
COPY --from=frontend-builder /app/frontend/build ./frontend/build
|
|
COPY --from=backend-builder /app/backend/target/release/formies_be ./formies_be
|
|
EXPOSE 8080
|
|
CMD ["./formies_be"] |