Install instructions

Requirements

  • You need docker installed. Compose plugin is recommended in the configuration below.

    See Docker.

  • Optional : if you want to use external database, prepare a postgresql 11+ (15 recommended) postgis2.5 (3.3 recommended) database with postgis enabled, and a dedicated user.

    You can use external database by commenting postgres container and volume references in docker-compose.yml, and set variables in your conf/visu.env file :
    • POSTGRES_HOST

    • POSTGRES_PORT

    • POSTGRES_USER

    • POSTGRES_PASSWORD

    • POSTGRES_DB

Add local IPs in pg_hba.conf to allow connection from docker containers to your database.

  • You can use external nginx proxy. Edit provided nginx conf file and comment nginx references in docker-compose.yml. Fix web:8000 to 127.0.0.1:8000 in nginx.conf.

Install

  • Download zip package

  • Unzip it where you want

    unzip install.zip
    cd terra_visu
    
  • Prepare environment variables

    ./conf/visu.env
    

    -> Set or change all required values

at least:

  • ALLOWED_HOST # list of your final host(s), comma separated values

  • SECRET_KEY # unique key for your project. See https://djecrety.ir/

  • POSTGRES_USER # a dedicated user for your database

  • POSTGRES_PASSWORD # a dedicated password for your database

  • Pull images

    docker compose pull
    
  • Init database and project config

    docker compose run --rm web update.sh
    
  • Create your super user

    docker compose run --rm web ./manage.py createsuperuser
    
  • Load initial data

    docker compose run --rm web ./manage.py loaddata project/fixtures/initial.json
    
  • Launch stack

    docker compose up -d
    
  • … and access to TerraVisu

    http://<your_domain>/
    

You can change port mapping by using a .env file in terra_visu directory :

# .env
NGINX_PORT=8080

Update

  • Read release notes about bugfix, news and breaking changes.

  • Backup your data (database, public/media and var/ folder)

  • Pull latest image

    docker compose pull
    
  • Run post update script

    docker compose run --rm web update.sh
    
  • Relaunch your stack

    docker compose down
    docker compose up -d