From 7b84abeac5dad67ec20d4bb78d487a5eaeac5bd6 Mon Sep 17 00:00:00 2001 From: kaynetik Date: Tue, 8 Oct 2024 15:01:14 +0200 Subject: [PATCH] fix: Ditch entrypoint script --- .build/docker/Dockerfile | 16 +++++++--------- .build/docker/docker-compose.yml | 2 ++ README.md | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.build/docker/Dockerfile b/.build/docker/Dockerfile index fcc50fb..5092a76 100644 --- a/.build/docker/Dockerfile +++ b/.build/docker/Dockerfile @@ -1,21 +1,19 @@ FROM oven/bun:alpine +ARG TARGET_ARCH + WORKDIR /app COPY . . -RUN echo 'export PS1="\e[01;32m\u\e[m:\e[01;34m\w\e[m\$ "' >> /home/bun/.bashrc - -RUN bun install +RUN bun install --frozen-lockfile -RUN bun build --compile --minify --sourcemap ./workspace/data-proxy/src/index.ts --outfile dataproxy --target=bun-linux-arm64 +RUN bun build --compile --minify --sourcemap ./workspace/data-proxy/src/index.ts --outfile dataproxy --target=${TARGET_ARCH} -# Expose the port the app runs on +# Data Proxy RPC port EXPOSE 5384 RUN chmod +x dataproxy -COPY .build/docker/docker-entrypoint.sh /app/entrypoint.sh -RUN chmod +x /app/entrypoint.sh - -ENTRYPOINT ["sh", "/app/entrypoint.sh"] +ENTRYPOINT ["./dataproxy"] +CMD ["run"] diff --git a/.build/docker/docker-compose.yml b/.build/docker/docker-compose.yml index 93f99fe..105c882 100644 --- a/.build/docker/docker-compose.yml +++ b/.build/docker/docker-compose.yml @@ -3,6 +3,8 @@ services: build: context: ../.. dockerfile: .build/docker/Dockerfile + args: + TARGET_ARCH: ${TARGET_ARCH:-bun-linux-arm64} ports: - "5384:5384" ### Provide the private key if available diff --git a/README.md b/README.md index 032c29c..e6563d9 100644 --- a/README.md +++ b/README.md @@ -200,7 +200,7 @@ The Data Proxy node has support for exposing status information through some end The status endpoint has two routes: -- `//health` +- `//health` Returns a JSON object with the following structure: ```json @@ -214,7 +214,7 @@ The status endpoint has two routes: } ``` -- `//pubkey` +- `//pubkey` Returns the public key of the node. ```json { @@ -241,5 +241,5 @@ The status endpoints can be configured in the config file: ``` - `root`: Root path for the status endpoints. Defaults to `status`. -- `apiKey`: Optionally secure the status endpoints with an API key. The `header` attribute is the header key that needs to be set, and `secret` is the value that it needs to be set to. +- `apiKey`: Optionally secure the status endpoints with an API key. The `header` attribute is the header key that needs to be set, and `secret` is the value that it needs to be set to. The `statusEndpoints.apiKey.secret` attribute supports the `{$MY_ENV_VARIABLE}` syntax for injecting a value from the environment during start up.