-
Notifications
You must be signed in to change notification settings - Fork 2
Docker and local deployment tutorial
mervegrbz edited this page Oct 17, 2023
·
3 revisions
- You can install docker for your computer from there
- Since we use MongoDB as a database you can use MongoCompass. It is a useful GUI for DB management.
- You can see
docker-compose.yaml
under theDisaster-Response-Platform
folder. It is a configuration file used to define and run multi-container Docker applications. It allows you to specify a set of services, networks, and volumes for your application and define how they interact with each other. Run this command in this directory.
docker-compose up -d --build
- This command will search
Dockerfile
s under the backend and frontend folders and create and run a container by using these dockerfiles. - Our backend uses 8000 and the frontend uses 3000 ports. So if your local ports are not empty this command will throw an error .
- If you want to run containers one by one you can use
docker build -t frontend .
docker run -p 3000:3000 -d frontend
Or you ca write:
docker-compose up -d --build frontend
- You can easily implement it for backend by just writing backend and 3000 instead of 8000.
- You can see the definition of our database in docker-compose.yaml . If you want to just run the mongo on local you can use:
docker run -d -p 27017:27017 --name darpDB mongo
Or
docker-compose up -d --build mongo
- Since MongoDB stores data in a schema-less format, unlike relational databases, There is no need to create tables (its name is collection in Mongo) at first. But you need to create a Database for the application. Our Database name is
disasterApp
for now. You can easily create the database on Mongodbcompass UI. - The backend team will initialize schemas while developing. But for now, It will be enough to run Mongo container.
📌 Communication Plan
📌 Docker and local deployment tutorial
📌 RAM
📌 Test Traceability Matrix