Skip to content

Commit

Permalink
fix: Ditch entrypoint script
Browse files Browse the repository at this point in the history
  • Loading branch information
kaynetik committed Oct 8, 2024
1 parent 566074b commit 7b84abe
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
16 changes: 7 additions & 9 deletions .build/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
2 changes: 2 additions & 0 deletions .build/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ The Data Proxy node has support for exposing status information through some end

The status endpoint has two routes:

- `/<statusEndpointsRoot>/health`
- `/<statusEndpointsRoot>/health`
Returns a JSON object with the following structure:

```json
Expand All @@ -214,7 +214,7 @@ The status endpoint has two routes:
}
```

- `/<statusEndpointsRoot>/pubkey`
- `/<statusEndpointsRoot>/pubkey`
Returns the public key of the node.
```json
{
Expand All @@ -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.

0 comments on commit 7b84abe

Please sign in to comment.