Closed rduivenvoorde closed 7 years ago
Thanks @rduivenvoorde I am having issues with the build service - can you try build it locally and see if you get the same issue? Actually the issue with the build service is for the QGIS Desktop images which the server now inherits - so to test you need to first build the desktop image then the server one. I will try to trigger a rebuild here and see if the hub is behaving again...
Desktop builds triggered - results will show here: https://hub.docker.com/r/kartoza/qgis-desktop/builds/
Hi Tim, I followed your advice and I built the desktop and the server images and the issue persists.
Thanks @tudorbarascu
docker run --rm kartoza/qgis-desktop:2.12 ls /usr/bin | grep gis
might do it...
I've build for the latest
tag, and yes, the binary exists, as seen in output:
dh_suidregister
fcgistarter
qgis
qgis_bench
qgis_mapserv.fcgi
@timlinux Do you think I may have a newbie problem or it's due to the configs? Thanks a lot! forgot to mention that's really nice to have a qgis server docker container :).
@timlinux the current setup became better (because orchastrated with postgis and qgis-application), but I think there is also a 'market' for a straight forward dummy qgis-server container. Happy to dig up the older version of docker-file and add an image to the qgis-repo. Then Kartoza can keep the 'orchastrated' ones. And QGIS has the 'my first qgis-server docker'? Ok with that?
Hi @rduivenvoorde A straight forward QGIS Server container is exactly what I am building. The only thing I am trying to do is have a version for each release of QGIS. Because we often can't get debs for old version of QGIS in apt I hand compile everything. It would be great if you wanted to help to contribute to rather get eh apache configs working rather than digging out the old one.
The QGIS server image inherits from the QGIS Desktop (which is compiled in the container in the build process rather than installed from packages). QGIS Desktop image installs all compile deps, builds QGIS into /usr
and then cleans out all the downloaded packages and uninstalls the dev libs to make the resulting package as small as possible. Currently it gets to be around 600mb which is not too bad.
QGIS Server adds a very thin layer over gis-desktop container. The usage pattern is supposed to be a very simple:
docker run -d -p 8080:8080 -v <some path>:/web/ kartoza/qgis-server:2.12
I am just a bit overloaded at the moment but I will get back to making the images work soon I promise. In the mean time if you just want to play, and don't mind using gis 2.8.3 on the server this should still be working:
docker run -d -p 8080:8080 -v <some path>:/web/ kartoza/qgis-server:2.12
As far as I know it is only the tagged versions which are having problems - and I haven't tried to promote them as being available yet. If 2.8.3 is also not working, let me know and I will look.
So docker-compose has nothing to do with the egis-server image - it sits a conceptual layer above and you use it when you want to do orchestration which is not (really) needed when running a single container only.
Hope that makes sense?
@rduivenvoorde btw I am more than happy that we publish everything under official QGIS docker organisation - can you add me to the QGIS group and I will publish there as these come on line? My plan is to publish an official docker based release each time a QGIS release is made - and add some notes to the download page about it.
Just for information, it still failing. There is not qgis server in the container :
[etienne:/home/etienne] $ docker exec -it qgis-server /bin/bash
root@0b0ae40fba69:/tmp# ls /usr/lib/cgi-bin/
root@0b0ae40fba69:/tmp#
I'm going to try with another version, or to build it from scratch.
I confirm that kartoza/qgis-server:latest
doesn't work, but kartoza/qgis-server:2.6
works, even if it's very old.
I Tim, Like Gustry, I confirm that 2.6 works, but not the latest (2.14.6)
Hi again Tim. I compared the 000-default.conf from the TAG 2.6 and 2.14.6. In the TAG 2.14.6, there is no specific conf while in the 2.6, there is a QGIS server conf `<VirtualHost *:80> ServerAdmin webmaster@localhost ServerName qgis-server.qgis.org
DocumentRoot /web
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /web>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
Require all granted
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
#Uncomment the next line to enable logging to a file
SetEnv QGIS_LOG_FILE /tmp/qgislog.txt
SetEnv QGIS_DEBUG 3
`
I use the 000-default.conf from the TAG 2.6 with the 2.14.6 Now I get this error
`
`
Hi @othke
the QGIS config stuff is now in /etc/apache2/conf-enabled/qgis.conf:
ScriptAlias / /usr/lib/cgi-bin/qgis_mapserv.fcgi
<Location "/">
SetHandler fcgid-script
Require all granted
PassEnv QGIS_PROJECT_FILE
</Location>
FcgidInitialEnv QGIS_LOG_FILE ${QGIS_LOG_FILE}
FcgidInitialEnv QGIS_SERVER_LOG_FILE ${QGIS_SERVER_LOG_FILE}
FcgidInitialEnv QGIS_DEBUG ${QGIS_DEBUG}
FcgidInitialEnv QGIS_SERVER_LOG_LEVEL ${QGIS_SERVER_LOG_LEVEL}
FcgidInitialEnv PGSERVICEFILE ${PGSERVICEFILE}
FcgidInitialEnv HOME /var/www
I tested here with build f22bb65d0010 :
kartoza/qgis-server 2.14.6 f22bb65d0010 8 days ago 881.2 MB
Using the test project in test dir, everything works fine for me. Can you confirm if you have the same build? I'm going to test with a more complex project to see if that works ok...
Hi @othke I quickly set up with a more complex project and it works fine for me too.
Hi @timlinux, you are right it works fine. Thanks :+1:
With this config (PassEnv QGIS_PROJECT_FILE) you define a single service ?
Do you confirm, that if I want to add severals map service, I need to unset this environment variable, add a Directory directive in the apache config, pointing a project folder with QGIS files inside. And then call the service with this syntax:
http://localhost/cgi-bin/qgis_mapserv.fcgi?REQUEST=GetMap&MAP=/projects/mymap.qgs&
Thanks for the docker image
Hi @othke
With this config (PassEnv QGIS_PROJECT_FILE) you define a single service ?
This defines the default used for the map=
parameter for your WMS requests.
Do you confirm, that if I want to add severals map service, I need to unset this environment variable, add a Directory directive in the apache config, pointing a project folder with QGIS files inside. And then call the service with this syntax: http://localhost/cgi-bin/qgis_mapserv.fcgi?REQUEST=GetMap&MAP=/projects/mymap.qgs&
You should be able to use both systems at the same time. I tested to verify this with default, explicit default and different map files all from the same docker instance here:
http://localhost:8380
http://localhost:8380/?map=/projects/project.qgs
http://localhost:8380/?map=/projects/maumere.qgs
All of the above work for me. Note that it is not necessary to include the cgi-bin/qgis_mapserv.fcgi part of the url since it is provided by the script alias. I am going to close out this issue for now thanks!
Hi, here with @tudorbarascu trying to run the image, but running:
http://localhost:8081/cgi-bin/qgis_mapserv.fcgi?
Shows: the requested URL /cgi-bin/qgis_mapserv.fcgi was not found on this server.
We found the qgis_mapserv.fcgi in /usr/bin cannot find configs pointing to that.
Any hints