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