The visualization platform of covid simulation in the Hague.
To start the whole stack without much hustle you can use docker with docker-compose.
-
Copy:
.env.example
to.env
and change the variables to value of choose- gziped csv file from simulation to
apps/covis-service/src/assets
and name itdata.csv.gz
-
Build the images:
sh ./tools/scripts/docker-build.sh
-
Start (keep it running):
docker-compose -f docker-compose.prod.yml up # add '-d' if you want to run it in the background
-
Seed (optional):
sh ./tools/scripts/docker-seed.sh
-
Navigate to: http://localhost
- Node 16.x.x (preferably over nvm/asdf)
- Yarn 3
- Docker w/ docker-compose or pre-installed postgis endpoint
-
Install dependencies
yarn install && docker-compose pull
-
Copy
.env.example
to.env
and change the variables to value of choose.
The project uses postgis
database to handle geo-location data.
It's as easy as just running provided docker-compose.yml
file.
docker-compose up # add '-d' if you want to run it in the background
Install postgis
depending on your operating system and configure it as you wish.
Make sure the database is running!
Execute the following command to create all needed db structures:
yarn schema:sync
Make sure the database is running!
-
Move gziped csv file to
apps/covis-service/src/assets
and name itdata.csv.gz
. -
Run migration script and be patient, it will take some time.
yarn migration:run
- Move gziped csv file to folder accessible on SQL server (for docker-compose:
./data
) and name itdata.csv.gz
. - Move
apps/covis-service/seed.sql
to folder accessible on SQL server (for docker-compose:./data
). - Connect to the SQL server and execute the above script and be patient, it will take some time.
-
To accomplish this with docker, use the following command:
docker exec <container-name> psql -U <user> -d <database> -f /var/lib/postgresql/data/seed.sql
-
Make sure the database is running!
The app will be available on http://localhost:4200.
To start both apps at once you can use the following script:
yarn serve:all
If you want you can also just run them separately:
yarn serve covis-app # start the frontend
yarn serve covis-service # start the backend
Build all apps using the following script:
yarn build:all
Use reverse proxy to serve the apps. Distribution files can be found in dist/apps
folder.