Skip to content

Commit

Permalink
clamnewproject: allow using DATADIR environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
proycon committed Jan 4, 2024
1 parent 49debdd commit 6c28d3d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion clam/clamnewproject.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def main():
docker build -t "{sysid}" .
#Note, this datadir will be non-persistent, you will likely want to change this in production settings
DATADIR=$(mktemp -d)
[ -z "$DATADIR" ] && DATADIR=$(mktemp -d)
chmod go+wx "$DATADIR" #allow subuids/subgids to make directories, needed to prevent permission denied errors
HOST_PORT={port}
Expand Down
6 changes: 6 additions & 0 deletions docs/source/deployment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,17 @@ and runs it like::

docker run --rm -v "/path/to/data:/data" -p 8080:80 yourservice


If you used the generated ``*.config.yml`` external configuration file, then
you can configure a lot of the deployment specific variables via environment
variables. Check the ``*.config.yml`` file to see which are available. Note
that most environment variables carry the additional prefix `CLAM_`.

The ``startserver_production.sh`` script generates a non-persistent data
directory on the host for use by the container, you most likely want to change
this either in the script itself or by setting a `DATADIR` environment variable
to an existing directory on the host prior to running the script!

The container is based on Alpine Linux and serves your CLAM webservice via
nginx and uwsgi.

Expand Down

0 comments on commit 6c28d3d

Please sign in to comment.