Skip to content
This repository was archived by the owner on Apr 25, 2022. It is now read-only.

Deployment

Vojtěch Sajdl edited this page Apr 13, 2021 · 2 revisions

How to deploy this app

The app is currently deployed using the CodeNow infrastructure. It should be fairly easy for anyone who has sufficient experience with docker to deploy this app to production environment. Below you can find a simple overview of the application architecture, required connectivity and description of the config files.

Architecture

The architecture is fairly simple - you have three components: The render service, backend service and frontend service. You will need to supply a PostgreSQL DB instance too. Only the backend service connects to the PostgreSQL. Auth is JWT based, uses a 30 minute access token and a long lived refresh token, which allows us to use more backend instances (as it doesn't rely on sessions) and load-balance between them. The refresh token can be revoked to allow for a compromise between security and system scalability, as the database would be a bottleneck.

Deployment diagram

The URLs for the endpoints are configurable in the runtime-configuration.js file for the frontend, backend and render services read the config.prod.json files from their config directory.

All of the services can be deployed using docker. In fact you can run the entire app locally using docker-compose. By running docker-compose up you get the entire app including the database. The production images can be built using npm run build and then building the docker images from the included dockerfiles.

Clone this wiki locally