-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
61 lines (47 loc) · 1.66 KB
/
config.py
File metadata and controls
61 lines (47 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#import pyodbc
import os
DEBUG = True
SQLALCHEMY_TRACK_MODIFICATIONS = True
CORS_HEADERS = 'Content-Type'
SECRET_KEY = "asdjkgasd$#43"
ENV = os.environ.get('ENV', 'NULL')
INDEV = os.environ.get('DEV', '0')
if INDEV == '1':
#drivers = [item for item in pyodbc.drivers()]
#driver = drivers[-1]
driver = "ODBC Driver 17 for SQL Server"
else:
driver = "SQL+Server"
driver = "ODBC Driver 17 for SQL Server"
print(ENV,INDEV)
if ENV == 'ALEX':
SERVER = "arcadeserver.database.windows.net"
DB = "arcadecard"
USER = "arcadeAdmin"
PWD = "qwerty333#"
SQLALCHEMY_DATABASE_URI = f"mssql+pyodbc://{USER}:{PWD}@{SERVER}/{DB}?driver={driver}"
elif ENV == 'CHARLE':
SERVER = "arcadeserv.database.windows.net"
DB = "arcadebd"
USER = "adminarcade"
PWD = "Qwerty333#"
SQLALCHEMY_DATABASE_URI = f"mssql+pyodbc://{USER}:{PWD}@{SERVER}/{DB}?driver={driver}"
elif ENV == 'CONTAINER_FROM_OUT':
SERVER = "154.56.60.61"
PORT = 5432
DB = "arcadecard"
USER = "postgres"
PWD = "qwerty333"
SQLALCHEMY_DATABASE_URI = f"postgresql+psycopg2://{USER}:{PWD}@{SERVER}:{PORT}/{DB}"
elif ENV == 'CONTAINER':
SERVER = "postgres_cntr"
PORT = 5432
DB = "arcadecard"
USER = "postgres"
PWD = "qwerty333"
SQLALCHEMY_DATABASE_URI = f"postgresql+psycopg2://{USER}:{PWD}@{SERVER}:{PORT}/{DB}"
print("driver:{}".format(driver))
print(SQLALCHEMY_DATABASE_URI)
#SQLALCHEMY_DATABASE_URI = SQLALCHEMY_DATABASE_HEROKU
#SQLALCHEMY_DATABASE_URI = "sqlite:///storage.db"
#SQLALCHEMY_DATABASE_URI = "mssql+pyodbc://loginmaster:qwerty333#@arcadecard2.database.windows.net/principal?driver=SQL+Server"