Skip to content

Commit

Permalink
feat: remove separate runner image
Browse files Browse the repository at this point in the history
  • Loading branch information
smrz2001 committed May 19, 2024
1 parent 0a2d4f3 commit a9e3193
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 315 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/anchor-contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ name: anchor-contract-pipeline

on:
push:
branches: [ '**' ]
paths-ignore:
- '.github/**'
- 'auth/**'
paths:
- contracts/src/*.sol
workflow_dispatch: # manually triggered

env:
Expand Down
113 changes: 0 additions & 113 deletions .github/workflows/build_push_publish.yml

This file was deleted.

22 changes: 0 additions & 22 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,3 @@ RUN chmod +x ./entrypoint.sh

ENTRYPOINT ["./entrypoint.sh"]
CMD npm run start

FROM base as runner

# For running on AWS ECS
ENV AWS_REGION=${AWS_REGION}
ENV AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
ENV AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
ENV AWS_ECS_CLUSTER=${AWS_ECS_CLUSTER}
ENV AWS_ECS_FAMILY=${AWS_ECS_FAMILY}

# Discord notifications about running ECS tasks
ENV DISCORD_WEBHOOK_URL=${DISCORD_WEBHOOK_URL}
ENV CLOUDWATCH_LOG_BASE_URL=${CLOUDWATCH_LOG_BASE_URL}

WORKDIR /cas

COPY runner ./runner
COPY runner.sh ./
RUN chmod +x ./runner.sh

ENTRYPOINT ["./entrypoint.sh"]
CMD [ "./runner.sh" ]
14 changes: 0 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,6 @@ This implementation currently uses the Ethereum blockchain but is built in order
docker build . --target base -t cas
```

**Build the runner image (optional):**

The runner is only useful if running CAS with ECS.
It sends updates on the start and exit status of the container to Discord webhooks.
```sh
docker build . --target runner -t cas-runner

docker run cas-runner

# Test the runner with Discord by using test
# webhooks instead of the actual alert channels.
docker run -e DISCORD_WEBHOOK_URL_INFO_CAS="<test_webhook_url>" -e DISCORD_WEBHOOK_URL_ALERTS="<test_webhook_url>" cas-runner
```

### Docker Compose

Docker compose will run two instances of CAS--the api in "server" mode and the anchor worker in "anchor" mode.
Expand Down
19 changes: 0 additions & 19 deletions runner.sh

This file was deleted.

70 changes: 0 additions & 70 deletions runner/helpers.js

This file was deleted.

24 changes: 0 additions & 24 deletions runner/report-exit.js

This file was deleted.

24 changes: 0 additions & 24 deletions runner/report-failure.js

This file was deleted.

25 changes: 0 additions & 25 deletions runner/report-start.js

This file was deleted.

0 comments on commit a9e3193

Please sign in to comment.