-
Notifications
You must be signed in to change notification settings - Fork 1
Build Deploy Documentation
-
Install Docker Desktop:
- Go to docker.com and download the app
- Open Docker Desktop
-
Download and configure the Project:
- Go to github.com and download the latest release
- Unzip the project folder and place it somewhere on your machine
- Navigate to Backend and copy the file .env_example and paste it in the same folder named as .env_prod
- Open the file .env_prod and replace the variable values as follows:
TEST_STAGE=prod PASSWORD={{correct email password}} SECRET_KEY=Some_random_32byte_key MONGODB_URL=mongodb://mongo:27017/
-
Build and start the containers: open a terminal/shell (e.g., Terminal, Powershell, Bash, etc.) in the project`s root folder (amos2023ws01-ticket-chat-ai/) and execute (Copy and Paste into terminal and press Enter):
docker-compose up
-
Use the apps: go to the User Documentation
-
Stop the containers and clean up: open a shell in the project`s root folder (e.g., Terminal, Powershell, Bash, etc.) and execute:
docker-compose down docker image prune -f -a
Clone the Repository:
git clone [email protected]:amosproj/amos2023ws01-ticket-chat-ai.git
-
Install Python: go to python.org
-
Install MongoDB Community Server: go to mongodb.com
-
Navigate to Backend:
cd amos2023ws01-ticket-chat-ai/Backend
-
Install the Dependencies:
pip install -r requirements.txt
-
Set the Email Account Data:
- Navigate into
./backend
directory. Rename .env_example to .env and set your Email Password inside the .env - Open the config.ini and set your Email Account Name, IMAP- and SMTP Server
- Navigate into
-
Start Database:
- Mac:
brew services start [email protected]
- Windows:
Alternative:
elevate -w net start MongoDB
- Add the path to
mongod.exe
to the environment variables in order to use it globally. - Create a storage directory at any location, for example,
...\data\db
, if you have not already done so. - Run
mongod
with path to storage location for example:mongod --dbpath E:\workspace\Uni\ws23-24\AMOS\data\db
- Add the path to
- Linux:
sudo systemctl start mongod
- Mac:
-
Start the Backend API:
uvicorn app.main:app --reload
-
Use the endpoints: go to SwaggerUI OR try Postman with the base URL
http://localhost:8000/api/v1
+ router path -
Run the tests:
pytest test/
-
Navigate into
./backend/app/models/t5
directory. -
Train the model by running the following command:
python train_t5_model.py
-
Test the trained model by running the following command:
python use_trained_t5_model.py
-
Test the untrained T5 model by running the following command:
python train_t5_model.py
- Start Backend API
- Navigate to
app/email
and run:python main.py
-
Install newest Version of Node.js: go to nodejs.org or on Linux:
sudo apt install npm
nmp install -g n
n lts
-
Navigate to Frontend:
cd amos2023ws01-ticket-chat-ai/Frontend
-
Install Angular CLI (Optional but recommended):
npm install -g @angular/cli
-
Install the Dependencies:
npm install
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.