diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml index 7bf7fb5..268bd0b 100644 --- a/.github/workflows/backend.yml +++ b/.github/workflows/backend.yml @@ -25,11 +25,11 @@ jobs: - name: Build, release and call telemetry executable working-directory: ./backend - run: cargo run --bin telemetry --release -- --help + run: cargo run --bin telemetry_core --release -- --help - name: Build, release and call shard executable working-directory: ./backend - run: cargo run --bin shard --release -- --help + run: cargo run --bin telemetry_shard --release -- --help - name: Login to Dockerhub uses: docker/login-action@v1 diff --git a/backend/shard.Dockerfile b/backend/Dockerfile similarity index 68% rename from backend/shard.Dockerfile rename to backend/Dockerfile index edcc5bc..117ca76 100644 --- a/backend/shard.Dockerfile +++ b/backend/Dockerfile @@ -10,15 +10,15 @@ RUN cargo build --${PROFILE} --bins # MAIN IMAGE FOR PEOPLE TO PULL --- small one# FROM debian:buster-slim LABEL maintainer="Parity Technologies" -LABEL description="Polkadot Telemetry backend shard, static build" +LABEL description="Polkadot Telemetry backend shard/core binaries, static build" ARG PROFILE=release WORKDIR /usr/local/bin COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ -COPY --from=builder /app/target/$PROFILE/shard /usr/local/bin +COPY --from=builder /app/target/$PROFILE/telemetry_shard /usr/local/bin +COPY --from=builder /app/target/$PROFILE/telemetry_core /usr/local/bin RUN apt-get -y update && apt-get -y install openssl && apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/ EXPOSE 8000 -ENTRYPOINT ["shard"] diff --git a/backend/README.md b/backend/README.md index 90bb37b..d82c6eb 100644 --- a/backend/README.md +++ b/backend/README.md @@ -15,4 +15,4 @@ As we move to a sharded version of this telemetry server, this set of architectu # Deployment -A `shard.Dockerfile` and `telemetry.Dockerfile` exist to build the Shard and Telemetry Core binaries into docker containers. A `docker-compose.yaml` in the root of the repository can serve as an example of these services, along with the UI, running together. \ No newline at end of file +A `Dockerfile` exists which builds the Shard and Telemetry Core binaries into an image. A `docker-compose.yaml` in the root of the repository can serve as an example of these services, along with the UI, running together. \ No newline at end of file diff --git a/backend/telemetry.Dockerfile b/backend/telemetry.Dockerfile deleted file mode 100644 index 4e26bf9..0000000 --- a/backend/telemetry.Dockerfile +++ /dev/null @@ -1,24 +0,0 @@ -FROM paritytech/ci-linux:production as builder - -ARG PROFILE=release -WORKDIR /app - -COPY . . - -RUN cargo build --${PROFILE} --bins - -# MAIN IMAGE FOR PEOPLE TO PULL --- small one# -FROM debian:buster-slim -LABEL maintainer="Parity Technologies" -LABEL description="Polkadot Telemetry backend core, static build" - -ARG PROFILE=release -WORKDIR /usr/local/bin - -COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ -COPY --from=builder /app/target/$PROFILE/telemetry /usr/local/bin -RUN apt-get -y update && apt-get -y install openssl && apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/ - -EXPOSE 8000 - -ENTRYPOINT ["telemetry"] diff --git a/docker-compose.yml b/docker-compose.yml index f6559ab..c6d5ebc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,9 +15,10 @@ services: - 3000 telemetry-backend-shard: build: - dockerfile: shard.Dockerfile + dockerfile: Dockerfile context: ./backend/ command: [ + 'telemetry_shard', '--listen', '0.0.0.0:8001', '--core', 'http://telemetry-backend-core:8000/shard_submit' ] @@ -27,9 +28,10 @@ services: - 8001 telemetry-backend-core: build: - dockerfile: telemetry.Dockerfile + dockerfile: Dockerfile context: ./backend/ command: [ + 'telemetry_core', '--listen', '0.0.0.0:8000' ] ports: