Skip to content

Build deploy documentation

Tobias Kopyto edited this page Jul 8, 2021 · 10 revisions

Build and deploy documentation

How to build

Prerequisites

  1. Clone the repository via
    git clone https://github.com/amosproj/amos-ss2021-project2-context-map.git

  2. Install node from https://nodejs.org/en/ and make sure to add your installation directory to PATH.
    It is required to install node with version 12.x or higher.

  3. Install docker from https://docs.docker.com/get-docker/.

  4. Install yarn by running
    npm i -g yarn

Run the project

  1. Make sure that docker is running.
  2. Navigate to the /build directory within the repository clone.
  3. Run node start-database. A new docker container with the name neo4j-db should run now. If it is only created, but does not run, run the container (you can check if the container is running with the command docker ps in your terminal).

Windows and platforms with powershell installed

Run each of the scripts in the following order within a separate shell instance.

4. .\start-backend-dbg.ps1 
5. .\start-frontend-dbg.ps1

Linux and Mac

Run each of the scripts in the following order.

4. ./start-backend-dbg.sh & 
5. ./start-frontend-dbg.sh &

Once database, backend and frontend were built for one time, the backend and frontend can also be started by running

[4.] node start-backend-detached
[5.] node start-frontend-detached

How to deploy

⚠️ Deployment currently is only rudimentary. There is no automatic deployment. #151 tracks the deployability to docker containers for easy setup.

⚠️ There is currently no common deployment system in place. Current development focuses on this issue, which is tracked by #37 and #60.

Frontend

  1. Make sure to have all the prerequisites from above
  2. Navigate to the /frontend in the project directory
  3. Execute yarn install to install the dependencies
  4. Execute yarn build to build the frontend project. The build output is located in the dist folder.
  5. To configure the frontend, add a .env file to the build output. An example is included in the project sources.

Backend

  1. Make sure to have all the prerequisites from above
  2. Navigate to the /backend in the project directory
  3. Execute yarn install to install the dependencies
  4. Execute yarn build to build the frontend project. The build output is located in the dist folder.
  5. To configure the frontend, add a .env file to the build output. An example is included in the project sources.
Clone this wiki locally