Skip to content
Snippets Groups Projects
Commit 5cda22dd authored by Fabien  MAREUIL's avatar Fabien MAREUIL
Browse files

fix url resolution filefield for API

parent 5eca96e4
No related branches found
No related tags found
1 merge request!29Prepare for v1.1.0
Pipeline #47113 passed
...@@ -99,7 +99,7 @@ deploy-webserver-targetcentric: ...@@ -99,7 +99,7 @@ deploy-webserver-targetcentric:
- cd ansible - cd ansible
- whoami - whoami
- ansible-playbook -vvv -i ./hosts_master deploy.yaml - ansible-playbook -vvv -i ./hosts_master deploy.yaml
--extra-vars "deploy_user_name=ippidb repo_api_token=JZS-4cH7bWkFkHa2rAVf marvinjs_apikey=$MARVINJS_APIKEY_targetcentric galaxy_base_url=$GALAXY_BASE_URL_targetcentric galaxy_apikey=$GALAXY_APIKEY_targetcentric galaxy_compoundproperties_workflowid=$GALAXY_COMPOUNDPROPERTIES_WORKFLOWID_targetcentric secret_key=$SECRET_KEY_targetcentric dbname=$DBNAME_targetcentric dbuser=$DBUSER_targetcentric dbpassword=$DBPASSWORD_targetcentric dbhost=$DBHOST_targetcentric dbport=$DBPORT_targetcentric http_port=$HTTP_PORT_targetcentric branch=$CI_COMMIT_REF_NAME gacode=$GACODE_targetcentric" --extra-vars "deploy_user_name=ippidb repo_api_token=JZS-4cH7bWkFkHa2rAVf marvinjs_apikey=$MARVINJS_APIKEY_targetcentric galaxy_base_url=$GALAXY_BASE_URL_targetcentric galaxy_apikey=$GALAXY_APIKEY_targetcentric galaxy_compoundproperties_workflowid=$GALAXY_COMPOUNDPROPERTIES_WORKFLOWID_targetcentric secret_key=$SECRET_KEY_targetcentric dbname=$DBNAME_targetcentric dbuser=$DBUSER_targetcentric dbpassword=$DBPASSWORD_targetcentric dbhost=$DBHOST_targetcentric dbport=$DBPORT_targetcentric http_port=$HTTP_PORT_targetcentric branch=$CI_COMMIT_REF_NAME gacode=$GACODE_targetcentric ippidb_media=$IPPIDB_MEDIA_targetcentric"
only: only:
- targetcentric - targetcentric
...@@ -122,7 +122,7 @@ deploy-webserver-test: ...@@ -122,7 +122,7 @@ deploy-webserver-test:
- cd ansible - cd ansible
- whoami - whoami
- ansible-playbook -vvv -i ./hosts_master deploy.yaml - ansible-playbook -vvv -i ./hosts_master deploy.yaml
--extra-vars "deploy_user_name=ippidb repo_api_token=JZS-4cH7bWkFkHa2rAVf marvinjs_apikey=$MARVINJS_APIKEY_master galaxy_base_url=$GALAXY_BASE_URL_master galaxy_apikey=$GALAXY_APIKEY_master galaxy_compoundproperties_workflowid=$GALAXY_COMPOUNDPROPERTIES_WORKFLOWID_master secret_key=$SECRET_KEY_master dbname=$DBNAME_master dbuser=$DBUSER_master dbpassword=$DBPASSWORD_master dbhost=$DBHOST_master dbport=$DBPORT_master http_port=$HTTP_PORT_master branch=$CI_COMMIT_REF_NAME gacode=$GACODE_master" --extra-vars "deploy_user_name=ippidb repo_api_token=JZS-4cH7bWkFkHa2rAVf marvinjs_apikey=$MARVINJS_APIKEY_master galaxy_base_url=$GALAXY_BASE_URL_master galaxy_apikey=$GALAXY_APIKEY_master galaxy_compoundproperties_workflowid=$GALAXY_COMPOUNDPROPERTIES_WORKFLOWID_master secret_key=$SECRET_KEY_master dbname=$DBNAME_master dbuser=$DBUSER_master dbpassword=$DBPASSWORD_master dbhost=$DBHOST_master dbport=$DBPORT_master http_port=$HTTP_PORT_master branch=$CI_COMMIT_REF_NAME gacode=$GACODE_master ippidb_media=$IPPIDB_MEDIA_master"
only: only:
- master - master
...@@ -145,6 +145,6 @@ deploy-webserver-production: ...@@ -145,6 +145,6 @@ deploy-webserver-production:
- cd ansible - cd ansible
- whoami - whoami
- ansible-playbook -vvv -i ./hosts_release deploy.yaml - ansible-playbook -vvv -i ./hosts_release deploy.yaml
--extra-vars "deploy_user_name=ippidb repo_api_token=JZS-4cH7bWkFkHa2rAVf marvinjs_apikey=$MARVINJS_APIKEY_release galaxy_base_url=$GALAXY_BASE_URL_release galaxy_apikey=$GALAXY_APIKEY_release galaxy_compoundproperties_workflowid=$GALAXY_COMPOUNDPROPERTIES_WORKFLOWID_release secret_key=$SECRET_KEY_release dbname=$DBNAME_release dbuser=$DBUSER_release dbpassword=$DBPASSWORD_release dbhost=$DBHOST_release dbport=$DBPORT_release http_port=$HTTP_PORT_release branch=$CI_COMMIT_REF_NAME gacode=$GACODE_release" --extra-vars "deploy_user_name=ippidb repo_api_token=JZS-4cH7bWkFkHa2rAVf marvinjs_apikey=$MARVINJS_APIKEY_release galaxy_base_url=$GALAXY_BASE_URL_release galaxy_apikey=$GALAXY_APIKEY_release galaxy_compoundproperties_workflowid=$GALAXY_COMPOUNDPROPERTIES_WORKFLOWID_release secret_key=$SECRET_KEY_release dbname=$DBNAME_release dbuser=$DBUSER_release dbpassword=$DBPASSWORD_release dbhost=$DBHOST_release dbport=$DBPORT_release http_port=$HTTP_PORT_release branch=$CI_COMMIT_REF_NAME gacode=$GACODE_release ippidb_media=$IPPIDB_MEDIA_release"
only: only:
- release - release
...@@ -231,6 +231,12 @@ ...@@ -231,6 +231,12 @@
GA_CODE = "{{ gacode }}" GA_CODE = "{{ gacode }}"
marker: "# {mark} ANSIBLE MANAGED GOOGLE ANALYTICS ID" marker: "# {mark} ANSIBLE MANAGED GOOGLE ANALYTICS ID"
when: gacode is defined when: gacode is defined
- name: Add media_url setting to iPPI-DB settings
blockinfile:
path: "{{ checkout_path }}/ippisite/ippisite/{{ ansible_hostname }}_settings.py"
block: |
MEDIA_URL = "{{ ippidb_media }}"
marker: "# {mark} ANSIBLE MEDIA_URL SETTINGS"
- name: Add email/debug settings to iPPI-DB settings - name: Add email/debug settings to iPPI-DB settings
blockinfile: blockinfile:
path: "{{ checkout_path }}/ippisite/ippisite/{{ ansible_hostname }}_settings.py" path: "{{ checkout_path }}/ippisite/ippisite/{{ ansible_hostname }}_settings.py"
......
...@@ -178,7 +178,7 @@ LOGIN_REDIRECT_URL = "/" ...@@ -178,7 +178,7 @@ LOGIN_REDIRECT_URL = "/"
LOGOUT_REDIRECT_URL = "/" LOGOUT_REDIRECT_URL = "/"
MEDIA_URL = "/media/" MEDIA_URL = "/media/"
MEDIA_ROOT = BASE_DIR + MEDIA_URL MEDIA_ROOT = BASE_DIR + "/media/"
################################################################################ ################################################################################
# fingerprints used to compute Drugbank similarity using openbabel # fingerprints used to compute Drugbank similarity using openbabel
......
...@@ -165,8 +165,9 @@ LOGIN_REDIRECT_URL = "/" ...@@ -165,8 +165,9 @@ LOGIN_REDIRECT_URL = "/"
LOGOUT_REDIRECT_URL = "/" LOGOUT_REDIRECT_URL = "/"
# WARNING MEDIA_URL is surcharged by CI during deployment with ci variable IPPIDB_ROOT
MEDIA_URL = "/media/" MEDIA_URL = "/media/"
MEDIA_ROOT = BASE_DIR + MEDIA_URL MEDIA_ROOT = BASE_DIR + "/media/"
################################################################################ ################################################################################
# fingerprints used to compute Drugbank similarity using openbabel # fingerprints used to compute Drugbank similarity using openbabel
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment