Skip to content

Commit

Permalink
Add support for viewing the originals and annotation folder (#364)
Browse files Browse the repository at this point in the history
* Add support for viewing the originals and annotation folder

* Attempt to fix webpack failure

* Bundle public folders into Docker image

* Add logging for public path

* Remove npm audit. Again.

* More public folder nonsense

* More webpack nonsense

* Clean up unneeded code
  • Loading branch information
danecreekphotography authored Aug 13, 2020
1 parent 3c497c1 commit f85a479
Show file tree
Hide file tree
Showing 7 changed files with 1,967 additions and 189 deletions.
1 change: 0 additions & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
node-version: ${{ matrix.node-version }}

- run: npm ci
- run: npm audit
- run: npm run lint
- run: npm test
- run: npm run webpack
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## Unreleased

- The `/originals` and `/annotations` folders can now be viewed via the webserver. This enables
browsing the list of all stored images instead of having to know the specific filename of the
image. Resolves [issue363](https://github.com/danecreekphotography/node-deepstackai-trigger/issues/363).

## 5.2.1

- Address security vulnerability in webpack used during the build process. Resolves [issue 357](https://github.com/danecreekphotography/node-deepstackai-trigger/issues/357).
Expand Down
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ FROM node:slim
# Pre-create the temporary storage folder so it has the right user
# permissions on it after volume mount
RUN mkdir -p /node-deepstackai-trigger && chown -R node:node /node-deepstackai-trigger
RUN mkdir -p /home/node/app/public && chown -R node:node /home/node/app/public

WORKDIR /home/node/app
USER node
Expand All @@ -25,6 +26,9 @@ COPY --from=build --chown=node:node /home/node/app/LICENSE .
COPY --from=build --chown=node:node /home/node/app/FONT_LICENSE .
COPY --from=build --chown=node:node /home/node/app/fonts/CascadiaCode.ttf ./fonts/CascadiaCode.ttf

# The static files for directory display by the Express web server need to get copied over.
COPY --from=build --chown=node:node /home/node/app/node_modules/serve-index/public ./public

# Enable polling for watching files by default since it appears that's
# the only way to have file detection work in a Docker container.
# This can always be set to false in docker-compose.yml later if necessary.
Expand Down
Loading

0 comments on commit f85a479

Please sign in to comment.