-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
98 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Simple docker compose example | ||
|
||
This example show how to save user upload into a non apache folder | ||
|
||
Have a look at the docker-composes.yaml `volumes:` and environment variables at `environment:` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
services: | ||
redcap: | ||
image: dzdde/redcap-docker | ||
environment: | ||
DB_PORT: 3306 | ||
DB_HOSTNAME: db | ||
DB_NAME: redcap | ||
DB_USERNAME: redcap | ||
DB_PASSWORD: redcap123 | ||
# Do not reuse this example DB_SALT | ||
DB_SALT: d369a86842347f7e3e40a3ec64b9f9d950bdfde05beba3a61da69bb1fb28dcea9152fbf723889181a9bd9a97f34b90faf17a | ||
REDCAP_INSTALL_ENABLE: true | ||
APPLY_RCCONF_VARIABLES: true | ||
|
||
# Here we define where to store user uploaded files | ||
RCCONF_edoc_path: /data | ||
|
||
RCCONF_institution: "Weyland-Yutani Corporation" | ||
RCCONF_homepage_contact: "Karl Bishop " | ||
RCCONF_homepage_contact_email: "k.bishop@wyyu.earth" | ||
RCCONF_project_contact_name: Colette Ferro | ||
RCCONF_project_contact_email: c.ferro@wyyu.earth | ||
restart: always | ||
depends_on: | ||
db: | ||
condition: service_healthy | ||
ports: | ||
- "80:80" | ||
volumes: | ||
# We mount the upload repo to the local path ./data/user-files | ||
- ./data/user-files:/data | ||
- ./data/redcap:/var/www/html | ||
logging: | ||
options: | ||
max-size: "10m" | ||
max-file: "3" | ||
db: | ||
image: mysql:lts | ||
restart: always | ||
cap_add: | ||
- SYS_NICE # CAP_SYS_NICE | ||
volumes: | ||
- ./data/db:/var/lib/mysql | ||
ports: | ||
- 3306:3306 | ||
environment: | ||
- MYSQL_ROOT_PASSWORD=redcaproot123 | ||
- MYSQL_DATABASE=redcap | ||
- MYSQL_USER=redcap | ||
- MYSQL_PASSWORD=redcap123 | ||
- TZ=UTC | ||
healthcheck: | ||
test: "/usr/bin/mysql -u $$MYSQL_USER -p$$MYSQL_PASSWORD $$MYSQL_DATABASE --execute \"SHOW TABLES;\"" | ||
timeout: 3s | ||
interval: 5s | ||
retries: 4 | ||
command: | ||
# Per REDCap Recommendations | ||
- --max_allowed_packet=128M | ||
# If you have a larger development database, you may want to increase this value: | ||
# Default is 128MB (134217728) - I'm upping it to 512MB | ||
- --innodb_buffer_pool_size=536870912 | ||
# 2x default | ||
# sort_buffer_size=524288 | ||
- --sort_buffer_size=1024K | ||
# Default | ||
#read_rnd_buffer_size=262144 | ||
- --read_rnd_buffer_size=1024K | ||
# By default we only accept connections from localhost but we want to allow connections from anywhere! | ||
# bind-address=127.0.0.1 | ||
- --bind-address=0.0.0.0 | ||
# MAKE SEPARATE FILES PER TABLE | ||
- --innodb_file_per_table=1 | ||
# Disabling symbolic-links is recommended to prevent assorted security risks | ||
- --symbolic-links=0 | ||
# SLOW QUERY LOGGING | ||
- --log_output=FILE | ||
- --slow_query_log=0 | ||
- --slow_query_log_file=/var/log/mysql_slow.log | ||
- --long_query_time=2.000 | ||
- --log-queries-not-using-indexes=0 |