Skip to content

uwb-sel-ar-capstone/work-instructions-web-app

Repository files navigation

work-instructions-web-app

How to run the entire application

Ensure that the latest version of the Docker client is installed on your machine.

❗ WARNING

The user-fix.bat and ./dev-fix.sh scripts in this section will delete ALL Docker images/containers from your machine, not just the ones related to this project.

If you are a user updating from an old version.

If you are using Windows, and you have downloaded a new update of the web app, you must purge the old containers and images from your machine. Do this by running the included user-fix.bat file. If you are not using Windows (i.e. MacOS), you must manually delete all containers and images. You can do this in the docker desktop application.

If you are a dev and need to add a new node package

From your WSL/Linux Terminal run ./dev-fix.sh.

If you are experiencing a permission issue when running NPM Install

From your WSL/Linux Terminal run ./dev-fix-permission-only.sh. Then install your package using NPM install, and finally run ./dev-fix.sh.

Application run command

Open a command window in the project's root directory. Run the following command:

docker compose up

While the docker containers are running, in a separate WSL/terminal window run the following command to populate the database. This only needs to be done once.

docker exec -it work-instructions-web-app-mongo-1 mongorestore --db database --verbose /restore/

The frontend will be available at http://localhost:3000/ and the backend at http://localhost:5000/