forked from MarseyWorld/MarseyWorld
fsfs
parent
95681b70e0
commit
fdafa80bac
|
@ -7,8 +7,6 @@ services:
|
|||
volumes:
|
||||
- "./:/service"
|
||||
environment:
|
||||
- PYTHONPATH="/service"
|
||||
- REDIS_URL=redis://redis
|
||||
- DATABASE_URL=postgresql://postgres@postgres:5432/postgres
|
||||
- MASTER_KEY=${MASTER_KEY:-KTVciAUQFpFh2WdJ/oiHJlxl6FvzRZp8kYzAAv3l2OA=}
|
||||
- DOMAIN=localhost
|
||||
|
|
2
env
2
env
|
@ -1,5 +1,3 @@
|
|||
export PYTHONPATH="/service"
|
||||
export REDIS_URL="redis://redis"
|
||||
export DATABASE_URL="postgresql://postgres@postgres:5432/postgres"
|
||||
export MASTER_KEY="-KTVciAUQFpFh2WdJ/oiHJlxl6FvzRZp8kYzAAv3l2OA="
|
||||
export DOMAIN="localhost"
|
||||
|
|
|
@ -11,7 +11,6 @@ from flaskext.markdown import Markdown
|
|||
from sqlalchemy.ext.declarative import declarative_base
|
||||
from sqlalchemy.orm import sessionmaker, scoped_session
|
||||
from sqlalchemy import *
|
||||
from sqlalchemy.pool import QueuePool
|
||||
import gevent
|
||||
from werkzeug.middleware.proxy_fix import ProxyFix
|
||||
import redis
|
||||
|
@ -76,16 +75,10 @@ limiter = Limiter(
|
|||
strategy="fixed-window"
|
||||
)
|
||||
|
||||
_engine=create_engine(
|
||||
app.config['DATABASE_URL'],
|
||||
poolclass=QueuePool,
|
||||
pool_size=97,
|
||||
pool_use_lifo=True
|
||||
)
|
||||
|
||||
|
||||
Base = declarative_base()
|
||||
|
||||
engine = create_engine(app.config['DATABASE_URL'])
|
||||
|
||||
db_session = scoped_session(sessionmaker(engine))
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue