Override the database path in Docker containers

This commit is contained in:
Travis Ralston 2018-07-21 09:20:47 -06:00
parent ce512ed47d
commit 28b3670696
2 changed files with 4 additions and 1 deletions

View file

@ -35,6 +35,9 @@ USER node
VOLUME ["/data"]
# Ensure the database doesn't get lost to the container
ENV DIMENSION_DB_PATH=/data/dimension.db
EXPOSE 8184
#CMD ["/bin/sh"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View file

@ -29,7 +29,7 @@ class _DimensionStore {
this.sequelize = new Sequelize({
dialect: 'sqlite',
database: "dimension",
storage: config.database.file,
storage: process.env['DIMENSION_DB_PATH'] || config.database.file,
username: "",
password: "",
logging: i => LogService.verbose("DimensionStore [SQL]", i)