Coder Social home page Coder Social logo

cisc3140_assignment_1's Introduction

cisc3140_assignment_3

Build Status

After an Insane amount of attempts... after Travis CI spammed my Email with "Erorred Build" Messages...

Here it is! Deployed at: https://travis-heroku-deployment.herokuapp.com/

Main problems encountered:

  • Build was constantly failing since in the app.py there is a line "app.run()" that allows the app to run indefinately if not stoped manually... Therfore, Travis CI was angry at that and after 10 minutes failed the build since no response from the app was given. Solution: create test.py file where you test the connection to the page with "unittest" module and ask Travis CI to run this file; this gives a definate response which satisfies Travis CI
  • Turns out there is https://travis-ci.org and https://travis-ci.com/. They are not the same thing: "org" is for public repos and uses webhooks to communicate wiht GitHub while "com" is for private repos and ask permission to connect to your account. Because of this, there was an authentication problem with Heroku, since Travis CI encrypts keys differently for each of its services. Solution: remove travis-ci.com from your account and authenticate only travis-ci.org with Heroku key with the following command: travis encrypt $(heroku auth:token) --add deploy.api_key --org This encrypts the key specifically for "org" Travis.
  • To deploy to the heroku you have to install gunicorn extenssion with pip install gunicorn and create a Procfile with one magic line in it: web: gunicorn app:app. (I've no Idea what it does, but it works)
  • Additionaly, Heroku has Buildpacks that help with deployment; Specifically it has 'heroku/python' one that suports Django and Flask. Install with --buildpack heroku/python whenever creating a new app or add it manualy in your Heroku account.
  • And, yeah! You need to download Ruby to install Travis command line interface and Heroku have thier own CLI which you allso have to download in order to get the Key and encrypt with Travis...

Why, oh why did it have to be this hard to deploy a simple flask app?

cisc3140_assignment_1

Metadata exercise - creating a barebones api client with NASA’s api

cisc3140_assignment_1's People

Contributors

vladislavglad 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.