Ensure you have docker, node, and npm installed.
To deploy the following project follow the given steps:
- run
npm install
to download all needed dependencies to run the project - fill in the provided .env file in the client directory with the need information
- run
npm start
if testing locally, ornpm run build
if deploying for production
- run
npm install
to download all needed dependencies to run the project - fill in the provided .env file in the client directory with the need information
Once the above steps have been completed we can deploy the project using docker using the following steps:
- Run
cd /src/deployment
- Add the following environment variables to your terminal "MONGO_ROOT_USER" and "MONGO_ROOT_PASS", make sure the values of these variables are the same as what you stated in the server environment variables files
- Update the Caddy file to point to the correct domain name and change "ports" for in the docker compose file to "expose" for all services except Caddy if you are deploying to a public server.
- Run
docker compose up -d
to deploy
MongoDB can be access on port 27017 Mongo Express can be accessed on port 8081