Skip to content

Commit

Permalink
Fix GeoLite2 cache dir in Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
cdauth committed Nov 16, 2023
1 parent 409eb86 commit 92b54d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ MAINTAINER Candid Dauth <[email protected]>

CMD yarn run server
EXPOSE 8080
ENV CACHE_DIR=/opt/facilmap/cache

RUN apk add --no-cache yarn

Expand All @@ -21,6 +22,6 @@ RUN cd .. && yarn install
RUN cd .. && yarn run build

USER root
RUN chown -R root:root /opt/facilmap && mkdir -p /opt/facilmap/server/node_modules/.cache && chown -R facilmap:facilmap /opt/facilmap/server/node_modules/.cache
RUN chown -R root:root /opt/facilmap && mkdir -p "$CACHE_DIR" && chown -R facilmap:facilmap "$CACHE_DIR"

USER facilmap
2 changes: 1 addition & 1 deletion docs/src/developers/server/standalone.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ A bundled version of the FacilMap server is published on NPM as [facilmap-server
3. Create a `config.env` file based on [`config.env.example`](https://github.com/FacilMap/facilmap/blob/main/config.env.example) and to adjust the [configuration](./config.md).
4. Start the FacilMap server by running `~/.local/bin/facilmap-server dotenv_config_path=config.env`.

FacilMap will need write access to the directory `~/.local/lib/node_modules/.cache/facilmap-server`. All other files and directories can be read-only. To harden the FacilMap installation, make the whole installation folder owned by root, but create the cache directory and make it owned by the facilmap user.
FacilMap will need write access to the directory `~/.local/lib/node_modules/.cache/facilmap-server` (or specify another directory in the `CACHE_DIR` environment variable). All other files and directories can be read-only. To harden the FacilMap installation, make the whole installation folder owned by root, but create the cache directory and make it owned by the facilmap user.


## Run the development version
Expand Down

0 comments on commit 92b54d3

Please sign in to comment.