Docker should be installed on your local machine
You need to run this command:
docker-compose up
And beuww! 🎉
- Go to http://localhost:3050 for React App
- Use http://localhost:3050/api to sending requests to API
For stopping and removing containers:
docker-compose down
In related directory;
For React App: npx eslint
For Express App: npx eslint
For Worker App: npx eslint
In related directory;
For React App: npm test
For Express App: npm test
For Worker App: npm test
-
Production branch: master
-
Developing branch: develop
Before pushing develop and master branch please run eslint and test scripts for client and server directories
Postman Documentation // Will change url
- host:
localhost
- port:
27016
npm run start
: Creates development server on port 3000 (client)
npm run build
: Builds production files
npm run test
: Runs client tests
npm run dev
: Creates development server on port 5000 (server)
npm run start
: runs server for production
npm run test
: Runs server tests
This app depends to server and client app and ypu don't need to run it independently without docker for normal development cycle.
Project has 6 main containers for developing environment:
- Front-End App (client)
- Back-End App (server)
- Cron Jobs (worker app)
- Nginx (handles requests coming from browser or your local machine)
- MongoDb (main database)
- Redis (in-memory data structure store)
FD and BD containers have a development dockerfile and can work independently. You don't need to use other containers independently.
Composes these 5 containers and creates a development environment. Listens port 3050
-
For running containers with docker-compose
docker-compose up
-
For stopping/killing containers
docker-compose down
-
For building images and running containers (only when docker file changes or new npm modules)
docker-compose up --build
For building container:
docker build -t <tagname> -f Dockerfile.dev .
For running container (macos):
docker run -p 3000:3000 -v /app/node_modules -v $(pwd):/app <tagname>
For building container:
docker build -t <tagname> -f Dockerfile.dev .
For running container (macos):
docker run -p 5000:5000 -v /app/node_modules -v $(pwd):/app <tagname>
Serves requests for client and server app
Server app requests should be started with 'api' prefix