mirror of
https://github.com/ngthanhvu/kr-phim.git
synced 2026-08-10 15:07:46 +00:00
feat: add movie management API and database schema
- Implemented movie CRUD operations with endpoints for creating, retrieving, updating, and deleting movies. - Added pagination and filtering capabilities for movie retrieval. - Integrated Redis caching for improved performance on movie data retrieval. - Created database schema for movies with necessary fields and types. - Added migration files for initial movie table creation and subsequent updates. - Configured database connection using Drizzle ORM with MySQL. - Established Redis connection utility for caching.
This commit is contained in:
@@ -1,4 +1,27 @@
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:8.0
|
||||
container_name: cinek-mysql
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: rootpassword
|
||||
MYSQL_DATABASE: cinek
|
||||
MYSQL_USER: cinek
|
||||
MYSQL_PASSWORD: cinekpassword
|
||||
ports:
|
||||
- "3306:3306"
|
||||
volumes:
|
||||
- mysql_data:/var/lib/mysql
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
container_name: cinek-redis
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "6379:6379"
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
|
||||
cinek:
|
||||
build:
|
||||
context: .
|
||||
@@ -8,8 +31,17 @@ services:
|
||||
environment:
|
||||
HOST: 0.0.0.0
|
||||
PORT: 3002
|
||||
DATABASE_URL: mysql://cinek:cinekpassword@mysql:3306/cinek
|
||||
REDIS_URL: redis://redis:6379
|
||||
ports:
|
||||
- "3002:3002"
|
||||
volumes:
|
||||
- .:/app
|
||||
- /app/node_modules
|
||||
depends_on:
|
||||
- mysql
|
||||
- redis
|
||||
|
||||
volumes:
|
||||
mysql_data:
|
||||
redis_data:
|
||||
|
||||
Reference in New Issue
Block a user