The Andela Meeting Room management solution
check the product scope and roadmap here
- Install Docker and get it running on your machine
-
Install docker
brew cask install docker
OR
-
Create a new directory
mkdir <directory name>
-
In that directory clone both the frontend and backend applications
- Change working directory to the newly created one
cd <directory name>
- Clone the frontend application
https://github.com/andela/mrm_front.git
- Clone the backend application
git clone https://github.com/andela/mrm_api.git
- Change working directory to the newly created one
-
Create environment variables for the backend application and save them in
mrm_api/.env
fileAPP_SETTINGS="testing" # set app Enviroment. SECRET_KEY="some-very-long-string-of-random-characters" DEV_DATABASE_URL="" # Db for Development. TEST_DATABASE_URL="" # Db for Testing DATABASE_URL="" # Db for Production MAIL_SERVER=""# SMTP server MAIL_PORT="" # server port MAIL_USE_TLS="" # Using TLS? MAIL_USERNAME="" # converge username MAIL_PASSWORD="" # password CELERY_BROKER_URL="" # redis url CELERY_RESULT_BACKEND="" # redis url C_FORCE_ROOT=true
-
Create environment variables for frontend in
mrm_front/.env
application# change this to production if in production NODE_ENV=development # the mrm domain name (this should change to the staging or production url) MRM_URL=http://mrm-dev.andela.com:8080 # the url of the mrm staging api (It should change to production URL if in production) MRM_API_URL=http://mrm-dev.andela.com:8000/mrm # the andela url to handle login ANDELA_LOGIN_URL=############ # the analytics page url for axios requests BASE_URL=http://mrm-dev.andela:8000/analytics # the andela api url ANDELA_API_URL=############ FIREBASE_API_KEY=############ FIREBASE_PROJECT_ID=############ FIREBASE_DATABASE_NAME=############
-
Starting the containers.
make build
This will create 5 services
- database
- backend
- frontend
- redis
- test
Start the backend gunicorn server
make run-app
-
Running frontend tests
make frontend-tests
-
Running migrations
- Initial migration commands
make migrate-initial message="Migration message"
- If you have one migration file in the alembic/version folder. Run the commands below:
make migrate
- If you have more than 2 migration files in the alembic/versions folder. Rum the commands bellow
make migrate message="Migration message"
- Initial migration commands
-
Show services
make services
-
Check the status
make status
-
Start services individually
make start service=<service name>
-
Create services individually
make create service=<service name>
-
Stop all services
make down
-
Stop services individually
make stop service=<service name>
-
Remove services individually
make remove service=<service name>
-
Restarting a service
make restart service=<service name>
-
Kill services
make kill
-
Remove a container
make remove
-
SSH into a container
make ssh service=<service name>
- Create a dump from a database, preferrably
--no-owner
flagpg_dump -d <dbname> -U <postgres-user> -h <localhost/ipaddress> --no-owner -F p --column-inserts > converge.sql
- Import the database
make import dump="<path to dump file>"
Further instructions on the backend, kindly visite the mrm_api repo here
$ git clone https://github.com/andela/mrm_front.git
$ cd mrm_front
Ensure you have NodeJS environment and YARN package manager globally installed on your system.
$ git clone https://github.com/andela/mrm_front.git
$ cd mrm_front
$ yarn install
Create a .env file in the root folder of the application where you are to add your environment variables.
The contents of the .env file are pinned on the mrm-coverge
channel. Reach out to @shemogumbe if you cant find them.
Remember some parts of the application won't run if you don't have them
The application runs on mrm-dev.andela.com in development mode. This can be enabled by adding mrm-dev.andela.com to the etc/hosts file as described below.
- On Mac OS using the vim editor.
$ sudo vim /etc/hosts
Then add this line to your file
127.0.0.1 mrm-dev.andela.com
You might need to flush your dns cache to reflect the changes in your etc/hosts file by running.
sudo killall -HUP mDNSResponder
Though you can as well do it manually by running the development server in the new terminal window.
yarn start
yarn test --coverage
- ReactJS - The javascript client library.
- NodeJs - The run time environment.
- SCSS -the CSS pre-processor
Contribtions must follow among other guidelines: