-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Test docker container publishing
- Loading branch information
1 parent
634e9af
commit ca0ef21
Showing
2 changed files
with
59 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
FROM rust:1.81-slim-bookworm as builder | ||
|
||
# Install dependencies. | ||
RUN apt-get update | ||
RUN apt-get install -y \ | ||
libclang-dev \ | ||
git \ | ||
pkg-config \ | ||
libssl-dev \ | ||
make \ | ||
protobuf-compiler \ | ||
npm \ | ||
default-jre | ||
RUN npm install -g pnpm@9 | ||
RUN npm install -g @openapitools/openapi-generator-cli | ||
|
||
WORKDIR /code/sbtc | ||
COPY . . | ||
RUN make install && make build | ||
|
||
# Create Docker image to run the emily server. | ||
FROM debian:bookworm-slim AS emily-server | ||
WORKDIR /code | ||
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ | ||
COPY --from=build /code/sbtc/target/debug/emily-server /usr/local/bin/emily-server | ||
# Server configuration. | ||
ENV HOST=0.0.0.0 | ||
ENV PORT=3030 | ||
# AWS configuration. | ||
ENV AWS_ACCESS_KEY_ID=xxxxxxxxxxxx | ||
ENV AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxx | ||
ENV AWS_REGION=us-west-2 | ||
ENV DYNAMODB_ENDPOINT=http://dynamodb:8000 | ||
ENTRYPOINT ["/bin/sh", "-c", "/usr/local/bin/emily-server --host $HOST --port $PORT --dynamodb-endpoint $DYNAMODB_ENDPOINT"] | ||
|
||
# Create Docker image to run the signer. | ||
FROM debian:bookworm-slim AS signer | ||
COPY --from=build /code/sbtc/target/debug/sbtc-signer /usr/local/bin/sbtc-signer | ||
ENTRYPOINT ["/usr/local/bin/signer --config /signer-config.toml --migrate-db"] | ||
|
||
# Create Docker image to run the blocklist client. | ||
FROM debian:bookworm-slim AS blocklist-client | ||
COPY --from=build /code/sbtc/target/debug/blocklist-client /usr/local/bin/blocklist-client | ||
# TODO(TBD): Fix the blocklist client so it has a configurable config location. | ||
ENTRYPOINT ["/usr/local/bin/blocklist-client"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters