Skip to content

rfprod/mongo

Repository files navigation

Mongo

MongoDB docker container image with automation utilities.

Commitizen friendly

Workflows

Info Trigger Badge
ℹ️ PR open event (destination: trunk) validate-pr
ℹ️ CodeQL analysis codeql-analysis

Requirements

In order to run own copy of the project one must fulfill the following requirements.

Supported operating system

  • 🏆 Debian based Linux - recommended
    • check out this dev setup instructions to facilitate setting up the dev environment;
    • one will have to install MongoDB oneself;
    • given that the dev environment is set up, the following commands should install everything needed to work with the project;
      yarn install:shellcheck:linux && yarn install
  • 🆗 OSX - should work due to the similarities with Linux
    • one will have to figure out oneself how to set up the dev environment;
    • one will have to install MongoDB oneself;
    • given that the dev environment is set up, the following commands should install everything needed to work with the project;
      yarn install:shellcheck:linux && yarn install
  • 🤷 Windows - should work, but no guarantees
    • one will have to figure out oneself how to set up the dev environment;
    • one will have to install MongoDB oneself;
    • given that the dev environment is set up, the following commands should be used to install shellcheck via PowerShell;
      iwr -useb get.scoop.sh | iex
      scoop install shellcheck
    • recommended shell: Git for Windows > Git BASH.

Core dependencies

Recommended IDE

Package scripts reference

The project has lots of package scripts, check it in the package.json located in the project root, or use the following command (see terminal output for usage tips)

yarn workspace:help

Committing changes to repo

Using commitizen cli is mandatory.

Provided all dependencies are installed, and commitizen cli is installed as a global dependency, this command must be used.

git cz

Environment variables setup

Manualy create the .env file in the project root with the following content

DB_NAME="admin"
DB_CONNECTION_STRING="mongodb://admin:password@127.0.0.1:27017" # replace the default values of the login and the password as needed
DB_CONNECTION_STRING_REMOTE="mongodb://admin:password@127.0.0.1:27017" # put a value here after deploying the database container

or execute the following command to create the .env file with the default values in the project root

yarn env:create

To set arbitrary values of the variable in the .env file, pass the variables via arguments, see help

yarn env:help

Technologies Reference

Container engine

Database

CI

Development methodology

Disclaimers

All logos are the property of their respective owners.