Skip to content

Commit

Permalink
Merge pull request #110 from camptocamp/update-readme
Browse files Browse the repository at this point in the history
Some update in the readme
  • Loading branch information
sbrunner authored Feb 17, 2021
2 parents 6eadb52 + 15f856e commit 08049cf
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,37 @@ directory. Either you create another image to add those files or you inject them
a volume. For example:

```bash
docker run -d -p 8380:80 --volume=$PWD/etc/qgisserver:/etc/qgisserver camptocamp/qgis-server
docker run --detach --publish=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

## Tuning

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)
* 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`
* QGIS_CATCH_SEGV: Set to "1" if you want stacktraces in the logs in case of segmentation faults.
* FCGID_MAX_REQUESTS_PER_PROCESS: The number of requests a QGIS server will serve before being restarted by apache
* FCGID_MIN_PROCESSES: The minimum number of fcgi processes to keep (defaults to 1)
* FCGID_MAX_PROCESSES: The maximum number of fcgi processes to keep (defaults to 5)
* FCGID_IO_TIMEOUT: This is the maximum period of time the module will wait while trying to read from or
write to a FastCGI application (default to 40)
* FCGID_BUSY_TIMEOUT: The maximum time limit for request handling (defaults to 300)
* FCGID_IDLE_TIMEOUT: Application processes which have not handled a request for
this period of time will be terminated (defaults to 300)
- `QGIS_SERVER_LOG_LEVEL`: The debug level for the logs (`0`=max debug, `3`=no debug logs)
- `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`
- `QGIS_CATCH_SEGV`: Set to `1` if you want stacktraces in the logs in case of segmentation faults.
- `FCGID_MAX_REQUESTS_PER_PROCESS`: The number of requests a QGIS server will serve before being restarted by apache
- `FCGID_MIN_PROCESSES`: The minimum number of fcgi processes to keep (defaults to `1`)
- `FCGID_MAX_PROCESSES`: The maximum number of fcgi processes to keep (defaults to `5`)
- `FCGID_IO_TIMEOUT`: This is the maximum period of time the module will wait while trying to read from or
write to a FastCGI application (default to `40`)
- `FCGID_BUSY_TIMEOUT`: The maximum time limit for request handling (defaults to `300`)
- `FCGID_IDLE_TIMEOUT`: Application processes which have not handled a request for
this period of time will be terminated (defaults to `300`)

[See also QGIS server documentation](https://docs.qgis.org/3.16/en/docs/server_manual/config.html?highlight=environment#environment-variables)

Fonts present in the `/etc/qgisserver/fonts` directory will be installed and thus usable by QGIS.

## Running the client

If you want to edit a project file, you can run the client from a Linux machine with the following command:

```bash
docker run --rm -ti -e DISPLAY=unix${DISPLAY} -v /tmp/.X11-unix:/tmp/.X11-unix -v ${HOME}:${HOME} camptocamp/qgis-server:master-desktop
docker run --rm -ti --env=DISPLAY=unix${DISPLAY} --volume=/tmp/.X11-unix:/tmp/.X11-unix --volume=${HOME}:${HOME} camptocamp/qgis-server:master-desktop
```

0 comments on commit 08049cf

Please sign in to comment.