Skip to content

Commit

Permalink
docker fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Timtam committed Mar 9, 2024
1 parent 0a987f3 commit 03f4884
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM node:20 AS CLIENT_BUILD_IMAGE
FROM node:20 AS client_build_image

WORKDIR /app

COPY ./client /app

RUN npm install && npm run build

FROM rust:1.76-slim-bookworm as SERVER_CLIENT_IMAGE
FROM rust:1.76-slim-bookworm as server_build_image

# create a new empty shell project
RUN apt-get update && apt-get -y install libssl-dev pkg-config && \
Expand Down Expand Up @@ -43,8 +43,8 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
rm -rf /var/lib/apt/lists/*

# copy the build artifact from the build stage
COPY --from=SERVER_BUILD_IMAGE /hitster/target/release/hitster-server /hitster/server/hitster
COPY --from=CLIENT_BUILD_IMAGE /app/dist /hitster/client/dist
COPY --from=server_bild_image /hitster/target/release/hitster-server /hitster/server/hitster
COPY --from=client_build_image /app/dist /hitster/client/dist

# set the startup command to run your binary
CMD ["/hitster/server/hitster"]

0 comments on commit 03f4884

Please sign in to comment.