Spaces:
Runtime error
Runtime error
- Dockerfile +1 -1
- common/db.py +1 -0
Dockerfile
CHANGED
|
@@ -35,7 +35,7 @@ RUN python -m pip install -r requirements.txt
|
|
| 35 |
# RUN python -m pip install --ignore-installed elasticsearch==7.11.0 || true
|
| 36 |
|
| 37 |
COPY . .
|
| 38 |
-
|
| 39 |
RUN mkdir -p /data/regulation_datasets /data/documents /data/logs
|
| 40 |
|
| 41 |
|
|
|
|
| 35 |
# RUN python -m pip install --ignore-installed elasticsearch==7.11.0 || true
|
| 36 |
|
| 37 |
COPY . .
|
| 38 |
+
RUN chmod -R 777 /data
|
| 39 |
RUN mkdir -p /data/regulation_datasets /data/documents /data/logs
|
| 40 |
|
| 41 |
|
common/db.py
CHANGED
|
@@ -22,6 +22,7 @@ CONFIG_PATH = os.environ.get('CONFIG_PATH', './config_dev.yaml')
|
|
| 22 |
config = Configuration(CONFIG_PATH)
|
| 23 |
logger = logging.getLogger(__name__)
|
| 24 |
|
|
|
|
| 25 |
engine = create_engine(config.common_config.log_sql_path, connect_args={'check_same_thread': False})
|
| 26 |
|
| 27 |
session_factory = sessionmaker(autocommit=False, autoflush=False, bind=engine)
|
|
|
|
| 22 |
config = Configuration(CONFIG_PATH)
|
| 23 |
logger = logging.getLogger(__name__)
|
| 24 |
|
| 25 |
+
print("sql url:", config.common_config.log_sql_path)
|
| 26 |
engine = create_engine(config.common_config.log_sql_path, connect_args={'check_same_thread': False})
|
| 27 |
|
| 28 |
session_factory = sessionmaker(autocommit=False, autoflush=False, bind=engine)
|