Commit 97bd245d authored by J. Fernando Sánchez's avatar J. Fernando Sánchez
Browse files

Changed data directory

parent d8b59d06
......@@ -6,7 +6,7 @@ RUN mkdir /cache/ /senpy-plugins /data/
VOLUME /data/
ONBUILD COPY . /senpy-plugins/
ONBUILD RUN python -m senpy --only-install -f /senpy-plugins
......@@ -19,4 +19,4 @@ RUN pip install --use-wheel -r test-requirements.txt -r requirements.txt
COPY . /usr/src/app/
RUN pip install --no-deps --no-index .
ENTRYPOINT ["python", "-m", "senpy", "-f", "/senpy-plugins/", "--host", ""]
\ No newline at end of file
ENTRYPOINT ["python", "-m", "senpy", "-f", "/senpy-plugins/", "--host", ""]
......@@ -3,6 +3,7 @@ standard_library.install_aliases()
import inspect
import os.path
import os
import pickle
import logging
import tempfile
......@@ -92,8 +93,8 @@ class ShelfMixin(object):
def shelf_file(self):
if 'shelf_file' not in self or not self['shelf_file']:
self.shelf_file = os.path.join(tempfile.gettempdir(), + '.p')
sd = os.environ.get('SENPY_DATA', tempfile.gettempdir())
self.shelf_file = os.path.join(sd, + '.p')
return self['shelf_file']
def save(self):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment