Page tree
Skip to end of metadata
Go to start of metadata

First of all, we will assume than you got the Core and/or IMS project, have installed an IDE and successfully imported the Core and/or IMS project.

 

One of the main interest of Docker is to have the same environment between developers and final users.

In order to do this and to avoid installation of a local machine, we must to have a Dockerized dev environment.

Before doing anything else, we will follow the two first points of an Automatic Installation with Docker (the points 3 and 4 will be used after the instructions of this page).

Then, choose which installation do you want : for Core & IMS development or for Core development only.

 

For Core development only.

As long as the database is not Dockerized, we must to get the private and public keys of the username 'ImageServer1' (in the sec_user table) in the database and fill these values in the file ims/deploy.sh.

 

Then, make the following changes :

  • In the nginx/deploy.sh file, replace $CORE_ALIAS by $(route -n | awk '/UG[ \t]/{print $2}').
  • In the DataSource.groovy file into the Core project, update the value username and password (development part) by "docker" and the url by "jdbc:postgresql://localhost:5432/docker".
  • In the Config.groovy file into the Core project, update the value grails.serverURL (development part) by "http://CORE_URL:8080".
  • In the Config.groovy file into the Core project, the grails.imageServerURL value must contains your IMS_URL (on port 80).
  • In the Config.groovy file into the Core project, change the storage_path by where you will store the images. Change also the storage_buffer.
  • In the Config.groovy file into the Core projectupdate the value grails.adminPassword by the default password of the admin user
  • In the Config.groovy file into the Core project, don't forget to fill the grails.notification variables

Don't forget to add the local URLs to your /etc/hosts.

At the end, in IntelliJ, edit the run configuration and change the Command Line by "-reloading -Dserver.port=8080 run-app -echoOut --stacktrace -nocoverage --verbose" before running the Core project

You can now run the script start_deploy.sh and use http://CORE_URL:8080 to test your dev environment.

For Core & IMS development.

As IMS will run on your machine, you will need all the dependencies of IMS : tiffinfo, identify, vips.

Run the following commands to get the related libs :


Then, in the Bootstrap folder, make the following changes :

  • In the nginx/deploy.sh file, replace $CORE_ALIAS by $(route -n | awk '/UG[ \t]/{print $2}') and all the $IMS_ALIAS by $(route -n | awk '/UG[ \t]/{print $2}'):9080.
  • In the file nginx.conf, in the upload instructions, replace IMS_ALIAS:8080 by IMS_ALIAS.

Don't forget to add the local URLs to your /etc/hosts.

 

The last modifications need to be done in your IDE.

In the Config.groovy file into the Core project, update the value grails.serverURL (development part) by "http://CORE_URL:8080".

In the Config.groovy file into the IMS project, as long as the database is not Dockerized, update the the cytomine.imageServerPrivateKey and cytomine.imageServerPublicKey values by the private and public keys of the username 'ImageServer1' (in the sec_user table) in the database.

In the DataSource.groovy file into the Core project, update the value username and password (development part) by "docker" and the url by "jdbc:postgresql://localhost:5432/docker".

In the Config.groovy file into the Core projectupdate the value grails.adminPassword by the default password of the admin user


At the end, in IntelliJ, edit the run configuration and change the Command Line by "-reloading -Dserver.port=9080 run-app -echoOut --stacktrace -nocoverage --verbose" before running the IMS project

You can now run the script start_dev.sh and use http://CORE_URL:8080 to test your dev environment.

  • No labels