Skip to content

Commit

Permalink
Updated for monitoring multiple coins simultaneously and other improv…
Browse files Browse the repository at this point in the history
…ements (chrisleekr#77)

- Updated frontend to display version - chrisleekr#59
- Support monitoring multiple coins simultaneously - chrisleekr#77
- Added docker-stack.yml for the Portainer - @hipposen
- Fixed precision issues for some FIAT - chrisleekr#90
- Improved frontend & settings UI - chrisleekr#93 chrisleekr#85
- Support all symbols - chrisleekr#104
- Added stop loss feature - chrisleekr#99
- Stabilised Local Tunnel, cronjob and Binance WebSocket
- Prevented to place new order when the API limit reached - chrisleekr#163
- Added NPM task for building docker image on Windows by @garyng - chrisleekr#175

Co-authored-by: GaryNg <[email protected]>
  • Loading branch information
chrisleekr and garyng authored May 21, 2021
1 parent e58be04 commit f535b18
Show file tree
Hide file tree
Showing 181 changed files with 29,128 additions and 6,495 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ log

docker-compose.yml
docker-compose.server.yml

.git
4 changes: 4 additions & 0 deletions .env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ BINANCE_SLACK_USERNAME=
## Local Tunnel
BINANCE_LOCAL_TUNNEL_ENABLED=true
BINANCE_LOCAL_TUNNEL_SUBDOMAIN=default

## Feature Toggles
BINANCE_FEATURE_TOGGLE_NOTIFY_ORDER_CONFIRM=true
BINANCE_FEATURE_TOGGLE_NOTIFY_DEBUG=false
5 changes: 3 additions & 2 deletions .github/workflows/release-and-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ jobs:
- name: Build/Push production docker image
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin ${{ secrets.REGISTRY_DOMAIN }}
PACKAGE_VERSION=$(grep version package.json | cut -c 15- | rev | cut -c 3- | rev)
docker build . --build-arg PACKAGE_VERSION=$PACKAGE_VERSION --build-arg NODE_ENV=production --target production-stage -t ${{ secrets.REGISTRY_DOMAIN }}/chrisleekr/binance-trading-bot:latest -t ${{ secrets.REGISTRY_DOMAIN }}/chrisleekr/binance-trading-bot:$PACKAGE_VERSION
PACKAGE_VERSION=$(grep -m1 version package.json | cut -c 15- | rev | cut -c 3- | rev)
GIT_HASH=$(git rev-parse --short HEAD)
docker build . --build-arg PACKAGE_VERSION=$PACKAGE_VERSION --build-arg GIT_HASH=$GIT_HASH --build-arg NODE_ENV=production --target production-stage -t ${{ secrets.REGISTRY_DOMAIN }}/chrisleekr/binance-trading-bot:latest -t ${{ secrets.REGISTRY_DOMAIN }}/chrisleekr/binance-trading-bot:$PACKAGE_VERSION
docker push ${{ secrets.REGISTRY_DOMAIN }}/chrisleekr/binance-trading-bot:$PACKAGE_VERSION
docker push ${{ secrets.REGISTRY_DOMAIN }}/chrisleekr/binance-trading-bot:latest
30 changes: 6 additions & 24 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,35 +22,17 @@ testing:
- npm run lint
- npm run test

bump-version-patch:
stage: release
image: node:14
only:
- master
script:
- git config --global user.email "$GIT_CI_EMAIL"
- git config --global user.name "$GIT_CI_NAME"
- PACKAGE_VERSION=$(npm version patch -m "Update version to %s [skip ci]")
- git push
https://$GIT_CI_USERNAME:$GIT_CI_PASSWORD@$GIT_REPO_DOMAIN/chrisleekr/binance-trading-bot.git
HEAD:master
- git push
https://$GIT_CI_USERNAME:$GIT_CI_PASSWORD@$GIT_REPO_DOMAIN/chrisleekr/binance-trading-bot.git
"$PACKAGE_VERSION"

production:
stage: build production
image: docker:stable
image: docker:stable-git
only:
- master
<<: *before-script
script:
- PACKAGE_VERSION=$(grep version package.json | cut -c 15- | rev | cut -c 3-
| rev)
- PACKAGE_VERSION=$(grep -m1 version package.json | cut -c 15- | rev | cut
-c 3- | rev)
- GIT_HASH=$(git rev-parse --short HEAD)
- docker build . --build-arg PACKAGE_VERSION=$PACKAGE_VERSION --build-arg
NODE_ENV=production --target production-stage -t
$REGISTRY_DOMAIN/chrisleekr/binance-trading-bot:latest -t
$REGISTRY_DOMAIN/chrisleekr/binance-trading-bot:$PACKAGE_VERSION
- docker push
$REGISTRY_DOMAIN/chrisleekr/binance-trading-bot:$PACKAGE_VERSION
GIT_HASH=$GIT_HASH --build-arg NODE_ENV=production --target
production-stage -t $REGISTRY_DOMAIN/chrisleekr/binance-trading-bot:latest
- docker push $REGISTRY_DOMAIN/chrisleekr/binance-trading-bot:latest
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/node_modules/**
/dist/**
/tests/unit/coverage/**
*.md
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,16 @@ All notable changes to this project will be documented in this file.

## Unreleased

- Added `docker-stack.yml` for the Portainer -
[@hipposen](https://github.com/hipposen)
- Updated frontend to display version - [#59](https://github.com/chrisleekr/binance-trading-bot/issues/59)
- Support monitoring multiple coins simultaneously - [#77](https://github.com/chrisleekr/binance-trading-bot/pull/77)
- Added `docker-stack.yml` for the Portainer - [@hipposen](https://github.com/hipposen)
- Fixed precision issues for some FIAT - [#90](https://github.com/chrisleekr/binance-trading-bot/issues/90)
- Improved frontend & settings UI - [#93](https://github.com/chrisleekr/binance-trading-bot/issues/93) [#85](https://github.com/chrisleekr/binance-trading-bot/issues/85)
- Support all symbols - [#104](https://github.com/chrisleekr/binance-trading-bot/issues/104)
- Added stop loss feature - [#99](https://github.com/chrisleekr/binance-trading-bot/issues/99)
- Stabilised Local Tunnel, cronjob and Binance WebSocket
- Prevented to place new order when the API limit reached - [#163](https://github.com/chrisleekr/binance-trading-bot/issues/163)
- Added NPM task for building docker image on Windows by [@garyng](https://github.com/garyng) - [#175](https://github.com/chrisleekr/binance-trading-bot/pull/175)

## [0.0.65] - 2021-03-27

Expand Down
19 changes: 4 additions & 15 deletions DONATIONS.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,13 @@
# Donations

First of all, you do not need to donate any money to use this project. It's
free, open source, so anyone can use it. You don't have any obligation to donate
First of all, you do not need to donate any money to use this project. It's free, open source, so anyone can use it. You don't have any obligation to donate
to this project.

I give no warranty and accepts no responsibility or liability for the accuracy
or the completeness of the information and materials contained in this project.
Under no circumstances will I be held responsible or liable in any way for any
claims, damages, losses, expenses, costs or liabilities whatsoever (including,
without limitation, any direct or indirect damages for loss of profits, business
interruption or loss of information) resulting from or arising directly or
indirectly from your use of or inability to use this code or any code linked to
it, or from your reliance on the information and material on this code, even if
I have been advised of the possibility of such damages in advance.
I give no warranty and accepts no responsibility or liability for the accuracy or the completeness of the information and materials contained in this project. Under no circumstances will I be held responsible or liable in any way for any claims, damages, losses, expenses, costs or liabilities whatsoever (including, without limitation, any direct or indirect damages for loss of profits, business interruption or loss of information) resulting from or arising directly or indirectly from your use of or inability to use this code or any code linked to it, or from your reliance on the information and material on this code, even if I have been advised of the possibility of such damages in advance.

Please note donating fund does not mean I will work for you or develop the
features you asked for.
Please note donating fund does not mean I will work for you or develop the features you asked for.

The donated funds will be used for testing the bot or buying gifts for my wife,
toys for my daughter and coffee beans for me.
The donated funds will be used for testing the bot or buying gifts for my wife, toys for my daughter and coffee beans for me.

| Cryptocurrencies | Network | Address |
| ------------------------------------------------------------- | ------------------------- | ------------------------------------------------------------------------------------------------- |
Expand Down
22 changes: 20 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@ RUN npm install

COPY . .

ARG PACKAGE_VERSION=untagged
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
LABEL com.chrisleekr.binance-trading-bot.package-version=${PACKAGE_VERSION}

ARG GIT_HASH=unspecified
ENV GIT_HASH=${GIT_HASH}
LABEL com.chrisleekr.binance-trading-bot.git-hash=${GIT_HASH}

ARG NODE_ENV=development
ENV NODE_ENV=${NODE_ENV}
LABEL com.chrisleekr.binance-trading-bot.node-env=${NODE_ENV}

CMD [ "npm", "run", "dev" ]

# build stage
Expand All @@ -26,10 +38,16 @@ RUN npm install --production
FROM node:14-alpine AS production-stage

ARG PACKAGE_VERSION=untagged
LABEL PackageVersion=${PACKAGE_VERSION}
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
LABEL com.chrisleekr.binance-trading-bot.package-version=${PACKAGE_VERSION}

ARG GIT_HASH=unspecified
ENV GIT_HASH=${GIT_HASH}
LABEL com.chrisleekr.binance-trading-bot.git-hash=${GIT_HASH}

ARG NODE_ENV=production
LABEL Environment=${NODE_ENV}
ENV NODE_ENV=${NODE_ENV}
LABEL com.chrisleekr.binance-trading-bot.node-env=${NODE_ENV}

WORKDIR /srv

Expand Down
Loading

0 comments on commit f535b18

Please sign in to comment.