Update initialization guide

This commit is contained in:
ShootingStar91
2024-07-18 23:11:52 +03:00
parent cf546ff53b
commit fca9f79cc9
2 changed files with 9 additions and 5 deletions
+1 -1
View File
@@ -8,4 +8,4 @@ dump.zip
local_dev
cypress/videos
cypress/screenshots
cypress/downloads
cypress/downloads
+8 -4
View File
@@ -10,7 +10,11 @@ See [technical explanations](technical_explanations.md) for how this works.
**Init the project** :rocket:
1. Make copies of `.env.template` and `.env.dev.template`. Name the copies `.env` and `.dev.env`.
2. `npm install` in project root to install the eslint & prettier packages
3. `npm run dev` to run it - requires docker compose installed.
4. Check if it worked: The docker logs should have a line saying database connection works. Open `localhost:5173` in browser to check if frontend works and shows data.
Requirements: Some modern installation of Docker engine with Docker compose.
1. Copy the `.env.template` file named as `.dev.env`
2. `npm run setup` in project root to install all node modules and generate prisma-client.
3. If you wish to use the staging database, you need to copy the dump files into `data/sqlfiles/` directory. See example of how anonymized test data is in `test_data/sqlfiles/`
4. Make sure the folders have enough rights that the database docker container can use them - this depends on your operating system. If you run the container once, you'll need to remove the container and the volume before you try again (the container and image names are different for anon-version): `docker rm nowdb-db-dev` and `docker volume rm nowdatabase-db`
5. `npm run dev` to run with the staging database or `npm run start:anon` to run with the anonymized small test-db included in the repository.
6. Check if it worked: The docker logs should have a line saying database connection works. Open `localhost:5173` in browser to check if frontend works and shows data.