-
Notifications
You must be signed in to change notification settings - Fork 0
Build Documentation
Software architecture description
-
Clone the repository:
git clone https://github.com/amosproj/amos2024ws02-backup-metadata-analyzer.git
-
Change directory:
cd ./amos2024ws02-backup-metadata-analyzer/
-
Setup .env files:
cp .env.docker.example .env.docker
-
Copy database dump into project:
Copy the database dump .dmp file in the projects root folder and rename it to db_dump.sql
-
Clean Docker node_modules:
docker volume rm amos2024ws02-backup-metadata-analyzer_mono-node-modules
-
Build and start Docker container:
docker compose --env-file .env.docker up --build
-
Stop Docker Container:
docker compose --env-file .env.docker down
Make sure the following are installed on your machine:
- Node 20
- Docker
- Docker Compose
npm ci
cd ./apps/analyzer/metadata_analyzer ; poetry install
-
npm ci
: dependency install -
copy
.env.example
file in backend and rename to.env
(adjust database properties according to database setup if necessary) -
copy
.env.example
file in analyzer and rename to.env
(adjust port properties according to backend setup if necessary)
-
npm run be
: run backend individually -
npm run fe
: run frontend individually -
npm run py
: run python app -
npm run all
: run backend, frontend and python module
- the entity files need to be annotated with
@Entity(<table-name>)
- append the entity file to the
entities
array indb-config.service.ts
- run the following command to generate a migration file:
nx run metadata-analyzer-backend:migrations:generate --name <migration-name>
- append the generated file to the
migrations
array indb-config.service.ts
- backend:
nx run metadata-analyzer-backend:test
- frontend:
nx run metadata-analyzer-frontend:test
- python:
nx run metadata-analyzer:test
Fill the .env
file with the mailing information
Hint: For gmail you have to generate an app password, which you have to use as password in the .env
file
For changes in templates being used, you have to restart the backend
When working with python dependencies, first cd into the analyzer
folder.
poetry add <dependency-name>
poetry remove <dependency-name>