diff --git a/README.md b/README.md index 865c62647d..dd5687ceba 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ The dashboard provides information on the outbreak and prevalence of COVID-19 in The Netherlands. It combines measured and modelled data from various sources to give a broad perspective on the subject. +This repository uses .json files in the form of the archive `protos.zip` as source for data visualisation. The `protos.zip` archive is ingested by the front-end application to display all the data on the Coronadashboard. The code for the back-end application can be found **[here](https://github.com/minvws/nl-covid19-data-backend-processing)**. + ## Contact ` As of 02-04-2024, the Coronadashboard has been brought offline. This section is not applicable anymore.` @@ -43,10 +45,17 @@ You can run these commands to quickly get started. We advise you to read what's ``` $ yarn +$ cp packages/app/.env.local.example packages/app/.env.local $ yarn bootstrap $ yarn dev ``` +Alternatively, you can create a Docker container image by running the command in the root: + +``` +$ docker compose up +``` + ## Usage In this project, we use Yarn instead of NPM, so the documentation assumes you diff --git a/packages/app/.env.local.example b/packages/app/.env.local.example index ab27d61a66..19a8efff7d 100644 --- a/packages/app/.env.local.example +++ b/packages/app/.env.local.example @@ -8,7 +8,7 @@ DISABLE_SITEMAP=true ACTIVE_DATA_URL= ARCHIVED_DATA_URL= -NEXT_PUBLIC_SANITY_DATASET=development +NEXT_PUBLIC_SANITY_DATASET=production NEXT_PUBLIC_SANITY_PROJECT_ID=5mog5ask NEXT_HOST_URL_STG= SANITY_API_TOKEN= @@ -17,4 +17,4 @@ SANITY_PREVIEW_SECRET= # set content of version string NEXT_PUBLIC_COMMIT_ID=n/a -NEXT_PUBLIC_PHASE=develop \ No newline at end of file +NEXT_PUBLIC_PHASE=develop diff --git a/packages/app/README.md b/packages/app/README.md index 6176ee91fe..208fee8772 100644 --- a/packages/app/README.md +++ b/packages/app/README.md @@ -10,7 +10,7 @@ React application uses Next.js as its framework. First run `yarn install` or simply `yarn` at the root of the repository if you haven't already. This installs all the dependencies for all of the packages. -For developers only! Make sure you have an `.env.local` file in `packages/app` with correct environment variables. To +Make sure you have an `.env.local` file in `packages/app` with correct environment variables. To get started, you can copy `.env.local.example`: ```sh @@ -40,31 +40,29 @@ JSON data files represent a collection of archived and non-archived "protos" fil ### CMS Dataset -By default, the site builds using the development dataset. If you would like the -production content instead you can create a `.env.local` file in `packages/app` +By default, the site builds using the production dataset. If you would like the +development content instead you can create a `.env.local` file in `packages/app` with the following content: ```sh -NEXT_PUBLIC_SANITY_DATASET=production +NEXT_PUBLIC_SANITY_DATASET=development ``` The "Lokalize" part of Sanity is exported and consumed by the app as JSON. You will need to run this script regularly as an outdated JSON file will result in compile or build-time errors. -`yarn cms:lokalize-import` - -Alternatively you can run this from `packages/cms` as `yarn lokalize:import` +`yarn cms:lokalize-import:prd` To learn more about the rationale behind Lokalize and how it works [read the documentation](/packages/cms/README.md#lokalize-texts). ### Locale By default, the site builds the Dutch version. If you would like to build the English -version instead, update the following variable in your `packages/app/.env.local` file: +version instead, update the following variable in your `packages/app/next.config.js` file: -```sh -NEXT_PUBLIC_LOCALE=en +``` +defaultLocale: 'en' ``` ## Running a Production Build @@ -78,7 +76,7 @@ NEXT_PUBLIC_COMMIT_ID=__commit_id_placeholder The value doesn't actually matter, so it can be anything. -To build a production version you can run `yarn build`, and after that `yarn start` to +To build a production version you can run `yarn build:app`, and after that `yarn start` to serve the built files. ## Available Scripts