Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nguyenta99/youtube-sharing-app
https://github.com/nguyenta99/youtube-sharing-app
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/nguyenta99/youtube-sharing-app
- Owner: nguyenta99
- Created: 2024-04-18T14:26:40.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-04-23T17:07:32.000Z (9 months ago)
- Last Synced: 2024-10-18T12:35:14.532Z (3 months ago)
- Language: Ruby
- Size: 51.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Youtube sharing backend
## Introduction
- Backend for youtube sharing video application
- Built based on Ruby on Rails, Docker, MySQL
- Integrate testing with rSpec## Prerequisites
- Ruby: 3.0.0
- Docker
- rSpec
- Websocket## Installation & Configuration
To clone project, run:
```sh
git clone https://github.com/ShiedaKayn1975/youtube-sharing-app.git
```
After that, go to the root project directory, create your own `.env` file following this content and grant the value for these variables:
```
HOST=localhost
DATABASE_PASSWORD=12345678
DATABASE_USERNAME=youtube
JWT_SECRET=youtube-sharing
SIDEKIQ_USERNAME=admin
SIDEKIQ_PASSWORD=admin
```Then, you have to run Docker to build project's containers, run:
```sh
docker-compose up -d --build
```## Database installation
Next step, exec to MySQL container and create a MySQL user with granted permissions.
```sh
docker exec -it container_id /bin/sh
```
Access to MySQL shell
```sh
mysql -u root -p
```
Create MySQL user with granted permissions
```sh
CREATE USER 'youtube'@'*' IDENTIFIED WITH mysql_native_password BY '12345678';
GRANT ALL PRIVILEGES ON *.* TO 'youtube'@'*' WITH GRANT OPTION;
```
Finally, re-run docker build again:
```sh
docker-compose up -d --build
```## Create seeding data
Exec to app container, and run:
```sh
rails db:seed
```
to create seed data## Run the test
Exec to app container, and run:
```sh
rspec
```