Skip to content

Latest commit

 

History

History
62 lines (43 loc) · 1.52 KB

README.md

File metadata and controls

62 lines (43 loc) · 1.52 KB

Ansible Script to Install Nginx + RTMP Streaming server

Additional Scripts

DB Migration

sudo -u postgres createuser -d -P videouploader
cd /srv/apps/video_uploader
RAILS_ENV=production rake db:create
RAILS_ENV=production rake db:migrate

Run Sidekiq

bundle exec sidekiq -e production -d -L ./log/sidekiq.log

Run Event Scrapers

RAILS_ENV=production rake scraper:webuildsg
RAILS_ENV=production rake scraper:fossasia

Or you may create a default scraper by setting ENV['DEFAULT_SCRAPER'] to the specific scraper and set this up as a cronjob.

RAILS_ENV=production rake scraper:run

Create Admin Users

RAILS_ENV=production rake db:seed

Database Management

Create DB User

sudo -u postgres createuser -d -P videouploader

Backup Database

PGPASSWORD=mypassword pg_dump -Fc --no-acl --no-owner -h localhost -U videouploader videouploader > videouploader.dump

Restore Database

pg_restore --verbose --clean --no-acl --no-owner -h localhost -U videouploader -d videouploader latest.dump