This is the "CI" portion of #19 - please leave the branch intact and I will get the CD / package publication working next.
This PR introduces a number of significant changes:
config.json is now pushed to the repo. All sensitive information has been moved into .env, which is not pushed (and should never be).
A .env file is now required to run the bot in either "local dev mode" (i.e. npm start) or in docker (i.e. npm run docker:start).
The docker process has been updated in README.md
Local dev mode requires less variables (not documented, just ask me)
ESLint has been added and now runs as part of the CI build, reporting basic linting errors up to es2020
config.json now has sections, though I have not yet abstracted them all into their own classes - this will be done in the coming weeks!
npm start now runs dotenv, which essentially parses the .env file for development.
The docker container no longer runs npm start, a new task - npm run start:hosted has been created which is the same as the old npm start command (.env is read as part of the docker environment bootstrap sequence, and environment variables are scoped for each container in docker-compose.yml, so it is not required)
Minor changes
Fixed up a number of linting errors
Fixed up some uses of faker.js that were incorrectly setting strings to objects / functions. Tests still passed though, because JavaScript ;)
Prefixed all bot specific environment variables with BOT_ to distinguish them from others (such as MYSQL_)
Please review and PR this into master so we can start getting CI feedback in all our branches - I'll create another PR for the CD work from the same branch.
This is the "CI" portion of #19 - please leave the branch intact and I will get the CD / package publication working next.
This PR introduces a number of significant changes:
config.json
is now pushed to the repo. All sensitive information has been moved into.env
, which is not pushed (and should never be)..env
file is now required to run the bot in either "local dev mode" (i.e.npm start
) or in docker (i.e.npm run docker:start
).config.json
now has sections, though I have not yet abstracted them all into their own classes - this will be done in the coming weeks!npm start
now runsdotenv
, which essentially parses the.env
file for development.npm start
, a new task -npm run start:hosted
has been created which is the same as the oldnpm start
command (.env
is read as part of the docker environment bootstrap sequence, and environment variables are scoped for each container indocker-compose.yml
, so it is not required)Minor changes
BOT_
to distinguish them from others (such asMYSQL_
)Please review and PR this into master so we can start getting CI feedback in all our branches - I'll create another PR for the CD work from the same branch.