Note: This is not a offical REDCap Repository. Its a community based project. You need the offical REDCap permissions and source files to run REDCap. This repository contains no source files from REDCap.
REDCap is a secure web application for building and managing online surveys and databases. While REDCap can be used to collect virtually any type of data in any environment, it is specifically geared to support online and offline data capture for research studies and operations. Please visit the offical Website for more information.
- complete Webservice installation
- complete Database installation
- permission handling
- initial REDCap configuration
- SSL out of the box
In the folder Webservice are all components for building the Webapplication. The Web-Dockerfile is based on the official php docker container with a apache2 integration. The script folder contains all scripts for the automated installation. In the src folder you have to insert the offical REDCap source files as a .zip package. For the SSL configuration you need the ssl folder. Your own key and the associated certificate must be inserted in the subfolders.
The folder MariaDB contains all components for building the database. The DB-Dockerfile is based on the official MariaDB docker container
The most important file is the .env file which contains all private variables for the REDCap system. These must be set before the start.
-
The REDCap Source Files:
REDCap is a closed source project. To get access to the source files you have to request them from official REDCap Website first. -
Docker:
To start the REDCap docker container, Docker is required on the host system. For the installation follow the official Docker installation. -
Docker-compose:
In this project we managed the several container throw the docker-compose framework. For the installation follow the official Docker Compose installation
First, download or clone the repository:
sudo git clone https://github.com/Pfleiderer-Adrian/REDCap-dockerized.git
Next, we need to add redcap's official source files (zipped) to the Webservice/src folder in the repository:
cd path/to/REDCap-dockerized/Webservice/src
sudo cp path/to/sourcefiles/redcapxx.x.x.zip path/to/REDCap-dockerized/Webservice/src
For the SSL configuration we need to add the SSL certificate into the Webservice/ssl folder in the repository. The key must be stored in the key folder and the certificate in the crt folder. If you don't already have an SSL certificate and a key, you can easily create one for development purposes (not production!!). With openssl:
cd /path/to/REDCap-dockerized
sudo openssl req -x509 -nodes -days 356 -newkey rsa:2048 -keyout REDCap-dockerized/Webservice/ssl/key/redcap.key -out REDCap-dockerized/Webservice/ssl/crt/redcap.crt
Last step is to edit the .env file and set the nessecery credentials with a text editor.
Value | Description | Change necessary? |
---|---|---|
MYSQL_ROOT_PASSWORD | The root password for your Database | YES!!! |
MYSQL_DATABASE | The database name for REDCap | NO |
MYSQL_USER | The database user for the application | NO |
MYSQL_PASSWORD | The password for the user | YES!!! |
REDCAP_BASE_URL | The url for your application. E.g. https://localhost/redcap for development | YES |
REDCAP_VERSION | The version of your source files. Name format: xx.x.x (only digets and dot) | YES |
INSTITUTION | Your instition name | NO for development. YES for production |
DEPARTMENT | Your department name | NO for development. YES for production |
CONTACT_EMAIL | Your admin email | NO for development. YES for production |
ADMINISTRATOR_NAME | Your admin name | NO for development. YES for production |
NOTE: All values must be set. No empty values allowed.
Finally we can build and execute our image:
cd path/to/REDCap-dockerized
sudo docker-compose up -d --build
After the image are build successfully please wait a minute. After that you can check your URL. You should see a fully working REDCap system. :)
If you want to change something in the webservice docker image you can run:
cd path/to/REDCap-dockerized
sudo docker exec -it redcap-web bash
If you want to change something in the database docker image you can run:
cd path/to/REDCap-dockerized
sudo docker exec -it redcap-db bash
- mailing service (currently not working out-of-the-box)
MIT
This work uses and is based on the great REDCap software. Please look at these papers: