Skip to content

Commit 2a12e37

Browse files
author
Patrick Valsecchi
committed
Allow to tune the debug levels from the environment
1 parent 03f6ef1 commit 2a12e37

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ EXPOSE 80
3737

3838
COPY . /
3939

40+
ENV MS_DEBUGLEVEL 0
41+
ENV MS_ERRORFILE stderr
42+
4043
ENTRYPOINT ["/docker-entrypoint.sh"]
4144

4245
CMD ["apache2", "-DFOREGROUND"]

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,8 @@ All the files ending with `.tmpl` in /etc/mapserver and /etc/apache2 (can be
2626
changed by defining CONFD_DIRS in one of the sourced files) will go though
2727
confd with the `env` backend. The TOML files are created automagically to
2828
create a file at the same location, with just the `.tmpl` extension removed.
29+
30+
You can use the following environment variables (when starting the container)
31+
to tune it:
32+
* MS_DEBUGLEVEL: The debug level 0=off 5=verbose
33+
* MS_ERRORFILE: If you want the debug to something other than STDOUT

etc/apache2/conf-enabled/mapserver.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
FcgidInitialEnv MS_ERRORFILE ${MS_ERRORFILE}
2+
FcgidInitialEnv MS_DEBUGLEVEL ${MS_DEBUGLEVEL}
3+
14
ScriptAlias /mapserv /usr/lib/cgi-bin/mapserv
25
ScriptAlias / /usr/lib/cgi-bin/mapserv
36
<Location />

0 commit comments

Comments
 (0)