Skip to content

Deployment of Venue Platform without Docker

Kiana McNellis edited this page Jun 15, 2017 · 10 revisions

Deploying the venue platform without docker is not recommended, but is supported.

Prerequisites

  • Install Node.js from here
    • (see the project Dockerfile for the up-to-date recommended version).
  • Install MongoDB from here

Setup

  • Make sure a mongodb server is running and is accessible at the default mongodb ports. Ensure that the mongodb ports are only exposed local to the server.
    • If mongodb fails to start, run sudo mkdir -p /data/db
  • (Optional) Run pm2 to start venue upon launch
  • (Optional) Run an nginx reverse proxy to configure HTTPS and HTTP, this is often specific to the deployment practices of the server administrator (you may have to integrate with an existing configuration)

Configuration

See instructions for cloning and prequisites setting up environment variables.

Your server should reverse proxy from the venue platform running on port 9000.

Installing Server Dependencies

  • Install gulp globally using sudo npm install --global gulp-cli
  • Run npm install within the cloned venue directory

Running the venue instance

  • [If using pm2]: gulp build, cd dist, and pm2 start server/app.js --name "venue"

    • You can then kill the server using pm2 delete venue
    • To make sure that it will start automatically upon server restart, run: pm2 startup and follow any commands given, then run pm2 save
  • [otherwise] Run gulp serve:dist within the venue directory.

  • If you get the error Cannot find module './undefined.js', make sure that the environment variables were setup properly in the configuration step

Creating the admin user

Connect to mongodb via a mongo client and execute the following command to convert a user to an admin.

db.getCollection('users').update({"email": "<ADMIN EMAIL>"}, { "$set": { "role": "admin" } })