Skip to content

Commit

Permalink
Merge pull request #107 from medizininformatik-initiative/84-redcap-d…
Browse files Browse the repository at this point in the history
…eploy-variante-1-ip-redcap-from-redcap-plain-download

84 redcap deploy variante 1 ip redcap from redcap plain download
  • Loading branch information
astruebi authored Feb 21, 2024
2 parents 4b46dca + d8c1d56 commit 5e79a96
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 17 deletions.
14 changes: 5 additions & 9 deletions Dockerfile_R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# etlutils

FROM rocker/r-ver:4.3.2

# etlutils

RUN apt-get update \
&& apt-get install -y libssl-dev libcurl4-openssl-dev libpq-dev

Expand All @@ -17,18 +17,16 @@ RUN R CMD INSTALL --preclean --no-multiarch --with-keep.source R-etlutils/etluti


# kds2db

COPY R-kds2db R-kds2db

RUN R CMD build R-kds2db/kds2db

RUN R CMD INSTALL --preclean --no-multiarch --with-keep.source R-kds2db/kds2db

#COPY StartRetrieval.R /src/StartRetrieval.R

#COPY kds2db_config.toml /src/kds2db_config.toml


# db2frontend

RUN apt-get install -y libsodium-dev

RUN /rocker_scripts/bin/install2.r redcapAPI dplyr
Expand All @@ -39,9 +37,7 @@ RUN R CMD build R-db2frontend/db2frontend

RUN R CMD INSTALL --preclean --no-multiarch --with-keep.source R-db2frontend/db2frontend

#COPY StartDB2Frontend.R /src/StartDB2Frontend.R

#COPY db2frontend_config.toml /src/db2frontend_config.toml

# cleanup

RUN apt-get autoremove && apt-get clean
9 changes: 9 additions & 0 deletions REDCap-app/html/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ $username = 'redcap'; //your_mysql_db_username
$password = 'password_for_redcap_user'; //your_mysql_db_password
```

Passen Sie die Zugriffrechte für die folgenden Verzeichnisse an:
REDCap-app/html/redcap/temp
REDCap-app/html/redcap/modules
REDCap-app/html/redcapdocs

```
chmod ugo+x REDCap-app/html/redcap/temp REDCap-app/html/redcap/modules REDCap-app/html/redcapdocs
```

Rufen Sie im Browser die Seite auf: http://127.0.0.1:8082/redcap/

(Sollten Sie eine Fehlermeldung erhalten, rufen Sie im Browser die Install-Seite auf: http://127.0.0.1:8082/redcap/install.php)
Expand Down
2 changes: 1 addition & 1 deletion REDCap-db/init/redcap.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4183,7 +4183,7 @@ INSERT INTO redcap_config (field_name, value) VALUES
('file_repository_upload_max', ''),
('file_repository_enabled', '1'),
('temp_files_last_delete', now()),
('edoc_path', ''),
('edoc_path', '/var/www/html/redcapdocs'),
('enable_edit_survey_response', '1'),
('enable_plotting', '2'),
('enable_plotting_survey_results', '1'),
Expand Down
2 changes: 2 additions & 0 deletions REDCap-db/mariadb.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,7 @@ max_allowed_packet=1G
# Vorschläge für Cache Parameter (nicht aktiv)
#query_cache_size = 256M
#query_cache_limit = 64K
optimizer_switch=rowid_filter=OFF

# Import all .cnf files from configuration directory
!includedir /etc/mysql/mariadb.conf.d/
8 changes: 1 addition & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ services:
# SQL Server for redcap
redcap_db:
image: mariadb:11
#container_name: ${COMPOSE_PROJECT_NAME}_mysql
#command: --default-authentication-plugin=mysql_native_password
restart: unless-stopped
env_file: ${PWD}/REDCap-db/.env-redcap-db
secrets:
Expand All @@ -40,12 +38,12 @@ services:
- redcap-db-data:/var/lib/mysql
- ${PWD}/REDCap-db/init:/docker-entrypoint-initdb.d
#- ./.my.cnf:/root/.my.cnf
#command: --default-authentication-plugin=mysql_native_password

# Frontend (redcap)
redcap:
build: ./REDCap-app/build
#user: "www-data:www-data"
#container_name: ${COMPOSE_PROJECT_NAME}_app
depends_on:
- redcap_db
restart: unless-stopped
Expand All @@ -63,9 +61,7 @@ services:

# Database (postgres) for medical safety (AMTS) information
amts_db:
#image: postgres:15
build: ./Postgres-amts_db/build
#container_name: pg_container
restart: unless-stopped
# healthcheck:
# test: [ "CMD-SHELL", "pg_isready -U postgres -d interpolar" ]
Expand All @@ -92,7 +88,6 @@ services:
# Web-administration of amts_db (optional)
pgadmin:
image: dpage/pgadmin4:7.2
#container_name: pgadmin4_container
restart: unless-stopped
ports:
- "127.0.0.1:8089:80"
Expand All @@ -117,7 +112,6 @@ services:
working_dir: /src
restart: "no"
volumes:
#- ./R-kds2db:/src
- ./R-kds2db/outputLocal:/src/R-kds2db/outputLocal
- ./R-kds2db/outputGlobal:/src/R-kds2db/outputGlobal
- ./R-kds2db/kds2db_config.toml:/src/R-kds2db/kds2db_config.toml
Expand Down

0 comments on commit 5e79a96

Please sign in to comment.