Changes between Version 2 and Version 3 of CiviCRM HowTo Install Fresh Version Using Docker


Ignore:
Timestamp:
01/26/17 19:20:52 (8 years ago)
Author:
saj.issa
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CiviCRM HowTo Install Fresh Version Using Docker

    v2 v3  
    1919    {{{create database drupaltest_fresh_docker }}}
    2020
     21== Upgrade CiviCRM using Docker
     22
     23Step 1. On the host machine go to directory
     24
     25    {{{/local/docker/<USER>/}}}
     26
     27Step 2. Go to this directory and checkout from git docker_civicrm_upgrade
     28
     29    {{{sudo git clone https://github.com/LCBRU/docker_civicrm_upgrade.git}}}
     30
     31    {{{sudo chmod -R 777 docker_civicrm_upgrade/}}}
     32
     33This will create a directory /local/docker/<USER>/docker_civicrm_upgrade
     34
     35This docker script upgrades an existing CiviCRM installation.
     36
     37Step 3. The main configuration file is Dockerfile
     38
     39Modify the following lines in Dockerfile :
     40
     41    {{{ENV DRUPALVERSION 7.53}}}
     42
     43    {{{ENV CIVICRMVERSION 4.7.15}}}
     44
     45    {{{#####################}}}
     46
     47    {{{# select only one}}}
     48
     49    {{{ENV ENVIRONMENT test }}}
     50
     51    {{{#ENV ENVIRONMENT live}}}
     52
     53    {{{#####################}}}
     54
     55Note the database config are in the live and test folders.
     56
     57Modify as necessary the files :
     58
     59    {{{civicrm.settings.php}}}
     60
     61    {{{settings.php}}}
     62
     63Step 4. Build Docker container
     64
     65    {{{sudo docker build -t lcbruit/civicrm:v4.7.15 .}}}
     66
     67    {{{sudo docker build --no-cache=true -t lcbruit/civicrm:v4.7.15 .}}}
     68
     69Ensure that the **version number** matches the actual CiviCRM version you are upgrading to.
     70
     71Run container
     72
     73   {{{sudo docker run -v /share:/share -itd -p 80:80 lcbruit/civicrm:v4.7.15}}}
     74
     75To connect to container :
     76
     77   {{{sudo docker ps -a}}}
     78   {{{sudo docker exec -i -t [CONTAINER ID] /bin/bash}}}
     79
     80Step 5. Upgrade Drupal and CiviCRM
     81
     82To upgrade Drupal point your browser to :
     83
     84   {{{http://XXXXXXXXXXXXXX.xuhl-tr.nhs.uk/update.php?op=info}}}
     85
     86To upgrade CiviCRM point your browser to :
     87
     88   {{{http://XXXXXXXXXXXXXX.xuhl-tr.nhs.uk/civicrm/upgrade?reset=1}}}
     89 
     90Go to Drupal -> Modules and enable the module 'Module Missing Message Fixer'
     91
     92Go to Drupal -> Configuration -> Missing Module Message Fixer to remove any missing modules.
     93
     94Go to the url : 
     95
     96   {{{http://XXXXXXXXXXXXXX.xuhl-tr.nhs.uk/civicrm/admin/setting/path?reset=1}}}
     97
     98ensure that the following are set to :
     99
     100   {{{Temporary Files Directory = /var/local/civicrm/drupal/sites/default/files/civicrm/upload/}}}
     101
     102   {{{Image Directory = /var/local/civicrm/drupal/sites/default/files/civicrm/persist/contribute/}}}
     103
     104   {{{Custom Files Directory = /var/local/civicrm/drupal/sites/default/files/civicrm/custom/}}}
     105
     106   {{{Custom Template Directory = /var/local/civicrm/drupal/sites/all/lcbru_custom/civicrm_templates/}}}
     107
     108   {{{Custom PHP Directory = /var/local/civicrm/drupal/sites/all/lcbru_custom/civicrm_php/}}}
     109
     110   {{{Extensions Directory = /var/local/civicrm/drupal/sites/all/lcbru_custom/civicrm_extensions/}}}
     111
     112Go to the url :
     113
     114   {{{http://XXXXXXXXXXXXXX.xuhl-tr.nhs.uk/civicrm/admin/setting/url?reset=1}}}
     115
     116ensure that the following are set to :
     117
     118   {{{CiviCRM Resource URL = http://XXXXXXXXXXXXXX.xuhl-tr.nhs.uk/sites/all/modules/civicrm}}}
     119
     120   {{{Image Upload URL = http://XXXXXXXXXXXXXX.xuhl-tr.nhs.uk/sites/default/files/civicrm/persist/contribute/}}}
     121
     122   {{{Extension Resource URL = http://XXXXXXXXXXXXXX.xuhl-tr.nhs.uk/sites/all/civicrm_extensions}}}
     123 
     124Go to the url :
     125
     126   {{{http://XXXXXXXXXXXXXX.xuhl-tr.nhs.uk/civicrm/admin/setting/misc?reset=1}}} 
     127
     128ensure that the following are set to :
     129
     130   {{{Path to wkhtmltopdf executable = /usr/local/bin/wkhtmltopdf}}}
     131
     132Go to the url :
     133
     134   {{{http://uhlbriccsapp07.xuhl-tr.nhs.uk/civicrm/admin/extensions?reset=1}}} 
     135
     136Remove any extensions not required.
     137
     138Stop the container :
     139
     140   {{{sudo docker ps -a}}}
     141   {{{sudo docker stop [CONTAINER ID] }}}
     142
     143Step 6. Set location of theme directory.
     144
     145Connect to your drupal database and run the following
     146
     147   {{{select * from variable where name = 'color_antonelli_files'; }}}
     148
     149This give the following output 
     150
     151   {{{a:2:{i:0;s:42:"public://color/antonelli-d1bee6f5/logo.png";i:1;s:44:"public://color/antonelli-d1bee6f5/colors.css";} }}}
     152
     153Modify the Dockerfile as follows
     154
     155   {{{################### }}}
     156
     157   {{{#css location. first line is test, 2nd line is live }}}
     158
     159   {{{ENV CSS antonelli-d1bee6f5/ }}}
     160
     161   {{{#ENV CSS antonelli-75b84edd  }}}
     162
     163   {{{#################### }}}
     164
     165Rebuild you image :
     166
     167    {{{sudo docker build -t lcbruit/civicrm:v4.7.15 .}}}
     168
     169    {{{sudo docker build --no-cache=true -t lcbruit/civicrm:v4.7.15 .}}}
     170
     171Run container
     172
     173   {{{sudo docker run -v /share:/share -itd -p 80:80 lcbruit/civicrm:v4.7.15}}}
     174
     175Step 7. Ensure you have set the container to start on reboot.
     176
     177[[Docker HowTo Auto Start Containers On Reboot]]
     178