Changes between Version 40 and Version 41 of REDCap HowTo Install Using Docker
- Timestamp:
- 08/05/17 09:14:46 (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
REDCap HowTo Install Using Docker
v40 v41 139 139 1. Download the Redcap upgrade from https://community.projectredcap.org/page/download.html 140 140 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 141 2. Backup your database or copy the most recent database from {{{/var/MySqlBackerUpper/data/latest}}}. 142 143 3. Amend the backup file to change the database name using the following command: 144 {{{ 145 sed -i.bak 's/redcap{old_version}_briccs/redcap{new_version}_briccs/g' {copy of backup file} 146 }}} 147 148 4. Create the database: 149 {{{ 150 mysql < {copy of backup file} 151 }}} 152 153 5. Grant redcap user permission to the new database: 154 {{{ 155 GRANT SELECT ON redcap{version}.* TO 'redcap'@'%'; 156 }}} 157 158 6. Connect to your docker redcap container 144 159 145 160 {{{sudo docker exec -i -t <CONTAINERID> /bin/bash}}} 146 161 147 4. Unzip the contents of redcap7.X.X_upgrade.zip into /var/www/site/redcap148 149 5. Change database.php with details of new database.150 151 6. Open URL162 7. Unzip the contents of redcap7.X.X_upgrade.zip into /var/www/site/redcap 163 164 8. Change database.php with details of new database. 165 166 9. Open URL 152 167 153 168 {{{http://<HOST>.xuhl-tr.nhs.uk/redcap/redcap_v7.X.X/upgrade.php}}} 154 169 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 :170 10. 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 : 156 171 157 172 {{{mysql -u root -p redcap6168 < redcap_upgrade_XXXXX.sql}}} 158 173 159 8. Now modify lcbruit/redcap_fresh docker image. This is very important as it will replace you current docker image.174 11. Now modify lcbruit/redcap_fresh docker image. This is very important as it will replace you current docker image. 160 175 161 176 Download the fresh install package from redcap and modify the Dockerfile in redcap_fresh to use it. 162 177 163 9. Build and run the redcap_fresh container :178 12. Build and run the redcap_fresh container : 164 179 165 180 {{{sudo docker build -t lcbruit/redcap_fresh:v6.16.6 .}}} … … 167 182 {{{sudo docker run -itd -p 80:80 lcbruit/redcap_fresh:v6.16.6}}} 168 183 169 1 0. Ensure you have set the container to start on reboot with the correct version number184 13. Ensure you have set the container to start on reboot with the correct version number 170 185 171 186 [[Docker HowTo Auto Start Containers On Reboot]]