Skip to content

Commit

Permalink
Merge pull request #7 from camptocamp/etc
Browse files Browse the repository at this point in the history
Put the config files in /etc
  • Loading branch information
sbrunner authored Jun 25, 2018
2 parents a6faa5c + 52c0e21 commit 64c82e0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

## Usage

Expects a `project.qgs` project file and all the files it depends on in the `/project/`
Expects a `project.qgs` project file and all the files it depends on in the `/etc/qgisserver/`
directory. Either you create another image to add those files or you inject them using
a volume. For example:

```bash
docker run -d -p 8380:80 --volume=$PWD/project:/project camptocamp/qgis-server
docker run -d -p 8380:80 --volume=$PWD/etc/qgisserver:/etc/qgisserver camptocamp/qgis-server
```
With the previous command, you'll get to your server with this URL:
http://localhost:8380/?SERVICE=WMS&REQUEST=GetCapabilities
Expand All @@ -20,8 +20,8 @@ You can use the following variables (`-e` option in `docker run`):

* QGIS_SERVER_LOG_LEVEL: The debug level for the logs (0=max debug, 3=no debug logs)
* QGIS_SERVER_LOG_FILE: To output the logs to a file (default to stdout)
* PGSERVICEFILE: If you want to change the default of `/project/pg_service.conf`
* QGIS_PROJECT_FILE: If you want to change the default of `/project/project.qgs`
* PGSERVICEFILE: If you want to change the default of `/etc/qgisserver/pg_service.conf`
* QGIS_PROJECT_FILE: If you want to change the default of `/etc/qgisserver/project.qgs`
* MAX_REQUESTS_PER_PROCESS: The number of requests a QGIS server will serve before being restarted by apache
* QGIS_CATCH_SEGV: Set to "1" if you want stacktraces in the logs in case of segmentation faults.

Expand Down
9 changes: 6 additions & 3 deletions server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,15 @@ RUN a2enmod fcgid headers && \
mkdir -p /var/www/plugins && \
chown www-data: /var/www/.qgis3 && \
mknod /var/log/docker p && \
chown www-data: /var/log/docker
chown www-data: /var/log/docker && \
ln --symbolic /project /etc/qgisserver


# A few tunable variables for QGIS
ENV QGIS_SERVER_LOG_LEVEL=0 \
QGIS_SERVER_LOG_FILE=/var/log/docker \
PGSERVICEFILE=/project/pg_service.conf \
QGIS_PROJECT_FILE=/project/project.qgs \
PGSERVICEFILE=/etc/qgisserver/pg_service.conf \
QGIS_PROJECT_FILE=/etc/qgisserver/project.qgs \
MAX_CACHE_LAYERS="" \
QGIS_PLUGINPATH=/var/www/plugins \
MAX_REQUESTS_PER_PROCESS=1000
Expand All @@ -56,5 +58,6 @@ COPY target /usr/local/

RUN ldconfig

WORKDIR /etc/qgisserver
EXPOSE 80
CMD ["/bin/bash", "/usr/local/bin/start-server.sh"]

0 comments on commit 64c82e0

Please sign in to comment.