-
Notifications
You must be signed in to change notification settings - Fork 14
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
Andrey
committed
Mar 2, 2018
1 parent
4f26ced
commit d0a2c21
Showing
2 changed files
with
152 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
[app:main] | ||
sqlalchemy.url = postgresql+psycopg2://postgres:password@pg:5432/lingvodoc-proxy | ||
|
||
[alembic] | ||
script_location = alembic | ||
sqlalchemy.url = postgresql+psycopg2://postgres:password@pg:5432/lingvodoc-proxy | ||
|
||
[loggers] | ||
keys = root,sqlalchemy,alembic | ||
|
||
[handlers] | ||
keys = console | ||
|
||
[formatters] | ||
keys = generic | ||
|
||
[logger_root] | ||
level = WARN | ||
handlers = console | ||
qualname = | ||
|
||
[logger_sqlalchemy] | ||
level = WARN | ||
handlers = | ||
qualname = sqlalchemy.engine | ||
|
||
[logger_alembic] | ||
level = INFO | ||
handlers = | ||
qualname = alembic | ||
|
||
[handler_console] | ||
class = StreamHandler | ||
args = (sys.stderr,) | ||
level = NOTSET | ||
formatter = generic | ||
|
||
[formatter_generic] | ||
format = %(levelname)-5.5s [%(name)s] %(message)s | ||
datefmt = %H:%M:%S |
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,112 @@ | ||
### | ||
# app configuration | ||
# http://docs.pylonsproject.org/projects/pyramid/en/1.5-branch/narr/environment.html | ||
### | ||
|
||
[app:main] | ||
use = egg:lingvodoc | ||
|
||
secret = 'secret-proxy' | ||
|
||
pyramid.reload_templates = true | ||
pyramid.debug_authorization = false | ||
pyramid.debug_notfound = false | ||
pyramid.debug_routematch = false | ||
pyramid.default_locale_name = ru | ||
pyramid.includes = | ||
pyramid_tm | ||
# pyramid_debugtoolbar | ||
|
||
sqlalchemy.url = postgresql+psycopg2://postgres:password@pg:5432/lingvodoc-proxy | ||
|
||
# By default, the toolbar only appears for clients from IP addresses | ||
# '127.0.0.1' and '::1'. | ||
# debugtoolbar.hosts = 127.0.0.1 ::1 | ||
|
||
### | ||
# wsgi server configuration | ||
### | ||
|
||
[server:main] | ||
use = egg:gunicorn#main | ||
bind = unix:/sock/lingvodoc.sock | ||
workers = 2 | ||
timeout = 360000 | ||
pidfile = /tmp/lingvodoc.pid | ||
accesslog = /var/log/access.log | ||
errorlog = /var/log/error.log | ||
loglevel = warning | ||
#preload_app = True | ||
#daemon = True | ||
proc_name = lingvodoc | ||
|
||
|
||
|
||
[app:desktop] | ||
desktop = true | ||
central_server = http://nginx/api/ | ||
|
||
### | ||
# logging configuration | ||
# http://docs.pylonsproject.org/projects/pyramid/en/1.5-branch/narr/logging.html | ||
### | ||
|
||
[loggers] | ||
keys = root, lingvodoc, sqlalchemy | ||
|
||
[handlers] | ||
keys = console, filelog | ||
|
||
[formatters] | ||
keys = generic | ||
|
||
[logger_root] | ||
level = WARN | ||
handlers = console, filelog | ||
|
||
[logger_lingvodoc] | ||
level = WARN | ||
handlers = | ||
qualname = lingvodoc | ||
|
||
[logger_sqlalchemy] | ||
level = ERROR | ||
handlers = | ||
qualname = sqlalchemy.engine | ||
# "level = INFO" logs SQL queries. | ||
# "level = DEBUG" logs SQL queries and results. | ||
# "level = WARN" logs neither. (Recommended for production systems.) | ||
|
||
[handler_console] | ||
class = StreamHandler | ||
args = (sys.stderr,) | ||
level = NOTSET | ||
formatter = generic | ||
|
||
[handler_filelog] | ||
class = handlers.RotatingFileHandler | ||
args = ('/tmp/ld.log', 'a', 16777216, 1) | ||
level = NOTSET | ||
formatter = generic | ||
|
||
[formatter_generic] | ||
format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s | ||
|
||
[backend:storage] | ||
# disk or openstack | ||
type = disk | ||
path = /tmp/ | ||
prefix = http://localhost/ | ||
static_route = objects/ | ||
|
||
[cache:dogpile] | ||
expiration_time = 3600000 | ||
backend = dogpile.cache.redis | ||
;backend = dogpile.cache.memcached | ||
|
||
[cache:dogpile:args] | ||
;redis_expiration_time = 60*60*2 | ||
host = redis-proxy | ||
port = 6379 | ||
db = 0 | ||
distributed_lock = True |