Order Management System built with microservices
$ docker -v
Docker version 19.03.5, build 633a0ea838
$ docker-compose -v
docker-compose version 1.25.0, build 0a186604
$ npm -v
6.13.4
$ node -v
v13.6.0
Below instructions are for local dev use!!
Clone the repo:
git clone https://github.com/argipap/SupplyItCodeBase.git
Export environmental variables:
export REACT_APP_USERS_SERVICE_URL=http:https://localhost
export MAILGUN_API_KEY=yourMailgunAPIKey
export MAILGUN_DOMAIN=yourMailgunAPIDomain
Update swagger specification:
python services/swagger/update-spec.py http:https://localhost
From the project's root folder run the command:
docker-compose up -d --build
Check running containers:
docker ps
Check logs:
docker-compose logs {service_name}, e.g docker-compose logs supplyit-users
docker-compose exec supplyit-users python manage.py recreate_db
docker-compose exec supplyit-users python manage.py seed_db
docker-compose exec supplyit-users python manage.py test
docker-compose exec supplyit-users python manage.py cov
docker-compose exec supplyit-users flake8 project
docker-compose exec client npm run tests
docker-compose exec client npm run coverage
./node_modules/.bin/cypress open --config baseUrl=http:https://localhost
TO BE DOCUMENTED ...
- Create a new feature branch from the master branch
- Make an arbitrary change; commit and push it up to GitHub
- After the build passes, open a PR against the development branch to trigger a new build on Travis
- Merge the PR after the build passes
- Open PR from the development branch against the staging branch to trigger a new build on Travis
- Merge the PR after the build passes to trigger a new build
- After the build passes, images are created, tagged staging, and pushed to ECR, revisions are added to the Task Definitions, and the Service is updated
- Open PR from the staging branch against the production branch to trigger a new build on Travis
- Merge the PR after the build passes to trigger a new build
- After the build passes, images are created, tagged production, and pushed to ECR, revisions are added to the Task Definitions, and the Service is updated
- Merge the changes into the master branch