-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add TypeORM MariaDB Integration and DB Migration #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
f5b3269
Add TypeORM MariaDB Integration with Added DB Migration
ramraut-osm bde7f82
Removed migrationTableName
ramraut-osm 2e9e08f
Added development setup document
ramraut-osm 7ab1553
Update database design document
ramraut-osm 200591c
Update migrations
ramraut-osm 5631e3a
Update apps/api/src/database/migrations/1714633736953-JobDetails.ts
ramraut-osm 3ce157c
Add Requested changes in PR
ramraut-osm 23a1585
Merge branch 'REST-512' of https://github.com/OsmosysSoftware/osm-tra…
ramraut-osm da938a8
Add Requested changes in PR
ramraut-osm 54661de
Update apps/api/docs/development-setup.md
ramraut-osm 302d056
Update apps/api/src/database/migrations/1714646233635-migration.ts
ramraut-osm 77b528d
Merge branch 'main' into REST-512
xixas 617d73e
Update apps/api/docs/development-setup.md
ramraut-osm f70048c
Add Requested changes in PR
ramraut-osm 64f21a8
Update apps/api/docs/development-setup.md
ramraut-osm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Server | ||
SERVER_PORT= | ||
|
||
# Node env | ||
NODE_ENV= # Use "development" for graphql playground to work | ||
|
||
# Database configuration | ||
DB_TYPE= | ||
DB_HOST= | ||
DB_PORT= | ||
DB_USERNAME= | ||
DB_PASSWORD= | ||
DB_NAME= | ||
MARIADB_DOCKER_PORT= 3307 | ||
|
||
# Redis configuration | ||
REDIS_HOST= | ||
REDIS_PORT= | ||
REDIS_DOCKER_PORT=6397 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# Development Setup | ||
|
||
This document outlines the steps required to set up your Transcript Summarization for development. By following these steps, you'll be able to run your application locally with the necessary environment variables and database configuration. | ||
|
||
## Prerequisites | ||
|
||
Before setting up Transcript Summarization for development, ensure you have the following prerequisites with the specified versions: | ||
|
||
- **NVM (Node Version Manager):** Use NVM to manage Node.js versions. | ||
- **Node.js:** Node.js v20.x or higher can be installed via `nvm` using `nvm install 20` and used with `nvm use 20`. | ||
- **Git:** Git v2.x or higher. | ||
- **MariaDB:** MariaDB v10.x or higher. | ||
|
||
These prerequisites are essential for deploying and running Transcript Summarization in an environment. | ||
|
||
Please make sure to have these versions installed on your development server before proceeding with the setup. | ||
|
||
Make sure the MariaDB server is up and running. | ||
ramraut-osm marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# This command checks if the MariaDB server is active and running. | ||
sudo systemctl status mariadb | ||
|
||
```bash | ||
sudo systemctl status mariadb | ||
``` | ||
|
||
## Getting Started | ||
|
||
1. Clone the repository to your local machine: | ||
|
||
```sh | ||
git clone https://github.com/OsmosysSoftware/osm-transcript-summarizer | ||
cd osm-transcript-summarizer/apps/api | ||
``` | ||
|
||
2. Install project dependencies: | ||
|
||
```sh | ||
npm install | ||
``` | ||
|
||
3. Create a `.env` file in the project root and add the required environment variables: | ||
|
||
```env | ||
|
||
# Node env | ||
NODE_ENV=development | ||
|
||
# Database configuration | ||
DB_TYPE=mariadb | ||
DB_HOST=localhost # use value as transcriptsummary-mariadb in docker | ||
DB_PORT=3333 | ||
DB_USERNAME=root | ||
DB_PASSWORD=your-password | ||
DB_NAME=your-database | ||
|
||
``` | ||
ramraut-osm marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Alternatively, use the `.env.example` file instead. | ||
|
||
Make sure to replace the above example values with appropriate values as per your setup and configuration. Server Port is `3000`, you can update it if you want to use a different port of your choice. | ||
|
||
4. Set up the database: | ||
|
||
Ensure your database server (e.g., MariaDB) is running. | ||
|
||
Run database migrations to create tables: | ||
|
||
```sh | ||
npm run typeorm:run-migrations | ||
``` | ||
|
||
5. Start the development server: | ||
|
||
```sh | ||
npm run start:dev | ||
``` | ||
|
||
Transcript Summarization will now be running locally at `http://localhost:3000`. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.