-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: KayleCoder <kalecoder@outlook.com>
- Loading branch information
1 parent
0d5c772
commit e2f8daa
Showing
11 changed files
with
16,983 additions
and
1 deletion.
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 @@ | ||
PORT=3000 |
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,58 @@ | ||
name: ethda-faucet (main) | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ "main" ] | ||
jobs: | ||
build: | ||
if: github.repository == 'crustio/ethda-backend' | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: | | ||
.yarn/cache | ||
./node_modules | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install dependencies | ||
run: yarn install | ||
|
||
- name: Build | ||
run: yarn build | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Get current date | ||
id: date | ||
run: echo "date=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV | ||
|
||
- name: Build and push | ||
id: docker_build | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
push: true | ||
tags: | | ||
gavfu/ethda-backend:latest | ||
gavfu/ethda-backend:${{ env.date }} |
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,6 @@ | ||
# base image for local development | ||
FROM node:18 | ||
WORKDIR /app | ||
COPY dist ./dist | ||
COPY node_modules ./node_modules | ||
CMD ["node", "./dist/index.js"] |
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 +1,27 @@ | ||
# ethda-backend | ||
# ethda-backend | ||
|
||
## Configuration | ||
|
||
ethda-backend is configured using environment variables. You can define them using export or with an .env file. | ||
|
||
We provide a .env.example file as reference which you can use as starting point. | ||
|
||
```sell | ||
cp .env.example .env | ||
``` | ||
|
||
## Running ethda-backend locally | ||
|
||
Install dependencies | ||
|
||
```sell | ||
npm install | ||
``` | ||
|
||
Start server | ||
|
||
```sell | ||
npm run dev | ||
``` | ||
|
||
|
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,12 @@ | ||
--- | ||
version: "3.7" | ||
|
||
services: | ||
indexer: | ||
image: gavfu/ethda-backend:latest | ||
network_mode: host | ||
restart: always | ||
env_file: | ||
- ".env" | ||
ports: | ||
- 30002:3000 |
Oops, something went wrong.