- Add provided .env file in root directory
You need Docker 1.12 or higher, get the latest stable official release for your platform. Once you have the project configured run the following command from the root folder of the project.
-
Run
docker compose
to startdocker compose build --no-cache docker compose up -d
Note: if the
docker compose up
command returns an error after the first build, then rundocker compose stop
anddocker compose up
again. -
Access the site on http://localhost/
Default credentials are:
- Geonode (../account/login/)
username: admin
password: admin
- Geoserver (.../geoserver/web)
username: admin
password: see GEOSERVER_ADMIN_PASSWORD value in .env
If the admin geoserver credentials are changed they need to be edited in the .env so that geonode can connect.
NOTE: In this example we are going to publish to the public IP http://123.456.789.111
vim .env
--> replace localhost with 123.456.789.111 everywhere
docker compose up --build -d
docker compose stop
SOURCE_URL=$SOURCE_URL TARGET_URL=$TARGET_URL ./geonode_demo/br/backup.sh $BKP_FOLDER_NAME
-
BKP_FOLDER_NAME: Default value = backup_restore Shared Backup Folder name. The scripts assume it is located on "root" e.g.: /$BKP_FOLDER_NAME/
-
SOURCE_URL: Source Server URL, the one generating the "backup" file.
-
TARGET_URL: Target Server URL, the one which must be synched.
e.g.:
docker exec -it django4geonode_demo sh -c 'SOURCE_URL=$SOURCE_URL TARGET_URL=$TARGET_URL ./geonode_demo/br/backup.sh $BKP_FOLDER_NAME'
SOURCE_URL=$SOURCE_URL TARGET_URL=$TARGET_URL ./geonode_demo/br/restore.sh $BKP_FOLDER_NAME
-
BKP_FOLDER_NAME: Default value = backup_restore Shared Backup Folder name. The scripts assume it is located on "root" e.g.: /$BKP_FOLDER_NAME/
-
SOURCE_URL: Source Server URL, the one generating the "backup" file.
-
TARGET_URL: Target Server URL, the one which must be synched.
e.g.:
docker exec -it django4geonode_demo sh -c 'SOURCE_URL=$SOURCE_URL TARGET_URL=$TARGET_URL ./geonode_demo/br/restore.sh $BKP_FOLDER_NAME'
In case you need to increase the PostgreSQL Max Connections , you can modify the POSTGRESQL_MAX_CONNECTIONS variable in .env file as below:
POSTGRESQL_MAX_CONNECTIONS=200
In this case PostgreSQL will run accepting 200 maximum connections.