Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
47 changed files
with
184 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# {{ PROJECT_NAME }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# YAML | ||
|
||
server_name: dev.{{ project }}.com | ||
host: 127.0.0.1 | ||
port: '5000' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from flask import Flask | ||
|
||
app = Flask(__name__) | ||
|
||
from __config_project_module__ import views |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from flask import render_template | ||
from __config_project_module__ import app | ||
|
||
|
||
@app.route('/') | ||
def index(): | ||
return 'Hello {{ PROJECT_NAME }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from fabric.api import local | ||
|
||
|
||
def symlink(file_name, link): | ||
local('sudo ln -sf %s %s' % (file_name, link)) | ||
|
||
|
||
def nginx(): | ||
symlink('{{ PROJECT_ROOT }}/server/local/nginx.conf', '/etc/nginx/sites-available/{{ PROJECT_MODULE }}.conf') | ||
symlink('/etc/nginx/sites-available/{{ PROJECT_MODULE }}.conf', '/etc/nginx/sites-enabled/{{ PROJECT_MODULE }}.conf') | ||
local('sudo /etc/init.d/nginx restart') | ||
|
||
|
||
def install_requirements(): | ||
local('pip install -r requirements.pip') | ||
|
||
|
||
def install_environment(): | ||
local('pip install -e .') | ||
|
||
|
||
def install(env): | ||
install_requirements() | ||
install_environment() | ||
local('sudo chmod 755 run.py') | ||
nginx() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Fabric==1.2.2 | ||
Flask==0.8 | ||
Jinja2==2.6 | ||
Werkzeug==0.8.1 | ||
blinker==1.1 | ||
paramiko==1.7.7.1 | ||
pycrypto==2.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#! /usr/bin/env python | ||
|
||
from __config_project_module__ import app | ||
|
||
app.run() |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
server { | ||
|
||
listen 80; | ||
server_name {{ SERVER_NAME }}; | ||
|
||
location / { | ||
proxy_pass http://{{ HOST }}:{{ PORT }}; | ||
proxy_set_header Host $http_host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
} | ||
|
||
location /static/ { | ||
alias {{ PROJECT_ROOT }}/static/; | ||
} | ||
|
||
location /media/ { | ||
alias {{ PROJECT_ROOT }}/media/; | ||
} | ||
|
||
} |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env python | ||
from setuptools import setup, find_packages | ||
|
||
setup(name='{{ PROJECT_MODULE }}', | ||
version='0.1', | ||
packages=find_packages(), | ||
package_data={'{{ PROJECT }}': ['templates/*.*']}) |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# {{ PROJECT_NAME }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# YAML | ||
|
||
server_name: dev.{{ project }}.com | ||
host: 127.0.0.1 | ||
port: '5000' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from fabric.api import local | ||
|
||
|
||
def symlink(file_name, link): | ||
local('sudo ln -sf %s %s' % (file_name, link)) | ||
|
||
|
||
def nginx(): | ||
symlink('{{ PROJECT_ROOT }}/server/local/nginx.conf', '/etc/nginx/sites-available/{{ PROJECT_MODULE }}.conf') | ||
symlink('/etc/nginx/sites-available/{{ PROJECT_MODULE }}.conf', '/etc/nginx/sites-enabled/{{ PROJECT_MODULE }}.conf') | ||
local('sudo /etc/init.d/nginx restart') | ||
|
||
|
||
def install_requirements(): | ||
local('pip install -r requirements.pip') | ||
|
||
|
||
def install_environment(): | ||
local('pip install -e .') | ||
|
||
|
||
def install(env): | ||
install_requirements() | ||
install_environment() | ||
local('sudo chmod 755 run.py') | ||
nginx() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from flask import Flask | ||
|
||
app = Flask(__name__) | ||
|
||
from __config_project_module__ import views |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from flask import render_template | ||
from __config_project_module__ import app | ||
|
||
|
||
@app.route('/') | ||
def index(): | ||
return 'Hello {{ PROJECT_NAME }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Fabric==1.2.2 | ||
Flask==0.8 | ||
Jinja2==2.6 | ||
Werkzeug==0.8.1 | ||
blinker==1.1 | ||
paramiko==1.7.7.1 | ||
pycrypto==2.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#! /usr/bin/env python | ||
|
||
from __config_project_module__ import app | ||
|
||
app.run() |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
server { | ||
|
||
listen 80; | ||
server_name {{ SERVER_NAME }}; | ||
|
||
location / { | ||
proxy_pass http://{{ HOST }}:{{ PORT }}; | ||
proxy_set_header Host $http_host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
} | ||
|
||
location /static/ { | ||
alias {{ PROJECT_ROOT }}/static/; | ||
} | ||
|
||
location /media/ { | ||
alias {{ PROJECT_ROOT }}/media/; | ||
} | ||
|
||
} |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env python | ||
from setuptools import setup, find_packages | ||
|
||
setup(name='{{ PROJECT_MODULE }}', | ||
version='0.1', | ||
packages=find_packages(), | ||
package_data={'{{ PROJECT }}': ['templates/*.*']}) |
Empty file.