Changes between Version 40 and Version 41 of REDCap HowTo Install Using Docker


Ignore:
Timestamp:
08/05/17 09:14:46 (7 years ago)
Author:
Richard Bramley
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • REDCap HowTo Install Using Docker

    v40 v41  
    1391391. Download the Redcap upgrade from https://community.projectredcap.org/page/download.html
    140140
    141 2. Backup you database and create a new database with an incremental version number. Import to this new database and assign roles and privileges.
    142 
    143 3. Connect to your docker redcap container
     1412. Backup your database or copy the most recent database from {{{/var/MySqlBackerUpper/data/latest}}}.
     142
     1433. Amend the backup file to change the database name using the following command:
     144{{{
     145sed -i.bak 's/redcap{old_version}_briccs/redcap{new_version}_briccs/g' {copy of backup file}
     146}}}
     147
     1484. Create the database:
     149{{{
     150mysql < {copy of backup file}
     151}}}
     152
     1535. Grant redcap user permission to the new database:
     154{{{
     155GRANT SELECT ON redcap{version}.* TO  'redcap'@'%';
     156}}}
     157
     1586. Connect to your docker redcap container
    144159
    145160   {{{sudo docker exec -i -t <CONTAINERID> /bin/bash}}}
    146161
    147 4. Unzip the contents of redcap7.X.X_upgrade.zip into /var/www/site/redcap
    148 
    149 5. Change database.php with details of new database.
    150 
    151 6. Open URL
     1627. Unzip the contents of redcap7.X.X_upgrade.zip into /var/www/site/redcap
     163
     1648. Change database.php with details of new database.
     165
     1669. Open URL
    152167
    153168   {{{http://<HOST>.xuhl-tr.nhs.uk/redcap/redcap_v7.X.X/upgrade.php}}}
    154169
    155 7. This url will give you a sql script that you run against the database. Download the sql file and place it on the mysql host. Run as follows :
     17010. This url will give you a sql script that you run against the database. Download the sql file and place it on the mysql host. Run as follows :
    156171
    157172   {{{mysql -u root -p redcap6168 < redcap_upgrade_XXXXX.sql}}}
    158173
    159 8. Now modify lcbruit/redcap_fresh docker image. This is very important as it will replace you current docker image.
     17411. Now modify lcbruit/redcap_fresh docker image. This is very important as it will replace you current docker image.
    160175
    161176   Download the fresh install package from redcap and modify the Dockerfile in redcap_fresh to use it.
    162177
    163 9. Build and run the redcap_fresh container :
     17812. Build and run the redcap_fresh container :
    164179
    165180   {{{sudo docker build -t lcbruit/redcap_fresh:v6.16.6 .}}}
     
    167182   {{{sudo docker run -itd -p 80:80 lcbruit/redcap_fresh:v6.16.6}}} 
    168183
    169 10. Ensure you have set the container to start on reboot with the correct version number
     18413. Ensure you have set the container to start on reboot with the correct version number
    170185
    171186   [[Docker HowTo Auto Start Containers On Reboot]]