fix #2
This commit is contained in:
parent
e1a046dd51
commit
1f324f73e6
|
@ -26,12 +26,12 @@ services:
|
||||||
context: ./python
|
context: ./python
|
||||||
entrypoint: bash -c "pip install -r requirements.txt && /code/run_app_prod.sh"
|
entrypoint: bash -c "pip install -r requirements.txt && /code/run_app_prod.sh"
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_HOST=mazash_db_1.mazash_db_networks
|
- DATABASE_HOST=mazash_db_1.mazash_db_networks
|
||||||
- POSTGRES_DB=dejavu
|
- DATABASE_DB=dejavu
|
||||||
- POSTGRES_USER=postgres
|
- DATABASE_USER=postgres
|
||||||
- POSTGRES_PASSWORD=password
|
- DATABASE_PASSWORD=password
|
||||||
- IPFS_HOST=ipfs
|
- DATABASE_TYPE=postgres
|
||||||
- IPFS_PORT=5001
|
- IPFS_HOST=/dns/ipfs/tcp/5001
|
||||||
volumes:
|
volumes:
|
||||||
- .:/code
|
- .:/code
|
||||||
working_dir: /code
|
working_dir: /code
|
||||||
|
|
|
@ -8,12 +8,12 @@ mazash = Blueprint(name="mazash", import_name=__name__)
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
"database" : {
|
"database" : {
|
||||||
"host" : os.getenv("POSTGRES_HOST", "db"),
|
"host" : os.getenv("DATABASE_HOST", "db"),
|
||||||
"user" : os.getenv("POSTGRES_USER","postgres"),
|
"user" : os.getenv("DATABASE_USER","postgres"),
|
||||||
"password" : os.getenv("POSTGRES_PASSWORD", "changeme"),
|
"password" : os.getenv("DATABASE_PASSWORD", "changeme"),
|
||||||
"database" : os.getenv("POSTGRES_DB", "dejavu")
|
"database" : os.getenv("DATABASE_DB", "dejavu")
|
||||||
},
|
},
|
||||||
"database_type": "postgres"
|
"database_type": os.getenv("DATABASE_TYPE", "mysql")
|
||||||
}
|
}
|
||||||
|
|
||||||
def transform_resultToJsonable(r):
|
def transform_resultToJsonable(r):
|
||||||
|
@ -51,7 +51,7 @@ def fingerprint():
|
||||||
tags:
|
tags:
|
||||||
- mazash
|
- mazash
|
||||||
"""
|
"""
|
||||||
ipfs_api = ipfshttpclient.connect(os.getenv("IPFS_HOST"), int(os.getenv("IPFS_PORT")))
|
ipfs_api = ipfshttpclient.connect(os.getenv("IPFS_HOST"))
|
||||||
djv = Dejavu(config)
|
djv = Dejavu(config)
|
||||||
if request.is_json :
|
if request.is_json :
|
||||||
ipfs_hash = request.json.get("cid")
|
ipfs_hash = request.json.get("cid")
|
||||||
|
@ -91,7 +91,7 @@ def recognize():
|
||||||
tags:
|
tags:
|
||||||
- mazash
|
- mazash
|
||||||
"""
|
"""
|
||||||
ipfs_api = ipfshttpclient.connect(os.getenv("IPFS_HOST"), int(os.getenv("IPFS_PORT")))
|
ipfs_api = ipfshttpclient.connect(os.getenv("IPFS_HOST"))
|
||||||
djv = Dejavu(config)
|
djv = Dejavu(config)
|
||||||
if request.is_json :
|
if request.is_json :
|
||||||
ipfs_hash = request.json.get("cid")
|
ipfs_hash = request.json.get("cid")
|
||||||
|
|
Loading…
Reference in New Issue