Project in Rails that allows the user to add videos and thumbnails. Videos must be mp4 or mov and have a maximum of 200MB. When uploading a video, you must enter a category for it: exercise, education or recipe. The system generates three files (64x64, 128x128, 256x256) for each thumbnail. The project's home contains all the videos with the thumbnail, when you hover over the video, its name appears, and when you click the video starts. When no thumbnail is added, the system generates a preview of the video.
- Ruby on Rails
- Bootstrap
- Postgresql
- Docker
First you must have:
-
Postgres installed.
-
Ruby >= 2.7.3 installed.
As soon as you have everything done you can follow
If you want to rock and create your dev environment and data, it's possible to go through the usual way:
- And to bundle it with command:
bundle install
- Create databases
rails db:create
- Run migrations
rails db:migrate
- Install imagemagick and ffmpeg
# Linux
sudo apt update
sudo apt install ffmpeg
#macOS
brew install ffmpeg
If you want to use Docker to create your development and data environment, you can follow the path below.
- Building the project
docker-compose build
- Start the application
docker-compose up
- Create database
docker-compose run web rails db:create
- Run migrations
docker-compose run web rails db:migrate