From e5402b1a332c70180a36a51488de6c07e0e614a5 Mon Sep 17 00:00:00 2001 From: Erick Pintor Date: Wed, 4 Feb 2015 12:30:23 -0200 Subject: [PATCH] Adicionando Vagrant file com as dependências do projeto --- .gitignore | 7 +++++-- LEIAME | 6 ++++++ README.md | 8 ++++++++ Vagrantfile | 11 +++++++++++ app/barrabrasil.py | 2 +- provision.sh | 23 +++++++++++++++++++++++ 6 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 Vagrantfile create mode 100644 provision.sh diff --git a/.gitignore b/.gitignore index 6e49482..497052c 100644 --- a/.gitignore +++ b/.gitignore @@ -6,8 +6,8 @@ # Compiled source # ################### *.pyc -build/* -.sass-cache/* +**/build/* +**/.sass-cache/* assets.json app/templates/* @@ -18,3 +18,6 @@ app/static/*.js test/*.jtl test/resultado.txt +# Vagrant files # +################ +.vagrant diff --git a/LEIAME b/LEIAME index 181ab92..b3fc894 100644 --- a/LEIAME +++ b/LEIAME @@ -38,6 +38,12 @@ Para profiling é necessário além dos acima - werkzeug +Usando vagrant: + +vagrant up +vagrant ssh +cd /vagrant/ + Requisitos da Barra 1. A Barra deve ser adaptável a um desenho fluído e fixo diff --git a/README.md b/README.md index 08100c7..9c2a384 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,14 @@ Para profiling é necessário além dos acima: * werkzeug + +## Usando vagrant: + +``` +vagrant up +vagrant ssh +cd /vagrant/ +``` ## Geração da barra diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 0000000..c265b9e --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,11 @@ +#!/usr/bin/env ruby + +VAGRANTFILE_API_VERSION = '2' + +Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| + config.vm.box = 'ubuntu/trusty64' + config.vm.provision :shell, path: 'provision.sh' + config.vm.network :forwarded_port, guest: 5000, host: 5000 + + config.cache.scope = :box +end diff --git a/app/barrabrasil.py b/app/barrabrasil.py index 92fd3fa..c9f57c9 100644 --- a/app/barrabrasil.py +++ b/app/barrabrasil.py @@ -61,7 +61,7 @@ def barra(): if __name__ == '__main__': import webbrowser webbrowser.open("http://127.0.0.1:5000/",new=2) - app.run(debug=True) + app.run(host='0.0.0.0', debug=True) #webbrowser.open("https://127.0.0.1:5000/",new=2) #app.run(debug=False,ssl_context=ctx) diff --git a/provision.sh b/provision.sh new file mode 100644 index 0000000..cb5a3e3 --- /dev/null +++ b/provision.sh @@ -0,0 +1,23 @@ +#!/bin/bash +set -e -x -o pipefail +export DEBIAN_FRONTEND='noninteractive' + +sudo add-apt-repository ppa:chris-lea/node.js +sudo apt-get update + +apt-get install -y \ + python-dev \ + python-pip \ + nodejs \ + ruby + +pip install \ + Flask \ + config \ + assetgen + +npm install -g \ + coffee-script \ + uglify-js + +gem install sass -- libgit2 0.21.2