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