diff --git a/services/identity/proto/identity.proto b/native/cpp/CommonCpp/grpc/protos/identity.proto similarity index 100% rename from services/identity/proto/identity.proto rename to native/cpp/CommonCpp/grpc/protos/identity.proto diff --git a/services/identity/Dockerfile b/services/identity/Dockerfile index 0eedfbdf2..0d2b8e775 100644 --- a/services/identity/Dockerfile +++ b/services/identity/Dockerfile @@ -1,29 +1,30 @@ FROM rust:1.57 # Create a new user comm and use it to run subsequent commands RUN useradd -m comm USER comm # The build.rs script depends on rustfmt RUN rustup component add rustfmt RUN mkdir -p /home/comm/app/identity WORKDIR /home/comm/app/identity RUN cargo init --bin COPY services/identity/Cargo.toml services/identity/Cargo.lock ./ # Cache build dependencies in a new layer RUN cargo build --release RUN rm src/*.rs COPY services/identity . +COPY native/cpp/CommonCpp/grpc/protos/identity.proto protos/ # Remove the previously-built binary so that only the application itself is # rebuilt RUN rm ./target/release/deps/identity* RUN cargo build --release RUN target/release/identity keygen CMD ["./target/release/identity", "server"] diff --git a/services/identity/build.rs b/services/identity/build.rs index 82d10c255..23575c8c6 100644 --- a/services/identity/build.rs +++ b/services/identity/build.rs @@ -1,4 +1,4 @@ fn main() -> Result<(), Box> { - tonic_build::compile_protos("proto/identity.proto")?; + tonic_build::compile_protos("protos/identity.proto")?; Ok(()) }