-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Test GeoServer Integration Tests running with Docker Compose
- Loading branch information
afabiani
committed
May 14, 2018
1 parent
02fbe20
commit bbaef20
Showing
6 changed files
with
224 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
version: '2.2' | ||
services: | ||
|
||
data-dir-conf: | ||
image: geonode/geoserver_data:2.13.x | ||
restart: on-failure | ||
container_name: gsconf4${COMPOSE_PROJECT_NAME} | ||
labels: | ||
org.geonode.component: conf | ||
org.geonode.instance.name: geonode | ||
command: /bin/true | ||
volumes: | ||
- geoserver-data-dir:/geoserver_data/data | ||
|
||
geoserver: | ||
image: geonode/geoserver:2.13.x | ||
restart: unless-stopped | ||
container_name: geoserver4${COMPOSE_PROJECT_NAME} | ||
stdin_open: true | ||
# tty: true | ||
labels: | ||
org.geonode.component: geoserver | ||
org.geonode.instance.name: geonode | ||
depends_on: | ||
- data-dir-conf | ||
volumes: | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
- geoserver-data-dir:/geoserver_data/data | ||
env_file: | ||
- ./scripts/docker/env/production/geoserver.env | ||
ports: | ||
- "${GEOSERVER_SERVER_PORT}:8080" | ||
network_mode: "bridge" | ||
|
||
volumes: | ||
geoserver-data-dir: | ||
name: ${COMPOSE_PROJECT_NAME}-gsdatadir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -x | ||
|
||
if [ "$BACKEND" = "geonode.geoserver" ]; then | ||
|
||
case $1 in | ||
"before_install") | ||
echo "Before install scripts" | ||
ifconfig | ||
pip install docker-compose==$DOCKER_COMPOSE_VERSION | ||
scripts/misc/docker_check.sh | ||
;; | ||
"before_script") | ||
echo "Setting up GeoServer Server Backend" | ||
echo "Start GeoServer Server docker container" | ||
export GEONODE_PROJECT_PATH=$TRAVIS_BUILD_DIR | ||
docker-compose -f docker-compose-geoserver-server.yml up -d geoserver | ||
sleep 30 | ||
docker ps | ||
docker inspect geoserver4geonode | ||
echo "Test connection to GeoServer Server" | ||
wget -qO- $GEOSERVER_SERVER_URL | ||
wget -qO- ${GEOSERVER_SERVER_URL}ows?service=wms&version=1.3.0&request=GetCapabilities | ||
;; | ||
"after_script") | ||
echo "Shutdown GeoServer Server docker container" | ||
docker-compose -f docker-compose-geoserver-server.yml down | ||
;; | ||
esac | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
user nginx; | ||
worker_processes 1; | ||
|
||
error_log /tmp/error.log; | ||
pid /tmp/nginx.pid; | ||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
|
||
http { | ||
client_body_temp_path /tmp/nginx_client_body; | ||
fastcgi_temp_path /tmp/nginx_fastcgi_temp; | ||
proxy_temp_path /tmp/nginx_proxy_temp; | ||
scgi_temp_path /tmp/nginx_scgi_temp; | ||
uwsgi_temp_path /tmp/nginx_uwsgi_temp; | ||
|
||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
|
||
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | ||
'$status $body_bytes_sent "$http_referer" ' | ||
'"$http_user_agent" "$http_x_forwarded_for"'; | ||
|
||
access_log /tmp/access.log main; | ||
|
||
sendfile on; | ||
#tcp_nopush on; | ||
|
||
keepalive_timeout 65; | ||
|
||
#gzip on; | ||
|
||
server{ | ||
listen 80; | ||
index index.html index.htm; | ||
root /usr/share/nginx/html; | ||
|
||
location /{ | ||
proxy_pass http://geonode:8000; | ||
|
||
if ($request_method = OPTIONS) { | ||
add_header Access-Control-Allow-Methods "GET, POST, PUT, PATCH, OPTIONS"; | ||
add_header Access-Control-Allow-Headers "Authorization, Content-Type, Accept"; | ||
add_header Access-Control-Allow-Credentials true; | ||
add_header Content-Length 0; | ||
add_header Content-Type text/plain; | ||
add_header Access-Control-Max-Age 1728000; | ||
return 200; | ||
} | ||
|
||
client_max_body_size 15M; | ||
client_body_buffer_size 128K; | ||
add_header Access-Control-Allow-Credentials false; | ||
add_header Access-Control-Allow-Headers "Content-Type, Accept, Authorization, Origin, User-Agent"; | ||
add_header Access-Control-Allow-Methods "GET, POST, PUT, PATCH, OPTIONS"; | ||
proxy_set_header X-Forwarded-Protocol $scheme; | ||
proxy_read_timeout 30; | ||
proxy_redirect off; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Host $server_name; | ||
|
||
error_log /tmp/error.log; | ||
access_log /tmp/access.log; | ||
} | ||
} | ||
|
||
#include /etc/nginx/conf.d/*.conf; | ||
} |