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


Ignore:
Timestamp:
01/26/17 19:59:25 (7 years ago)
Author:
saj.issa
Comment:

--

Legend:

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

    v3 v4  
    2525    {{{/local/docker/<USER>/}}}
    2626
    27 Step 2. Go to this directory and checkout from git docker_civicrm_upgrade
     27Step 2. Go to this directory and checkout from git docker_civicrm_fresh
    2828
    29     {{{sudo git clone https://github.com/LCBRU/docker_civicrm_upgrade.git}}}
     29    {{{sudo git clone https://github.com/LCBRU/docker_civicrm_fresh.git}}}
    3030
    31     {{{sudo chmod -R 777 docker_civicrm_upgrade/}}}
     31    {{{sudo chmod -R 777 docker_civicrm_fresh/}}}
    3232
    33 This will create a directory /local/docker/<USER>/docker_civicrm_upgrade
     33This will create a directory /local/docker/<USER>/docker_civicrm_fresh
    3434
    35 This docker script upgrades an existing CiviCRM installation.
     35This docker script install a fresh CiviCRM installation.
    3636
    37 Step 3. The main configuration file is Dockerfile
     37Step 3. The main configuration file is  in the location civicrm-install/procedures/bin/install-config.sh
    3838
    39 Modify 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 
    55 Note the database config are in the live and test folders.
    56 
    57 Modify as necessary the files :
    58 
    59     {{{civicrm.settings.php}}}
    60 
    61     {{{settings.php}}}
     39Add CiviCRM version and database connections to CiviCRM and Drupal database, ensure you have created blank databases first.
    6240
    6341Step 4. Build Docker container
    6442
    65     {{{sudo docker build -t lcbruit/civicrm:v4.7.15 .}}}
     43    {{{sudo docker build -t lcbruit/civicrm_fresh:v4.7.15 .}}}
    6644
    67     {{{sudo docker build --no-cache=true -t lcbruit/civicrm:v4.7.15 .}}}
     45    {{{sudo docker build --no-cache=true -t lcbruit/civicrm_fresh:v4.7.15 .}}}
    6846
    69 Ensure that the **version number** matches the actual CiviCRM version you are upgrading to.
     47Ensure that the **version number** matches the actual CiviCRM version you are installing.
    7048
    7149Run container
    7250
    73    {{{sudo docker run -v /share:/share -itd -p 80:80 lcbruit/civicrm:v4.7.15}}}
     51   {{{sudo docker run -v /share:/share -itd -p 80:80 lcbruit/civicrm_fresh:v4.7.15}}}
    7452
    7553To connect to container :
     
    7856   {{{sudo docker exec -i -t [CONTAINER ID] /bin/bash}}}
    7957
    80 Step 5. Upgrade Drupal and CiviCRM
     58Step 5. Install Drupal and CiviCRM
    8159
    82 To upgrade Drupal point your browser to :
     60To install Drupal point your browser to :
    8361
    84    {{{http://XXXXXXXXXXXXXX.xuhl-tr.nhs.uk/update.php?op=info}}}
     62   {{{http://XXXXXXXXXXXXXX.xuhl-tr.nhs.uk/civicrm/install.php?profile=standard&locale=en&op=start&id=1}}}
    8563
    86 To upgrade CiviCRM point your browser to :
     64To install CiviCRM point your browser to :
    8765
    88    {{{http://XXXXXXXXXXXXXX.xuhl-tr.nhs.uk/civicrm/upgrade?reset=1}}}
    89  
    90 Go to Drupal -> Modules and enable the module 'Module Missing Message Fixer'
     66   {{{http://XXXXXXXXXXXXXX.xuhl-tr.nhs.uk/civicrm/sites/all/modules/civicrm/install/index.php}}}
    9167
    92 Go to Drupal -> Configuration -> Missing Module Message Fixer to remove any missing modules.
    93 
    94 Go to the url : 
    95 
    96    {{{http://XXXXXXXXXXXXXX.xuhl-tr.nhs.uk/civicrm/admin/setting/path?reset=1}}}
    97 
    98 ensure 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 
    112 Go to the url :
    113 
    114    {{{http://XXXXXXXXXXXXXX.xuhl-tr.nhs.uk/civicrm/admin/setting/url?reset=1}}}
    115 
    116 ensure 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  
    124 Go to the url :
    125 
    126    {{{http://XXXXXXXXXXXXXX.xuhl-tr.nhs.uk/civicrm/admin/setting/misc?reset=1}}} 
    127 
    128 ensure that the following are set to :
    129 
    130    {{{Path to wkhtmltopdf executable = /usr/local/bin/wkhtmltopdf}}}
    131 
    132 Go to the url :
    133 
    134    {{{http://uhlbriccsapp07.xuhl-tr.nhs.uk/civicrm/admin/extensions?reset=1}}} 
    135 
    136 Remove any extensions not required.
    137 
    138 Stop the container :
    139 
    140    {{{sudo docker ps -a}}}
    141    {{{sudo docker stop [CONTAINER ID] }}}
    142 
    143 Step 6. Set location of theme directory.
    144 
    145 Connect to your drupal database and run the following
    146 
    147    {{{select * from variable where name = 'color_antonelli_files'; }}}
    148 
    149 This 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 
    153 Modify 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 
    165 Rebuild 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 
    171 Run container
    172 
    173    {{{sudo docker run -v /share:/share -itd -p 80:80 lcbruit/civicrm:v4.7.15}}}
    174 
    175 Step 7. Ensure you have set the container to start on reboot.
     68Step 6. Ensure you have set the container to start on reboot.
    17669
    17770[[Docker HowTo Auto Start Containers On Reboot]]