Git Product home page Git Product logo

aggregate-class-calendar's Introduction

aggregate-class-calendar

Aggregate schedules from various classes (e.g. yoga studios) into one place, given search parameters.

Installing

  1. Meteor -- https://www.meteor.com/install for info
  2. NPM modules for project, from top dir $ meteor npm install
  3. mongodb 3.4 -- https://docs.mongodb.com/manual/administration/install-on-linux/
  4. google-chrome on Ubuntu $ wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb $ sudo dpkg -i google-chrome-stable_current_amd64.deb
  5. Other dependencies $ sudo apt install -y nginx supervisor

Chrome dependency

Run headless Chrome using: $ google-chrome --headless --disable-gpu --remote-debugging-port=9222 If there's an issue getting to the webpages, it can be debugged using an X session $ ssh -X ...

Deploying

  1. Create the user to run the project $ adduser aggregate
  2. Build the application, tar the deploy directory $ meteor build ../app --architecture os.linux.x86_64 $ tar -czvf ../app/aggregate-deploy.tar.gz deploy/
  3. Copy the resulting tar files $ scp ../app/aggregate-class-calendar.tar.gz aggregate@:/home/aggregate $ scp ../app/aggregate-deploy.tar.gz aggregate@:/home/aggregate
  4. Log into the machine
  5. Unbundle the tars $ tar -xvzf aggregate-class-calendar.tar.gz $ tar -xvzf aggregate-deploy.tar.gz
  6. Update or install dependencies $ cd bundle/programs/server && meteor npm install
  7. Setup nginx $ cp deploy/nginx-prof.conf /etc/nginx/sites-available/aggregate-class-calendar.conf $ ln -s /etc/nginx/sites-available/aggregate-class-calendar.conf /etc/nginx/sites-enabled/aggregate-class-calendar.conf $ rm /etc/nginx/sites-enabled/default # if present $ service nginx reload
  8. Setup database $ systemctl enable mongod $ service mongod start
  9. Setup supervisor to run the app $ cp deploy/supervisor-proj.conf /etc/supervisor/conf.d/aggregate-class-calendar.conf $ supervisorctl update aggregate-class-calendar
  10. If needed, restarting the whole project $ supervisorctl restart aggregate-class-calendar

Important Components

Upload courses from file

  1. Run the subtree's toplevel.js to dump courses.json file
  2. Test the file is OK $ python -m json.tool courses.json
  3. Copy the file $ scp courses.json :/home/aggregate/bundle/programs/server/assets/app
  4. Use the admin panel to upload from file

Cron jobs

Currently under construction, but cron job customization will be possible through the admin panel and percolate:synced-cron.

admin panel configuration, lib/adminconfig.js

To work with the admin dashboard, which uses yogiben:meteor-admin, an admin user must be created through console and added to the "admin" role. Currently, this only works with one user within 'adminEmails'. To add a user during initial setup, use the following command from meteor shell, through the shell-server package: $ var id = Accounts.createUser({email: "..", password: "..", profile: { name: ".." }}); $ Roles.addUsersToRoles(id, ['admin'], 'default-group');

logger setup, server/logging.js

This app uses winston through votercircle:winston and a papertrail config. See https://papertrailapp.com/systems/setup for setup instructions on a machine to send logs to their severs. See the logs at https://papertrailapp.com/dashboard The file logging.js adds the transport as necessary to Papertrail.

dependency on class-scraper

This repo depends directly on class-scraper through git subtree (repo found at https://github.com/joncinque/class-scraper), so to update this repo on any changes, run the command: $ git subtree pull --prefix .class-scraper https://github.com/joncinque/class-scraper.git master --squash Or, using aliases: $ git sbu https://github.com/joncinque/class-scraper.git .class-scraper In order to push back up, run the command: $ git subtree push --prefix .class-scraper class-scraper master Or, using aliases: $ git sbp .class-scraper class-scraper master Quick explanation: the prefix of ".class-scraper" is looking in that folder for the push information, "class-scraper" is the name of the remote we're pushing to, and "master" is the branch we're pushing from.

aggregate-class-calendar's People

Contributors

joncinque avatar

Stargazers

Eric Hammy avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.