Dépôt pour le projet RapOnMap.
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Julie Lenaerts 30819f8d46 FEATURE [update data] add update walstat button in admin 2 days ago
QGis DX [qgis] update qgis project 2 weeks ago
rapOnMap FEATURE [update data] add update walstat button in admin 2 days ago
rom-doc-obsidian DX [docs] obsidian docs 2 weeks ago
.gitignore FEATURE [gitignore] Add gitignore file 3 months ago
README.md FIX [readme] update the commands in the readme file 2 days ago
setup.py FEATURE [setup] file added to allow installation of django app for this submodule 3 months ago

README.md

RapOnMap

Dépôt pour le projet RapOnMap.

Creation Log

  1. Create RapOnMap app in docker-cartostation folder: >$ docker-compose exec --user 1000 app bash ># django-admin startapp rapOnMap This has created a new app 'rapOnMap' on ./app/src/carto-station/sdi/

  2. Move it to our repo The generated 'rapOnMap' folder was moved to the 'RapOnMap' repository on Gitea.

  3. Add rapOnMap app to docker-cartostation

  • update gitmodules
    [submodule "app/src/carto-station/sdi/rapOnMap"]
    	path = app/src/carto-station/sdi/rapOnMap
    	url = git@gitea.champs-libres.be:LenaertsJ/RapOnMap.git
    
  • add app on settings.py.dist INSTALLED_APPS.append('rapOnMap')

Install, build and init

0. Cleanup

Clean docker containers and images:

docker ps -a gives you a list of all your docker containers. You could delete the ones related to cartostation docker rm {container-id}

docker images -a gives you a list of all the docker images you have. Then you can delete the ones related to cartostation by doing docker rmi {image-id}

1. Clone project and install

  • Clone project and go to Rap-on-Map branch

    • git clone git@gitlab.com:champs-libres/docker-cartostation.git
    • cd docker-cartostation
    • git checkout rap_on_map
  • Load git submodules

    • git submodule init
    • git submodule update
  • Checkout to right branches

    • cd app/src/carto-station
    • git checkout rap_on_map
    • cd ../cs-rom
    • git checkout main
    • cd ../rapOnMap
    • git checkout main
    • cd ../../../
  • Build

    • docker-compose up

      • check if PgAdmin works and all gis tables are loaded

        • ⚠️ STILL MISSING:
          • sncb_lignes (should load from QGis directly)
          • Ravels
          • Concentration Habitants
      • docker-compose -f docker-compose.yaml -f docker-compose.dev.yaml exec --user root app pip install -e ../../postgis-loader

      • docker-compose -f docker-compose.yaml -f docker-compose.dev.yaml exec --user root app pip install -e ../../rapOnMap

      • If you are going to use object storage to save images:

        • docker-compose -f docker-compose.yaml -f docker-compose.dev.yaml exec --user root app pip install django-storage-swift
      • docker-compose -f docker-compose.yaml -f docker-compose.dev.yaml exec --user root app bash python3 manage.py migrate

      • docker-compose -f docker-compose.yaml -f docker-compose.dev.yaml exec --user root app bash python3 manage.py createsuperuser

      • ⚠️ Shall we create another user to use for Point of Contact ?

        • remember the name of this user to pass as argument to 'init_project_data_from_settings' command
    • stop docker-compose

    • docker-compose up

      • try access admin panel
    • build clients:

      • docker-compose -f docker-compose.yaml -f docker-compose.dev.yaml run --rm app-clients npm i
      • docker-compose -f docker-compose.yaml -f docker-compose.dev.yaml run --rm app-clients ./build.sh login dashboard view compose alias embed metadata
    • stop docker-compose

2. Initialize RapOnMap environment and data

cf management/commands/README.md for commands descriptions.

  • docker-compose up
    • docker-compose -f docker-compose.yaml -f docker-compose.dev.yaml exec --user root app bash python3 manage.py init_walstat_parameters
    • docker-compose -f docker-compose.yaml -f docker-compose.dev.yaml exec --user root app bash python3 manage.py fetch_walstat_data
    • docker-compose -f docker-compose.yaml -f docker-compose.dev.yaml exec --user root app bash python3 manage.py init_rom_data_views
    • docker-compose -f docker-compose.yaml -f docker-compose.dev.yaml exec --user root app bash python3 manage.py init_project_data_from_settings <adminUserName>