Permalink
62067ff Sep 30, 2018
1 contributor

Users who have contributed to this file

115 lines (111 sloc) 4.25 KB
# docker-elabftw configuration file
# use : "docker-compose up -d" to start containers
# https://hub.docker.com/r/elabftw/elabimg/
# https://www.elabftw.net
# our first container is nginx + php-fpm + elabftw
web:
image: elabftw/elabimg
restart: always
container_name: elabftw
# drop some capabilities
cap_drop:
- SYS_ADMIN
- AUDIT_WRITE
- MKNOD
- SYS_CHROOT
- SETFCAP
- NET_RAW
- SYS_PTRACE
environment:
# no need to change
- DB_HOST=mysql
# no need to change
- DB_NAME=elabftw
# no need to change
- DB_USER=elabftw
# need to change
- DB_PASSWORD=secr3t
# get your secret key from https://demo.elabftw.net/install/generateSecretKey.php
# if you don't want to get it from an external source you can also do that:
# docker run -t --entrypoint '/bin/sh' elabftw/elabimg -c "php /elabftw/install/generateSecretKey.php"
- SECRET_KEY=
# optional: change to your server name in nginx config
- SERVER_NAME=localhost
# optional: disable https, use this to have an http server listening on port 443
# useful if the SSL stack is handled by haproxy or something alike
- DISABLE_HTTPS=false
# set to true to use letsencrypt certificates
# note: does nothing if DISABLE_HTTPS is set to true
- ENABLE_LETSENCRYPT=false
# no need to change
- MAX_PHP_MEMORY=256M
# no need to change
- MAX_UPLOAD_SIZE=100M
# better if changed (see list of available values: http://php.net/manual/en/timezones.php
- PHP_TIMEZONE=Europe/Paris
# again
- TZ=Europe/Paris
# enable if you want nginx to be configured with set_real_ip_from directives
- SET_REAL_IP=false
# the IP address/addresses. Separate them with a , AND A SPACE. Several set_real_ip_from lines will be added to the nginx config. One for each.
# this does nothing if SET_REAL_IP is set to false
- SET_REAL_IP_FROM=192.168.31.48, 192.168.0.42, 10.10.13.37
# optional: set the limit of simultaneous request that will be server
# see http://php.net/manual/en/install.fpm.configuration.php
# default is 50
- PHP_MAX_CHILDREN=50
ports:
# if you want elabftw to run on a different port, change the first number
# host:container
- "443:443"
volumes:
# this is where you will keep the uploaded files persistently
# for Windows users it might look like this
# - D:\Users\Nico\elab-data\web:/elabftw/uploads
# host:container
- /var/elabftw/web:/elabftw/uploads
#
# TLS configuration
#
# Note: if your certificate is not from letsencrypt, make sure to have those two files:
#
# /etc/letsencrypt/live/SERVER_NAME/fullchain.pem
# /etc/letsencrypt/live/SERVER_NAME/privkey.pem
#
# in the folder /etc/letsencrypt (or any folder you like as long as you adapt the line below
# replace SERVER_NAME with the value of SERVER_NAME of course.
#
# if you have enabled letsencrypt, uncomment the line below
# path to the folder with TLS certificate + private key
# host:container
#- /etc/letsencrypt:/ssl
links:
- mysql
mysql:
image: mysql:5.7
restart: always
container_name: mysql
# drop some capabilities
cap_drop:
- AUDIT_WRITE
- MKNOD
- SYS_CHROOT
- SETFCAP
- NET_RAW
environment:
# need to change
- MYSQL_ROOT_PASSWORD=secr3t
# no need to change
- MYSQL_DATABASE=elabftw
# no need to change
- MYSQL_USER=elabftw
# need to change IMPORTANT: this should be the same password as DB_PASSWORD from the elabftw container
- MYSQL_PASSWORD=secr3t
# need to change, this is your timezone, see PHP_TIMEZONE from the elabftw container
- TZ=Europe/Paris
volumes:
# this is where you will keep the database persistently
# for Windows users it might look like this
# - D:\Users\Nico\elab-data\mysql:/var/lib/mysql
# host:container
- /var/elabftw/mysql:/var/lib/mysql