Skip to content

sontdhust/avalon

Repository files navigation

Avalon

Another site for Avalon players

I. Run on local

$ meteor npm install
$ CLOUDINARY_KEY=ApiKey CLOUDINARY_SECRET=ApiSecret meteor --settings ./settings.json

II. Deploy to Microsoft Azure Web app for Linux users

1. Prerequisite

  • Update project to latest release v1.4.1.1

    $ meteor update
    
  • Find the node version which will be used

    $ meteor node -v
    

    v4.5.0

  • Install proper node version by using nvm

    $ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.4/install.sh | bash
    $ nvm install 4.5.0
    $ node -v; npm -v                     # Verify version
    

    v4.5.0

    2.15.9

2. Convert app into nodejs format and set configuration

  • Install demeteorizer

    $ sudo npm install -g demeteorizer
    
  • Convert to windows OS architecture

    $ demeteorizer -o ../Azure/avalon -a os.windows.x86_32
        # -o, --output <path>             Output folder for converted application
        # -a, --architecture <arch>       Build architecture to be generated
    
  • Navigate to demeteorized app folder and install all the required nodejs modules

    $ cd ../Azure/avalon
    $ cd bundle/programs/server
    $ npm install
    

3. Move app to Azure

On Azure Web app
  • General settings
    • Enable Web sockets
  • Add App settings
    • WEBSITE_NODE_DEFAULT_VERSION: 4.4.7 (node version 4.5.0 is not available on Azure App service, find at Advanced Tools (Kudu Services) -> Runtime versions, Example: https://site-name.scm.azurewebsites.net/api/diagnostics/runtime)
    • ROOT_URL: AppRootUrl (Example: http://site-name.azurewebsites.net/)
    • MONGO_URL: MongoDbUrl (Example: mongodb://user:password@dsxxxxxx.mlab.com:yyyyy/db-name)
On local demeteorized project
  • Create web.config file

    $ cd ../../                 # Back to 'bundle' folder from 'bundle/programs/server' folder
    $ touch web.config
    

    and insert this link content to that config file.

  • Commit project to Web app git url

    $ git init
    $ git add -A
    $ git commit -m "Initial commit."
    $ git remote add azure WebAppGitUrl
        # Example: https://user@site-name.scm.azurewebsites.net:xxx/site-name.git
    $ git push azure master
    

4. Store image using cloudinary

On Azure Web app
  • Add extra App settings for cloudinary config
    • CLOUDINARY_KEY: ApiKey
    • CLOUDINARY_SECRET: ApiSecret
    • METEOR_SETTINGS:
      {"public":{"cloudinary":{"name":"CloudName"}}}
On local repository
  • Add package lepozepo:cloudinary

    $ meteor add lepozepo:cloudinary
    
  • Demeteorize then push to remote Azure repository

III. Todos

  • Remove 'restart' button
  • Remove fixtures
  • Clear message text input after sending
  • Change route: /groups/:id -> /groups/:name, /users/:id -> /users/:username
  • Group name: format validation and unique
  • Lobby: add messages content
  • Show result when approve/vote finished (Notification)
  • Separate events
  • pub/sub issue
  • Update Meteor

About

Another site for Avalon players

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published