Skip to content

Commit

Permalink
Allow to tune the debug levels from the environment
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Valsecchi committed Sep 28, 2016
1 parent 03f6ef1 commit 2a12e37
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ EXPOSE 80

COPY . /

ENV MS_DEBUGLEVEL 0
ENV MS_ERRORFILE stderr

ENTRYPOINT ["/docker-entrypoint.sh"]

CMD ["apache2", "-DFOREGROUND"]
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,8 @@ All the files ending with `.tmpl` in /etc/mapserver and /etc/apache2 (can be
changed by defining CONFD_DIRS in one of the sourced files) will go though
confd with the `env` backend. The TOML files are created automagically to
create a file at the same location, with just the `.tmpl` extension removed.

You can use the following environment variables (when starting the container)
to tune it:
* MS_DEBUGLEVEL: The debug level 0=off 5=verbose
* MS_ERRORFILE: If you want the debug to something other than STDOUT
3 changes: 3 additions & 0 deletions etc/apache2/conf-enabled/mapserver.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
FcgidInitialEnv MS_ERRORFILE ${MS_ERRORFILE}
FcgidInitialEnv MS_DEBUGLEVEL ${MS_DEBUGLEVEL}

ScriptAlias /mapserv /usr/lib/cgi-bin/mapserv
ScriptAlias / /usr/lib/cgi-bin/mapserv
<Location />
Expand Down

0 comments on commit 2a12e37

Please sign in to comment.