Implement backend API and database services in Docker setup
- Added a new `api` service for the NestJS backend, including health checks and dependencies on PostgreSQL, Redis, and MinIO. - Introduced PostgreSQL and Redis services with health checks and configurations for data persistence. - Added MinIO for S3-compatible object storage and a one-shot service to initialize required buckets. - Updated the Nginx configuration to proxy requests to the new backend API and MinIO storage. - Enhanced the Dockerfile to support the new API environment variables and configurations. - Updated the `package.json` and `package-lock.json` to include new dependencies for QR code generation and other utilities. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
105
backend/src/database/migrations/1707420468655-seed-genres.ts
Normal file
105
backend/src/database/migrations/1707420468655-seed-genres.ts
Normal file
@@ -0,0 +1,105 @@
|
||||
import { Genre } from 'src/genres/entities/genre.entity';
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||
|
||||
export class SeedGenres1707420468655 implements MigrationInterface {
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
const genres = [
|
||||
{
|
||||
id: '3676ab4e-1b4f-4568-836a-43f84b1a6228',
|
||||
name: 'Action',
|
||||
},
|
||||
{
|
||||
id: '9d8be5ab-b956-4571-9b4e-1e25fb8b6e44', // REMOVE
|
||||
name: 'Adventure',
|
||||
},
|
||||
{
|
||||
id: 'b7bac6dd-2a86-4191-ac1e-c92be7b8b841',
|
||||
name: 'Comedy',
|
||||
},
|
||||
{
|
||||
id: 'e9e4285c-b6f3-46ef-a991-bd9f1537eae1',
|
||||
name: 'Crime',
|
||||
},
|
||||
{
|
||||
id: 'cc22046e-0b43-426c-9e70-b91ac6a601ba', // REMOVE
|
||||
name: 'Experimental',
|
||||
},
|
||||
{
|
||||
id: 'ed2515e3-da9a-4291-82bf-4ebe06831407',
|
||||
name: 'Western',
|
||||
},
|
||||
{
|
||||
id: '37306a11-e894-4e90-a200-87aabf67f70a', // REMOVE
|
||||
name: 'Historical',
|
||||
},
|
||||
{
|
||||
id: 'b20d0c86-b2d4-4fb0-8b39-dc855591fa24', // REMOVE
|
||||
name: 'Fiction',
|
||||
},
|
||||
{
|
||||
id: '8d7262a8-a94b-4f85-886a-a5ecff8844b3',
|
||||
name: 'Mystery',
|
||||
},
|
||||
{
|
||||
id: '51e56f26-bbb4-44e8-ac01-d7aa8ef81f3b',
|
||||
name: 'Documentary',
|
||||
},
|
||||
{
|
||||
id: '01854d65-636e-476b-9bbd-881c1834cdb0',
|
||||
name: 'Drama',
|
||||
},
|
||||
{
|
||||
id: '0bc7d835-ed31-4a6f-a76f-cfe26595eb11',
|
||||
name: 'Horror',
|
||||
},
|
||||
{
|
||||
id: '79a15574-5e83-4daf-8fdb-dd2261e12b60',
|
||||
name: 'Romance',
|
||||
},
|
||||
{
|
||||
id: '0029a12a-e9b9-421f-90c0-446c61afb4dd',
|
||||
name: 'Science Fiction',
|
||||
},
|
||||
{
|
||||
id: '004d484a-488e-478e-90f5-b37de3961527',
|
||||
name: 'Fantasy',
|
||||
},
|
||||
{
|
||||
id: '281857e3-0772-4d7d-b5a8-e460dde75b91',
|
||||
name: 'Thriller',
|
||||
},
|
||||
{
|
||||
id: '26703192-9875-456c-8bb6-6f7acaa8f0bf', // REMOVE
|
||||
name: 'Noir',
|
||||
},
|
||||
{
|
||||
id: 'f99f1239-2d6c-45e5-87ef-ea1df6a223dc',
|
||||
name: 'Musical',
|
||||
},
|
||||
{
|
||||
id: '62804361-7304-4de7-ae4a-bc3c742ec26b', // REMOVE
|
||||
name: 'War',
|
||||
},
|
||||
{
|
||||
id: '9568217b-affa-4859-a342-1ffeca0b7595', // REMOVE
|
||||
name: 'Sports',
|
||||
},
|
||||
{
|
||||
id: '21d8c163-88cc-414d-a381-78660065019d', // REMOVE
|
||||
name: 'Travel',
|
||||
},
|
||||
{
|
||||
id: '03342d8a-9fa0-4df1-9047-52c226b43b05', // REMOVE
|
||||
name: 'Biopic',
|
||||
},
|
||||
];
|
||||
|
||||
await queryRunner.manager.save(
|
||||
queryRunner.manager.create<Genre, Record<string, unknown>>(Genre, genres),
|
||||
);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.manager.delete(Genre, {});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user