[GeoNode-devel] Help
Pablo Masera
pablomasera83 at gmail.com
Fri Mar 23 16:28:23 PDT 2018
Dear folks,
We are building a spatial data infrastructure, based on geonode working on
a server we have rented. The problem is that, although we have been able to
correctly install the docker modules, from the official container, we can't
operate the main page of our project (the basic one of geonode), geoserver
or postgis, to enter remotely from the browser, pgadmin or qgis.
We are trying to have a fully functional Geonode instance and after
successfully installing *Docker* on a *Ubuntu 16.04 LTS (Xenial)* we
ran docker-compose
up --build with the following updated/modified *"docker-compose.yml"* file:
version: '2.1'
services:
db:
image: geonode/postgis:9.6
restart: unless-stopped
container_name: db4${COMPOSE_PROJECT_NAME}
stdin_open: true
# tty: true
labels:
org.geonode.component: db
org.geonode.instance.name: geonode
volumes:
- dbdata:/var/lib/postgresql/data
- dbbackups:/pg_backups
env_file:
- ./scripts/docker/env/production/db.env
elasticsearch:
image: elasticsearch
restart: unless-stopped
container_name: elasticsearch4${COMPOSE_PROJECT_NAME}
stdin_open: true
# tty: true
labels:
org.geonode.component: elasticsearch
org.geonode.instance.name: geonode
rabbitmq:
image: rabbitmq
restart: unless-stopped
container_name: rabbitmq4${COMPOSE_PROJECT_NAME}
stdin_open: true
# tty: true
labels:
org.geonode.component: rabbitmq
org.geonode.instance.name: geonode
django:
restart: unless-stopped
image: geonode/geonode:latest
container_name: django4${COMPOSE_PROJECT_NAME}
stdin_open: true
# tty: true
labels:
org.geonode.component: django
org.geonode.instance.name: geonode
depends_on:
- db
- elasticsearch
- rabbitmq
command: django-admin.py runserver 0.0.0.0:8000 --settings=geonode.settings
volumes:
- /var/run/docker.sock:/var/run/docker.sock
env_file:
- ./scripts/docker/env/production/django.env
celery:
restart: unless-stopped
image: geonode/geonode:latest
container_name: celery4${COMPOSE_PROJECT_NAME}
stdin_open: true
# tty: true
labels:
org.geonode.component: celery
org.geonode.instance.name: geonode
depends_on:
- db
- elasticsearch
- rabbitmq
command: celery worker --app=geonode.celery_app:app -B -l INFO
volumes:
- /var/run/docker.sock:/var/run/docker.sock
env_file:
- ./scripts/docker/env/production/celery.env
consumers:
image: geonode/geonode:latest
restart: unless-stopped
container_name: consumers4${COMPOSE_PROJECT_NAME}
stdin_open: true
# tty: true
labels:
org.geonode.component: consumers
org.geonode.instance.name: geonode
depends_on:
- rabbitmq
- db
- elasticsearch
command: python manage.py runmessaging
volumes:
- /var/run/docker.sock:/var/run/docker.sock
env_file:
- ./scripts/docker/env/production/django.env
geoserver:
image: geonode/geoserver:2.12.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:
- db
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- geoserver-data-dir:/geoserver_data/data
env_file:
- ./scripts/docker/env/production/geoserver.env
geonode:
image: geonode/nginx:geoserver
restart: unless-stopped
container_name: nginx4${COMPOSE_PROJECT_NAME}
stdin_open: true
# tty: true
labels:
org.geonode.component: nginx
org.geonode.instance.name: geonode
depends_on:
- django
- geoserver
ports:
- "8888:80"
expose:
- "80"
data-dir-conf:
image: geonode/geoserver_data:2.12.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
volumes:
geoserver-data-dir:
external: false
name: ${COMPOSE_PROJECT_NAME}-gsdatadir
dbdata:
external: false
name: ${COMPOSE_PROJECT_NAME}-dbdata
dbbackups:
external: false
name: ${COMPOSE_PROJECT_NAME}-dbbackups
After a couple of test runs we have not been able to connect to *postgis*,
neither to the *geoserver* admin page on
<server-ip-address>:8888/geoserver/web nor the default *geonode* main page.
1st Run
docker ps
docker exec -it db4geonode bash
psql -h <server-ip-address> -p 5432 -U postgres
2nd Run
cd ./home/geonode/
docker-compose down
docker-compose up
docker ps
docker exec -it db4geonode bash
psql -h <server-ip-address> -p 5432 -U postgres
3rd Run
cd ./home/geonode/
docker-compose down
docker-compose up
docker ps
docker exec -it db4geonode bash
su postgres
psql
CREATE DATABASE first_test_db;
psql -h <server-ip-address> -p 5432 -U postgres
\l
we made the changes on the .env files suggested by Francesco Bartoli
This is our docker ps:
docker ps
CONTAINER ID IMAGE COMMAND
CREATED STATUS PORTS
NAMES
186dc28b244b geonode/nginx:geoserver "nginx -g 'daemon of…"
39 minutes ago Up 39 minutes 0.0.0.0:8888->80/tcp
nginx4geonode
8860c7ac99ab geonode/geonode:latest "/usr/src/app/entryp…"
39 minutes ago Up 39 minutes 8000/tcp
celery4geonode
27680b9757e3 geonode/geonode:latest "/usr/src/app/entryp…"
39 minutes ago Up 39 minutes 8000/tcp
django4geonode
a282f2cb3896 geonode/geonode:latest "/usr/src/app/entryp…"
39 minutes ago Up 39 minutes 8000/tcp
consumers4geonode
6eacf6568689 geonode/geoserver:2.12.x "/usr/local/tomcat/t…"
39 minutes ago Up 39 minutes 8080/tcp
geoserver4geonode
8e7fbf748088 geonode/postgis:9.6 "docker-entrypoint.s…"
39 minutes ago Up 39 minutes 5432/tcp
db4geonode
94bad42ba148 rabbitmq "docker-entrypoint.s…"
39 minutes ago Up 39 minutes 4369/tcp, 5671-5672/tcp,
25672/tcp rabbitmq4geonode
351485c47fef elasticsearch "/docker-entrypoint.…"
39 minutes ago Up 39 minutes 9200/tcp, 9300/tcp
elasticsearch4geonode
All containers are running ok
Our .env files are this:
Celery.env
GEONODE_INSTANCE_NAME=geonode
GEONODE_LB_HOST_IP=190.111.252.249
GEONODE_LB_PORT=80
DATABASE_URL=postgres://postgres:postgres@db:5432/postgres
DEFAULT_BACKEND_DATASTORE=datastore
GEONODE_DATABASE=geonode
GEONODE_DATABASE_PASSWORD=geonode
GEONODE_GEODATABASE=geonode_data
GEONODE_GEODATABASE_PASSWORD=geonode_data
BROKER_URL=amqp://guest:guest@rabbitmq:5672/
DJANGO_SETTINGS_MODULE=geonode.settings
ALLOWED_HOSTS=['django',]
DOCKER_ENV=production
CELERY_CMD=celery worker --app=geonode.celery:app
--broker=amqp://guest:guest@rabbitmq:5672/ -B -l INFO
IS_CELERY=true
C_FORCE_ROOT=1
GEOSERVER_PUBLIC_LOCATION=http://geonode/geoserver/
GEOSERVER_LOCATION=http://geonode/geoserver/
SITEURL=http://geonode/
django.env
GEONODE_INSTANCE_NAME=geonode
GEONODE_LB_HOST_IP=190.111.252.249
GEONODE_LB_PORT=80
DATABASE_URL=postgres://postgres:postgres@db:5432/postgres
DEFAULT_BACKEND_DATASTORE=datastore
GEONODE_DATABASE=geonode
GEONODE_DATABASE_PASSWORD=geonode
GEONODE_GEODATABASE=geonode_data
GEONODE_GEODATABASE_PASSWORD=geonode_data
BROKER_URL=amqp://guest:guest@rabbitmq:5672/
DJANGO_SETTINGS_MODULE=geonode.settings
ALLOWED_HOSTS=['django',]
DOCKER_ENV=production
UWSGI_CMD=uwsgi --ini /usr/src/app/uwsgi.ini
IS_CELERY=false
C_FORCE_ROOT=1
GEOSERVER_PUBLIC_LOCATION=http://geonode/geoserver/
GEOSERVER_LOCATION=http://geonode/geoserver/
SITEURL=http://geonode/
And geoserver.env
DOCKERHOST
GEONODE_LB_HOST_IP=190.111.252.249
GEONODE_LB_PORT=80
PUBLIC_PORT=80
DOCKER_HOST_IP=172.17.0.1
Don´t know what we are doing wrong. Firewall is not the problem, it seems,
cause we disable it...
We would appreciate all the possible help that you might be able to provide
us with.
--
*Pablo Masera*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-devel/attachments/20180323/04358f1f/attachment-0001.html>
More information about the geonode-devel
mailing list