feat: dockerize the application and update it to use env variables#6
Open
weslleycamilo wants to merge 3 commits into
Open
feat: dockerize the application and update it to use env variables#6weslleycamilo wants to merge 3 commits into
weslleycamilo wants to merge 3 commits into
Conversation
bolaum
reviewed
May 15, 2020
bolaum
left a comment
Contributor
There was a problem hiding this comment.
@weslleycamilo this is awesome! Thanks! I'll do the following: I want to add a lib to improve config parsing and I'll make a few changes branched from your PR, along with some linting fixes.
I'll make some comments inline...
| npm i | ||
|
|
||
| COPY . . | ||
| CMD npm start No newline at end of file |
bolaum
reviewed
May 15, 2020
Comment on lines
+6
to
+15
| let apiKey = process.env.apiKey | ||
| let apiSecret = process.env.apiSecret | ||
| let amount = process.env.amount || 100 | ||
| let amountCurrency = process.env.amountCurrency || "BRL" | ||
| let initialBuy = process.env.initialBuy || true | ||
| let minProfitPercent = process.env.minProfitPercent || 0.02 | ||
| let intervalSeconds = process.env.intervalSeconds || 'null' | ||
| let playSound = process.env.playSound || false | ||
| let simulation = process.env.simulation || false | ||
| let executeMissedSecondLeg = process.env.executeMissedSecondLeg || true |
Contributor
There was a problem hiding this comment.
It's not common to name environment variables in camelCase, we usually use ALL_CAPS_SNAKE_CASE. But don't worry, since I'll be changing the config lib, I'll fix it.
Author
There was a problem hiding this comment.
thas is right.. I didn't attend to it sorry :( It's always uppercase letters.
Ok thank you.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi guys,
I'm a new user of the Biscoint platform which I got to know from Bruno Perini a new business partner and I was testing its API today with its tool here.
Congrats to have this tool and to make it open source.
My goal here is to dockerize this bot so I've made some improvements which I believe will be easier for new users to try on and may help you in the development process. I'm not a expert in NodeJs so if there is anything more to improve let me know.
Evidence that it is working: