Skip to content

engineersftw/esg-servers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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