From 459d242fe3ff60b0e68a87cf36c8cd4ee89e654c Mon Sep 17 00:00:00 2001 From: Mike Silverman Date: Tue, 23 Jan 2024 11:15:20 -0500 Subject: [PATCH] workflow tweak 3 --- .github/workflows/deployment.yml | 2 +- dockerfiles/server.Dockerfile | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 16fc3303..004585d7 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -25,7 +25,7 @@ jobs: uses: docker/build-push-action@v5 with: push: true - tags: snowd3n/roguelike-racing:server + tags: snowd3n/roguelike-racing:client file: ./dockerfiles/client.Dockerfile deploy: needs: build-and-push diff --git a/dockerfiles/server.Dockerfile b/dockerfiles/server.Dockerfile index e69de29b..37c8a92d 100644 --- a/dockerfiles/server.Dockerfile +++ b/dockerfiles/server.Dockerfile @@ -0,0 +1,28 @@ +FROM rust:1.70.0 as builder + +WORKDIR /app +RUN mkdir /app/common +RUN mkdir /app/server +COPY /common/Cargo.toml ./common/Cargo.toml +COPY /server/Cargo.toml ./server/Cargo.toml +WORKDIR /app/common +RUN mkdir src \ + && echo "// dummy file" > src/lib.rs +WORKDIR /app/server +RUN mkdir src \ + && echo "// dummy file" > src/lib.rs \ + && cargo build --release + +WORKDIR /app +COPY /common/src ./common/src +COPY /server/src ./server/src + +WORKDIR /app/server +RUN cargo build --release +RUN echo LISTING FILES +RUN ls + +# FROM rust:1.70.0:alpine +# WORKDIR /app +# COPY --from=builder /app/server/target . +# RUN cargo run