MAPC / myschoolcommute2

Tool to Survey and Analyze Transportation Mode and Behavior
http://masaferoutessurvey.org/
1 stars 3 forks source link

Deploy app to AWS EC2 instance #46

Closed allthesignals closed 7 years ago

allthesignals commented 7 years ago

Continuing from #24, this issue has blossomed into its own issue. Here's the original comment:

Here @mzagaja suggests deploying to a custom Linux server:

Honestly my general sense is you’re better off deploying to a vanilla Linux server for something like this

This way we can save a lot of time running the R script (which has many heavy dependencies in addition to R's own packages).

mzagaja commented 7 years ago

I'm going to deploy this to the Amazon LightSail instance I set up for YouthMatch for now. And then setup Capistrano. Things to do to get this working:

  1. Create appropriate username/password for the application on dyee.mapc.org
  2. This project needs a domain or sub-domain to be setup from Ty. See https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-server-blocks-virtual-hosts-on-ubuntu-16-04 for reference on how to do this with nginx.
  3. Load Capistrano into the project repo. a. Setup staging environment in the app for develop as well as on the server.
mzagaja commented 7 years ago

Sent note to ITHelp to point staging.masaferoutessurvey.org to my Amazon LightSail staging server so we can get an environment setup for the develop branch/staging. After I successfully do that there, I'll do the live version after.

mzagaja commented 7 years ago

Almost done but currently blocked from setting up the staging database by the following error:

PG::InsufficientPrivilege: ERROR: permission denied to create extension "pgrouting" HINT: Must be superuser to create this extension. : CREATE EXTENSION IF NOT EXISTS "pgrouting"

I need either a postgres user with superuser privileges or alternatively someone with a superuser privileges person to add the pg_routing extension to the myschoolcommute2_staging database. @allthesignals

allthesignals commented 7 years ago

@mzagaja

ssh in and sudo su postgres which setup the correct user.

mzagaja commented 7 years ago

I don't have SSH access/credentials to db.live.mapc.org.

mzagaja commented 7 years ago

Ok this is now live for the staging site: http://staging.masaferoutessurvey.org/