forked from atdt/marcel
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
41 changed files
with
249 additions
and
749 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
*.egg-info | ||
*.pyc | ||
*.pyo | ||
.DS_Store | ||
.epio-app | ||
dist | ||
docs/_build | ||
env | ||
production.cfg | ||
*.swp | ||
*.un~ | ||
*.db | ||
static_root/ |
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 |
---|---|---|
@@ -1,18 +1,22 @@ | ||
# epio.ini for permabank | ||
|
||
[django] | ||
append_settings = false | ||
base = . | ||
|
||
[wsgi] | ||
requirements = requirements.txt | ||
entrypoint = permabank:app | ||
|
||
[static] | ||
/static = permabank/static | ||
|
||
[services] | ||
postgres = true | ||
redis = true | ||
|
||
[redis] | ||
memory = 16 | ||
|
||
[static] | ||
/static = static_root | ||
/media = ../data | ||
|
||
[env] | ||
EPIO = true | ||
PERMABANK_SETTINGS = ../production.cfg |
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,10 @@ | ||
from django.core.cache import cache | ||
|
||
from django.core.management.base import NoArgsCommand | ||
|
||
class Command(NoArgsCommand): | ||
help = 'Flushes the cache.' | ||
|
||
def handle_noargs(self, **options): | ||
cache.clear() | ||
print "Cache flushed." |
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,12 @@ | ||
import redis | ||
from bundle_config import config | ||
|
||
from django.core.management.base import NoArgsCommand | ||
|
||
class Command(NoArgsCommand): | ||
help = 'Flushes all keys in redis.' | ||
|
||
def handle_noargs(self, **options): | ||
r = redis.Redis(host=config['redis']['host'], port=int(config['redis']['port']), password=config['redis']['password']) | ||
r.flushall() | ||
print "All redis keys flushed." |
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 @@ | ||
from fabric.api import local, env | ||
|
||
def production(): | ||
env['epioapp'] = # production epio instance name | ||
|
||
def staging(): | ||
env['epioapp'] = # staging epio instance | ||
|
||
def epio(commandstring): | ||
local("epio {0} -a {1}".format( | ||
commandstring, | ||
env['epioapp'])) | ||
|
||
def deploy(): | ||
""" An example deploy workflow """ | ||
local("./manage.py collectstatic") | ||
epio('upload') | ||
epio('django syncdb') | ||
epio('django migrate') | ||
epio('django epio_flush_cache') | ||
|
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,2 @@ | ||
#!/usr/bin/env bash | ||
pip install -r requirements.txt |
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,14 @@ | ||
#!/usr/bin/env python | ||
from django.core.management import execute_manager | ||
import imp | ||
try: | ||
imp.find_module('settings') # Assumed to be in the same directory. | ||
except ImportError: | ||
import sys | ||
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n" % __file__) | ||
sys.exit(1) | ||
|
||
import settings | ||
|
||
if __name__ == "__main__": | ||
execute_manager(settings) |
Binary file not shown.
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.