Skip to content

feat: dockerize the application and update it to use env variables#6

Open
weslleycamilo wants to merge 3 commits into
Biscoint:masterfrom
weslleycamilo:feat/dockerize
Open

feat: dockerize the application and update it to use env variables#6
weslleycamilo wants to merge 3 commits into
Biscoint:masterfrom
weslleycamilo:feat/dockerize

Conversation

@weslleycamilo

Copy link
Copy Markdown

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:

image

@bolaum bolaum left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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...

Comment thread README.EN.md Outdated
Comment thread Dockerfile
npm i

COPY . .
CMD npm start No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean and simple 👏🏻👏🏻👏🏻

Comment thread src/index.js
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

@bolaum bolaum May 15, 2020

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@weslleycamilo weslleycamilo May 15, 2020

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thas is right.. I didn't attend to it sorry :( It's always uppercase letters.

Ok thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants