A test Project
This is an API for managing a cinema program, with the ability to add new movies, sync the data to MongoDB, and list trending movies sorted by ranking
- Docker
- Docker Compose
- Django
- Django REST Framework
- Postgres
- MongoDB
- Celery
- Redis
- RabbitMQ
-
Clone the repository:
git clone https://github.com//cinema-program.git
-
Move into the project directory:
cd cinema-program-api
-
Run the following commands to build and start the containers:
- docker build .
- docker-compose build
- docker-compose up
-
Run the tests: docker-compose run --rm app sh -c "python manage.py test"
-
Access the API at http://localhost:8000/api/docs/
- GET /api/movies/ - List all movies
- POST /api/movies/ - Create a new movie
- GET /api/movies/{id}/ - Retrieve a movie by ID
- PUT /api/movies/{id}/ - Update a movie by ID
- PATCH /api/movies/{id}/ - Update a movie by ID
- DELETE /api/movies/{id}/ - Delete a movie by ID
- Run the following command to start the development server: docker-compose up
- The development server can be accessed at http://localhost:8000/
- Run the following command to create a new Django project: docker-compose run --rm app sh -c "django-admin startproject myproject"
- Run the following command to create a new Django app after creating your project: docker-compose run --rm app sh -c "python manage.py startapp <app_name>"