-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat-solidity-refactor
- Loading branch information
Showing
99 changed files
with
1,784 additions
and
10,753 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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"Hyperlane": "0x8bA20dB35218bEF1c33Ae6bd129a07f157c71B2D", | ||
"Pragma": "0x50fEbf423F5Fc61C2512bb5F9c6B1878d37C50DF" | ||
"Hyperlane": "0x330ec0B08B74a4F34Fd76B0917A55169885624Be", | ||
"Pragma": "0xcD025F607AdB9542B77C69A29B7b9Aa32Bf06811" | ||
} |
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,4 @@ | ||
{ | ||
"Hyperlane": "0x858FA2FacF63A3e529cAb4F5a02ceaFb590db2c1", | ||
"Pragma": "0x78EA64467F0C4DB1b08b6A2E880f92135Deb4126" | ||
} |
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,43 @@ | ||
|
||
FROM public.ecr.aws/docker/library/rust:1.81.0-slim-bookworm AS build | ||
|
||
ARG PACKAGE_NAME=theoros | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
build-essential pkg-config libssl-dev protobuf-compiler curl libprotobuf-dev && \ | ||
apt-get autoremove -y && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN apt-get update && apt-get install -y bash curl && curl -1sLf \ | ||
'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.deb.sh' | bash \ | ||
&& apt-get update && apt-get install -y infisical | ||
|
||
WORKDIR /app | ||
|
||
COPY ./rust . | ||
|
||
RUN cargo build --release --package ${PACKAGE_NAME} | ||
|
||
FROM public.ecr.aws/docker/library/debian:bookworm-slim | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
libssl-dev wget ca-certificates && \ | ||
apt-get autoremove -y && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
RUN groupadd pragma | ||
|
||
RUN useradd -g pragma pragma | ||
|
||
USER pragma | ||
|
||
WORKDIR /home/pragma | ||
EXPOSE 3000 | ||
EXPOSE 8080 | ||
COPY --from=build /usr/bin/infisical /usr/bin/infisical | ||
COPY infra/theoros/entrypoint.sh /home/pragma/entrypoint.sh | ||
# Copy artifacts from base image | ||
COPY --from=build /app/target/release/theoros /usr/local/bin/ | ||
|
||
ENTRYPOINT ["/bin/bash","/home/pragma/entrypoint.sh"] |
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,29 @@ | ||
version: 0.2 | ||
phases: | ||
pre_build: | ||
commands: | ||
- echo Logging in to Amazon ECR... | ||
- aws --version | ||
- aws ecr get-login-password --region $ECR_REGION | docker login --username AWS --password-stdin $AWS_ACCOUNT_ID.dkr.ecr.$ECR_REGION.amazonaws.com | ||
- REPOSITORY_URI=$AWS_ACCOUNT_ID.dkr.ecr.$ECR_REGION.amazonaws.com/$ECR_REPOSITORY_NAME | ||
- COMMIT_HASH=$(echo $CODEBUILD_RESOLVED_SOURCE_VERSION | cut -c 1-7) | ||
- IMAGE_TAG=${COMMIT_HASH:=latest} | ||
build: | ||
commands: | ||
- echo Build started on `date` | ||
- echo Building the Docker image... | ||
- ls -ltr | ||
- docker build -f infra/theoros/Dockerfile -t $REPOSITORY_URI:latest . | ||
- docker tag $REPOSITORY_URI:latest $REPOSITORY_URI:$IMAGE_TAG | ||
post_build: | ||
commands: | ||
- echo Pushing the Docker images... | ||
- docker push $REPOSITORY_URI:latest | ||
- docker push $REPOSITORY_URI:$IMAGE_TAG | ||
- echo Writing image definitions file... | ||
- printf '[{"name":"%s","imageUri":"%s"}]' $ECS_CONTAINER_NAME $REPOSITORY_URI:$IMAGE_TAG > imagedefinitions.json | ||
artifacts: | ||
files: | ||
- imagedefinitions.json | ||
- infra/theoros/config.yml | ||
discard-paths: yes |
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,9 @@ | ||
path: "/" | ||
container_port: 3000,8080 | ||
health_check_path: "/health" | ||
container_environment: | ||
- region: "eu-west-3" | ||
- prefix: "/conf/{{ SERVICE_NAME }}/{{ RUN_ENV }}" | ||
- keys: | ||
- INFISICAL_ENV | ||
- INFISICAL_APP_PATH |
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,7 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
export INFISICAL_TOKEN=$(infisical login --method=universal-auth --client-id=${INFISICAL_CLIENT_ID} --client-secret=${INFISICAL_CLIENT_SECRET} --silent --plain) | ||
infisical export --projectId=${INFISICAL_PROJECT_ID} --env=${INFISICAL_ENV} --path=${INFISICAL_APP_PATH} > .env | ||
source .env | ||
wget ${EVM_URL} -O evm_config.yaml | ||
exec theoros ${ARGS} |
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
Oops, something went wrong.