-
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.
Adjust config code & Add CI/CD files
Signed-off-by: KayleCoder <[email protected]>
- Loading branch information
1 parent
066dc32
commit 8154704
Showing
9 changed files
with
118 additions
and
7 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 |
---|---|---|
@@ -1 +1,2 @@ | ||
TON_BAG_ADDRESS=kQD8ntXDohGn8GPVfxX5BF6zfgl7A_fks-8QoVcmKx5TE5M- | ||
TON_BAG_ADDRESS=EQBOOMNqG0rvNm6vFGfR4qZl48BTDw_gYefVI4DQ70t9GoPC | ||
TASK_PROVIDER_MNEMONIC=xxx ... |
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: Build tonbags-manager (main) | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ "main" ] | ||
jobs: | ||
build: | ||
if: github.repository == 'crustio/tonbags-manager' | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [20.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: | | ||
crustio/tonbags-manager:latest | ||
crustio/tonbags-manager:${{ 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:20 | ||
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,3 +1,29 @@ | ||
# tonbags-manager | ||
|
||
tonbags-manager is a file picking bot which continuously picking and handling files from tonbags-contract. | ||
## Description | ||
|
||
tonbags-manager is a file picking bot which continuously picking and handling files from tonbags-contract. | ||
|
||
## Configuration | ||
|
||
tonbags-manager 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. | ||
|
||
```bash | ||
cp .env.example .env | ||
``` | ||
|
||
## Running locally | ||
|
||
Install dependencies | ||
|
||
```bash | ||
yarn install | ||
``` | ||
|
||
Run | ||
|
||
```bash | ||
yarn 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,13 @@ | ||
--- | ||
version: "3.7" | ||
|
||
services: | ||
manager: | ||
container_name: tonbags-manager | ||
image: crustio/tonbags-manager:latest | ||
restart: always | ||
env_file: | ||
- ".env" | ||
volumes: | ||
- ./data:/app/data | ||
- ./log:/app/log |
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 |
---|---|---|
|
@@ -7,14 +7,16 @@ | |
"author": "KayleCoder <[email protected]>", | ||
"license": "MIT", | ||
"scripts": { | ||
"build": "gts clean && tsc" | ||
"build": "gts clean && tsc", | ||
"dev": "node --require ts-node/register src/index.ts" | ||
}, | ||
"dependencies": { | ||
"@orbs-network/ton-access": "^2.3.3", | ||
"@ton/core": "^0.56.3", | ||
"@ton/crypto": "^3.2.0", | ||
"@ton/ton": "^13.11.2", | ||
"axios": "^1.7.2", | ||
"dotenv": "^16.4.5", | ||
"js-sha256": "^0.11.0", | ||
"sequelize": "^6.35.2", | ||
"sqlite3": "^5.1.7", | ||
|
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
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