Skip to content

jahammo2/portfolio-api

Repository files navigation

Porfolio API

API endpoint docs can be found here

Table of Contents

Installation

  1. bundle install
  2. cp config/secrets.example.yml config/secrets.yml
  3. cp config/database.example.yml config/database.yml
  4. bundle exec rails db:setup

Deployment

  1. Push up code here and in the web client to master
  2. tape ansible deploy -l staging

Local Development

  1. rails s
  2. In the web client, npm run start
  3. Visit

Renewing the SSL Cert

If it has not expired

  1. ssh root@162.243.114.222

  2. Renew

    cd ~/..
    ./opt/letsencrypt/certbot-auto certificates
    

If it has expired

  1. ssh root@162.243.114.222

  2. (Maybe. Try the renew step before stopping any of monit processes, they may not be needed) monit stop unicorn

  3. monit stop nginx

  4. Renew

    cd ~/..
    ./opt/letsencrypt/certbot-auto renew --preferred-challenges http --standalone
    
  5. gem install tape -v 1.5.5 (and remove/switch versions if need be)

  6. brew install ansible

  7. tape ansible deploy

Common Errors to Deal With Now

ProjectsController error

Yeah, this is fairly old code so just it's better just to work around these instead of changing things.

Processing by Api::SocialLinksController#index as JSON
LoadError (Unable to autoload constant Api::ProjectsController, expected /Users/jordanhammond/personal/portfolio-api/app/controllers/api/projects_controller.rb to define it):

In this case, it only happens locally. You can deploy just fine

Miscellaneous

On Digital Ocean, the corresponding web server is "portfolio--staging"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published