All Projects → paste → fvang

paste / fvang

Licence: other
Flask-Vagrant-Ansible-Nginx-Gunicorn Starter Pack

Programming Languages

Makefile
30231 projects
shell
77523 projects
python
139335 projects - #7 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to fvang

vagrant-magento
**DEPRECATED**
Stars: ✭ 12 (-62.5%)
Mutual labels:  vagrant
guix-vm
Scripts and support necessary to make a GuixSD Virtualbox image
Stars: ✭ 18 (-43.75%)
Mutual labels:  vagrant
build-inspector
Inspect your builds to look for changes in filesystem, network traffic and running processes.
Stars: ✭ 12 (-62.5%)
Mutual labels:  vagrant
django-angular2-fullstack-devops
All-in-one django/angular2 seed with cli interface for multi-environment devops on aws using ansible/packer/terraform
Stars: ✭ 54 (+68.75%)
Mutual labels:  vagrant
vagrant-jenkins
Vagrant box running Ubuntu with an installed Jenkins instance
Stars: ✭ 39 (+21.88%)
Mutual labels:  vagrant
phpell
[ABANDONED] Vagrant VM with bash(shell) provision for PHP development
Stars: ✭ 26 (-18.75%)
Mutual labels:  vagrant
drupalci-sonar-jenkins
DEPRECATED - Drupal CI environment with SonarQube and Jenkins for Drupal Core code analysis.
Stars: ✭ 40 (+25%)
Mutual labels:  vagrant
vagrant-boot2docker-swarm
A multi-machine Docker swarm Vagrant environment
Stars: ✭ 16 (-50%)
Mutual labels:  vagrant
k8s-all-in-one
Create a All-in-one Kubernetes Cluster.
Stars: ✭ 35 (+9.38%)
Mutual labels:  vagrant
logtoes
Demo of Asynchronous pattern (worker) using Python Flask & Celery
Stars: ✭ 49 (+53.13%)
Mutual labels:  gunicorn
howto
How to do things on the Internet
Stars: ✭ 78 (+143.75%)
Mutual labels:  vagrant
ansible-role-cardano-node
Ansible role for the provisioning of Shelly Cardano binaries from source.
Stars: ✭ 20 (-37.5%)
Mutual labels:  vagrant
Vagrant-Tutorial
Supporting repository for a Vagrant and Ansible tutorial
Stars: ✭ 32 (+0%)
Mutual labels:  vagrant
packer-centos
Create CentOS images for different hypervisors with Packer
Stars: ✭ 18 (-43.75%)
Mutual labels:  vagrant
hashicorp-labs
Deploy locally on VM an Hashicorp cluster formed by Vault, Consul and Nomad. Ready for deploying and testing your apps.
Stars: ✭ 32 (+0%)
Mutual labels:  vagrant
RHCSA ENV
An environment to prepare for the RHCSA certification, mainly automates server side installation of samba and NFS (RHCSA deals only with the client side)
Stars: ✭ 28 (-12.5%)
Mutual labels:  vagrant
development-environment
A development environment for Java, Python, Node.js and Go built using Vagrant
Stars: ✭ 50 (+56.25%)
Mutual labels:  vagrant
windows-docker-desktop-box
Vagrant box to test Docker Desktop with Linux/Windows containers
Stars: ✭ 17 (-46.87%)
Mutual labels:  vagrant
vagrant-wagtail-develop
A script to painlessly set up a Vagrant environment for development of Wagtail
Stars: ✭ 36 (+12.5%)
Mutual labels:  vagrant
cikit
Continuous Integration Kit (CIKit)
Stars: ✭ 21 (-34.37%)
Mutual labels:  vagrant

FVANG

Flask-Vagrant-Ansible-Nginx-Gunicorn Starter Pack

This is a starter pack for quickly developing a new Flask project locally with Vagrant, which is then easily deployed into production with Ansible. It installs and configures all the services you'll need:

  • Vagrant VM based on Ubuntu 18.04
  • Python 3.6 virtualenv for your Flask app and its dependencies
  • Nginx to serve static files and proxy to Gunicorn
  • Supervisor to automatically start/restart Gunicorn
  • Node.js for installing front-end components (optional)

Features

  • Disposable environment is fully self-contained within the Vagrant VM
  • Ansible playbooks for both local development and production
  • Develop with Flask dev server, then test/deploy with Gunicorn/Nginx
  • Easily add Ansible galaxy roles (ansible/requirements.yml)
  • Activates Python virtualenv on login
  • Installs Python packages from requirements.txt
  • Installs Node packages from package.json

Shortcuts

  • activate - activate the virtualenv
  • deactivate - deactivate the virtualenv
  • make run - run Flask development server
  • make restart - start/restart Gunicorn & Nginx
  • make provision-dev - run playbook for dev (must deactivate virtualenv)
  • make provision-prod - run playbook production (must deactivate virtualenv)

Local Development

  1. Install Vagrant

  2. Clone this repo as your project name: (This is important, the project folder name will be used for configuring hostname, etc.)

    git clone [email protected]:paste/fvang.git my-project-name
  3. Build your Vagrant VM:

    vagrant up
  4. Log into the VM via SSH:

    vagrant ssh
  5. Start Flask development server:

    cd my-project-name
    make run
  6. Modify your computer's local /etc/hosts:

    192.168.33.11   my-project-name.local
    
  7. Visit your app:

    http://my-project-name.local
    
  8. Profit ✔️


In Production

  1. You'll need a remote user with sudo privileges to run Ansible.

  2. Edit the host_name and other settings in ansible/prod.yml as necessary.

  3. Clone your project onto the server in your remote user's home folder, e.g. ~/my-project-name

  4. Install Ansible with the included script:

    cd ~/my-project-name
    sudo ansible/install.sh
  5. Install Ansible Galaxy roles:

    make install-galaxy-roles
  6. Run the Ansible production playbook:

    make provision-prod
  7. Profit ✔️


HTTPS in Production

  1. To use HTTPS you will need an SSL certificate. Get one from Certbot here: https://certbot.eff.org/lets-encrypt/ubuntubionic-nginx

  2. Copy the certificate and key to your remote user's home folder. The Nginx configuration expects the files to be named after the host_name, like this:

    ~/fvang.io.crt
    ~/fvang.io.key
    
  3. Update the production playboook to use SSL, in ansible/prod.yml:

    nginx_use_ssl: true
  4. Re-run the Ansible production playbook:

    make provision-prod
  5. Profit ✔️

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].