Run a complete Lizmap stack with test data.
- Lizmap Web Client
- QGIS Server
- Redis
Note: this is a sample configuration for testing Lizmap web client with QGIS and WPS features.
❗If you want to use it on a production server, you will need to make adjustments to meet your production requirements.
- Docker engine
- docker-compose v2
Execute the commands below for your system and open your browser at http://localhost:8090.
In a shell, configure the environment:
./configure.sh configureOr if you want to test specific version (here last 3.X.Y version):
LIZMAP_VERSION_TAG=3.9 ./configure.sh configureRun lizmap:
docker compose pull
docker compose upTo run lizmap visible to another system, prefix the docker command with a variable. NB! This will be plain HTTP with no encryption and not suitable for production.
LIZMAP_PORT=EXTERNAL_IP_HERE:80 docker compose upIn order to user Docker on Windows you may install Docker desktop for Windows
If you have some distribution installed (Ubuntu, ...) in WSL, you can simply run the linux command as above, once in it.
Or in PowerShell, run the following command to set up some files
configure.batYou can then launch the docker using
docker compose --env-file .env.windows upOr if you want to test specific version, you can edit .env.windows and change (here last 3.X.Y version):
LIZMAP_VERSION_TAG=3.9The previous commands create a docker-compose environment and run the stack
The Lizmap service will start two toys projects that you will have to configure in the Lizmap interface.
See the Lizmap documentation for how to configure Lizmap at first run.
Default login is admin, password admin. It will be asked to change it at first login.
You need to :
- create a directory in
lizmap/instances - visit http://localhost:8090/admin.php/admin/maps/
- in the Lizmap admin panel, add the directory you created
- add one or more QGIS projects with the Lizmap CFG file in the directory
To update versions simply update your .env file.
LIZMAP_VERSION_TAG=3.8
QGIS_VERSION_TAG=3.40
POSTGIS_VERSION=13-3Find the list of available docker images versions available, in the Docker Hub tag page of each image :
| Image name | Dockerhub image | Env variable related |
|---|---|---|
| 3liz/lizmap-web-client | hub.docker.com/r/3liz/lizmap-web-client | LIZMAP_VERSION_TAG |
| 3liz/qgis-map-server | hub.docker.com/r/3liz/qgis-map-server | QGIS_VERSION_TAG |
| 3liz/postgis | hub.docker.com/r/3liz/postgis | POSTGIS_VERSION |
Once updated, simply run the following command
docker compose up -dThis one will pull the new images, and update your instance versions.
NB : You might face The lizmap_server plugin needs to be updated error (see #68)
To fix this issue :
- Connect to your lizmap container.
docker compose exec map bash- Move to your qgis server plugins folder
cd /srv/plugins
qgis-plugin-manager list
qgis-plugin-manager update
qgis-plugin-manager upgradeMore info about qgis-plugin-manager here
- Exit from your container and restart lizmap container to handle new changes
exit
docker compose restart mapIn command line
./configure.sh clean This will remove all previous configuration. You will have to reenter the configuration in Lizmap as for the first run.
For more information, refer to the docker-compose documentation
See also:
Docker on Windows: