GithubHelp home page GithubHelp logo

flask-vagrant's Introduction

Flask-Vagrant

This project is a server that uses the Flask Python Web Framework, PyMongo(MongoDB), Gunicorn WSGI, Nginx running on Ubuntu 16.04 LTS in Vagrant.

On startup of the server, the application and associated processes will be started automatically. The application will be available on localhost:7500.

Getting Started

Installing Vagrant

If you already have Vagrant set up and Ubuntu 16.04 LTS box installed, skip this section

You will need to have Vagrant (minimum version 1.9.1) and VirtualBox (minimum version 5.1.14) installed to run this. Once those are installed, add the Ubuntu 16.04 LTS box by running the command vagrant box add ubuntu/xenial64.

To install server

First fork this repository and then clone your forked repository by running git clone https://github.com/<username>/mean-vagrant. Then cd into the cloned repository and run vagrant up.

Installs:

  • Nginx (newest version)
  • Python (v2.7)
  • MongoDB (v3.4)
  • PyMongo (newest version)
  • Gunicorn WSGI (newest version)
  • Supervisor (newest version)

By default, changes made to the files will restart the server (Supervisor set up to watch files)

Setup

Once installed, replace app.py with your own Flask application.

Note: If you want to rename your main Flask file from app.py to something else, go to .provision/flask_project.conf file. Modify the command where it says app:app to <filename>:app.

Using Vagrant

Clone the files and in terminal cd to the directory.

  • If the OS is outdated run: vagrant box update

  • To start server: vagrant up

  • To access server shell: vagrant ssh

  • Only do this if you need a fresh server

    To remove server: vagrant destroy

  • Use this instead when you need to shut down server

    To shutdown server: vagrant halt

  • To put server to sleep: vagrant suspend

  • To reload server: vagrant reload

  • To reload server to updated provisions: vagrant reload --provision

The server should be up and running. To check, visit http://localhost:7500 in your browser.

To make changes to the box and automate the process of installing environment dependencies, place the commands in the Vagrantfile.

Tutorials

Documentation

Environment

Stack

Version Control

License

Refer to the LICENSE file in this repository.

MIT

flask-vagrant's People

Contributors

ktsuench avatar

Watchers

 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.