Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add docker-compose scripts
  • Loading branch information
pblottiere authored and nyalldawson committed Sep 10, 2020
1 parent f9c0cda commit a806023
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 1 deletion.
27 changes: 27 additions & 0 deletions .ci/ogc/docker-compose.yml
@@ -0,0 +1,27 @@
version: '3'
services:

nginx:
image: nginx:1.13
container_name: qgis_server_nginx
ports:
- 8089:80
networks:
- qgis
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- qgis-server

qgis-server:
image: qgis_server_deps
container_name: qgis_server_deps
volumes:
- ./../../:/usr/src/qgis/
networks:
- qgis
privileged: true

networks:
qgis:
driver: bridge
31 changes: 31 additions & 0 deletions .ci/ogc/nginx.conf
@@ -0,0 +1,31 @@
server {
listen 80 default_server;
listen [::]:80 default_server;

root /var/www/html;

# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;

server_name _;

location / {
try_files $uri $uri/ =404;
}

location /qgisserver {
fastcgi_pass qgis-server:5555;
add_header Access-Control-Allow-Origin *;
add_header 'Access-Control-Allow-Headers' 'Authorization,Content-Type,Accept,Origin,X-Requested-With';
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param HTTPS $https if_not_empty;
fastcgi_param SERVER_PORT 80;
fastcgi_param SERVER_NAME $server_addr;
}
}
2 changes: 1 addition & 1 deletion .ci/ogc/qgis_mapserv.sh
Expand Up @@ -4,4 +4,4 @@ export QGIS_SERVER_LOG_FILE=/var/log/qgisserver.log
export QGIS_SERVER_LOG_LEVEL=0
export QGIS_PREFIX_PATH=/usr/local/

exec /usr/bin/spawn-fcgi -n -p 5555 /usr/local/bin/qgis_mapserv.fcgi
exec /usr/bin/spawn-fcgi -n -p 5555 /usr/src/qgis/build/output/bin/qgis_mapserv.fcgi

0 comments on commit a806023

Please sign in to comment.