-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from NethermindEth/feature/ci
Feature/ci
- Loading branch information
Showing
19 changed files
with
404 additions
and
26 deletions.
There are no files selected for viewing
3 changes: 2 additions & 1 deletion
3
.github/workflows/backend-ci.yaml → .github/workflows/backend-check.yaml
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,6 +1,7 @@ | ||
name: Backend CI | ||
name: Backend checks | ||
|
||
on: | ||
workflow_call: | ||
pull_request: | ||
paths: | ||
- 'app/backend/**' | ||
|
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,33 @@ | ||
name: Backend deploy | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
backend-check: | ||
uses: ./.github/workflows/backend-check.yaml | ||
|
||
deploy: | ||
needs: backend-check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install SSH key | ||
uses: shimataro/ssh-key-action@v2 | ||
with: | ||
key: ${{ secrets.SSH_KEY }} | ||
known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }} | ||
|
||
- name: Copy input secrets to environment variables | ||
uses: oNaiPs/secrets-to-env-action@ec46a22bfc9b37e014b627b3208b07eb8909ea0f | ||
with: | ||
secrets: ${{ toJSON(secrets) }} | ||
include: INPUT_* | ||
convert_prefix: false | ||
|
||
- name: Deploy & run docker | ||
run: docker compose up -d | ||
env: | ||
DOCKER_HOST: ${{ format('ssh://{0}@{1}', secrets.SSH_USERNAME, secrets.SSH_HOST) }} |
3 changes: 2 additions & 1 deletion
3
.github/workflows/frontend-ci.yaml → .github/workflows/frontend-check.yaml
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,6 +1,7 @@ | ||
name: Frontend CI | ||
name: Frontend checks | ||
|
||
on: | ||
workflow_call: | ||
pull_request: | ||
paths: | ||
- 'app/frontend/**' | ||
|
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
dist |
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,24 @@ | ||
DEPLOYMENT_ENV=dev | ||
API_PORT=8080 | ||
|
||
DB_URI=${INPUT_DB_URI?error} | ||
DB_FRESH_START=false | ||
PGSSLMODE=no-verify | ||
|
||
PRICING_MODULE_ENABLED=false | ||
PRICING_COINCAP_BASE_URL=https://api.coincap.io/v2 | ||
PRICING_COINCAP_API_KEY=${INPUT_COINCAP_APIKEY?error} | ||
PRICING_MINUTE_RATE_LIMIT=500 | ||
|
||
ETHEREUM_RPC_ENDPOINT=${INPUT_ETHEREUM_ENDPOINT?error} | ||
OPTIMISM_RPC_ENDPOINT=${INPUT_OPTIMISM_ENDPOINT?error} | ||
|
||
ETHEREUM_MONITOR_MODULE_ENABLED=true | ||
ETHEREUM_MONITOR_POLL_INTERVAL_MS=10000 | ||
ETHEREUM_MONITOR_START_BLOCK=19119000 | ||
ETHEREUM_MONITOR_MAX_LOG_RANGE=5000 | ||
|
||
OPTIMISM_MODULE_ENABLED=true | ||
OPTIMISM_START_BLOCK=115952816 | ||
OPTIMISM_MAX_BLOCK_RANGE=50 | ||
OPTIMISM_POLL_INTERVAL_MS=15000 |
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 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# build files | ||
/dist/* |
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,14 @@ | ||
FROM node:20.11.1 | ||
RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app | ||
WORKDIR /home/node/app | ||
USER node | ||
|
||
COPY --chown=node:node package.json ./ | ||
RUN npm install | ||
|
||
COPY --chown=node:node tsconfig.json ./ | ||
COPY --chown=node:node src ./src | ||
RUN npm run build | ||
|
||
EXPOSE 8080 | ||
CMD [ "node", "./dist/index.js" ] |
Oops, something went wrong.