Installation#
Prerequisites#
In order to use the application you need to install:
- docker >= 20.10.16
- docker compose >= 1.25.5
- VSCode (for development)
- git
First, clone and enter the repository:
Preview#
If you just want to run the application, you can do so with a single command:
To access it, open http://localhost:5050 in your browser. The REST API will be available on port 8000.
If you have trouble downloading the container see the GitHub Container Registry section.
Development#
VSCode Development Container#
To develop the application you need to set up the VSCode development container.
- Install the
ms-vscode-remote.remote-containers
andms-azuretools.vscode-docker
extensions in VSCode.
code --install-extension ms-vscode-remote.remote-containers
code --install-extension ms-azuretools.vscode-docker
- Open the repository in VSCode.
- Press
F1
orCTRL+SHIFT+P
and enterRemote-Containers: Reopen Folder in Container
This downloads a docker container for the development of the PlantMap application and
starts the needed PostgreSQL and RabbitMQ. Additionally,
all necessary VS Code extensions and npm packages from the package.json
are
installed. Further git pre-commit hooks are set up.
If you have trouble downloading the container see the GitHub Container Registry section.
In case you need to use sudo in the container, the default user is:
Running the application#
Once you are in the VSCode Development Container, the application can be started using convenient make commands.
To start the backend server run:
Once it's running, the backend's REST-Api will be available on port 8000.
To start the frontend website run:
The frontend runs on port 3000 and is accessible by opening http://localhost:3000 in a browser. Keep in mind that the frontend needs the backend running to work properly. For information on how to use the application, see Tutorials.
GitHub Container Registry#
The docker image is published to the GitHub Container Registry. In order to download it, you first need to log in with your GitHub credentials.
If you have enabled 2-factor authentication, please create an access token here.
Use your password or generated token and username to log in to the ghcr.io
container registry as
follows:
Now you call pull the image with docker pull
or by simply following the steps in the previous section.