Fix img assets missing in docker

This commit is contained in:
dave 2019-07-06 13:47:42 -07:00
parent 3bbe0f20ea
commit 3aa2264be4
4 changed files with 6 additions and 5 deletions

View File

Before

Width:  |  Height:  |  Size: 688 B

After

Width:  |  Height:  |  Size: 688 B

View File

@ -264,7 +264,7 @@ class ThumbnailView(object):
if thumb_path:
return cherrypy.lib.static.serve_file(thumb_path, "image/jpeg")
else:
return cherrypy.lib.static.serve_file(os.path.join(APPROOT, "styles/dist/unknown.svg"), "image/svg+xml")
return cherrypy.lib.static.serve_file(os.path.join(APPROOT, "assets/img/unknown.svg"), "image/svg+xml")
@cherrypy.popargs('item_type', 'uuid')

View File

@ -22,8 +22,8 @@ def get_engine_options(uri):
return {}
def get_db_engine(uri):
engine = sqlalchemy.create_engine(uri, **get_engine_options(uri))
def get_db_engine(uri, debug=False):
engine = sqlalchemy.create_engine(uri, **get_engine_options(uri), echo=debug)
Base.metadata.create_all(engine)
return engine

View File

@ -22,11 +22,12 @@ setup(name='photoapp',
"photocli = photoapp.cli:main",
# "photoimport = photoapp.ingest:main", # broken for now
# "photovalidate = photoapp.validate:main",
#"photooffset = photoapp.dateoffset:main",
# "photooffset = photoapp.dateoffset:main",
]
},
include_package_data=True,
package_data={'photoapp': ['../templates/*.html',
'../templates/fragments/*.html',
'../styles/dist/*']},
'../styles/dist/*',
'../assets/img/*']},
zip_safe=False)