iteconomics/limesurvey
LimeSurvey is the lightweight tool, it-economics uses for surveys – provided by this container.
10K+
Provisioned by it economics GmbH
Docker images provided within this repository are built on the needs of it economics GmbH.
The LimeSurvey Image is based on our base Apache with current PHP version 7.2.
Minimal usage is to provide at least mandatory environmental variables from next chapter – so base usage can look like this [given that there is a Docker container databasecontainer
within the Docker network internal
and the given user credentials]:
docker run \
--rm -d -P \
--network internal \
-e DB_HOST=databasecontainer \
-e DB_NAME=database \
-e DB_USER=user \
-e DB_PASS=password \
-e LIMESURVEY_ADMIN=admin \
-e LIMESURVEY_ADMIN_PASS='$uper-secur3' \
-e LIMESURVEY_ADMIN_NAME=Admin \
-e LIMESURVEY_ADMIN_MAIL='admin@example.net' \
-e LIMESURVEY_SHOW_SCRIPT_NAME=true \
iteconomics/limesurvey:latest
This image is customizable by these environmental variables:
env | default | mandatory | change recommended | description | comment |
---|---|---|---|---|---|
RUNTIMEFOLDER | /var/www/limesurvey | no | no | folder LimeSurvey puts the runtime files like sessions in | |
DB_USER | yes | yes | database user | ||
DB_PASS | yes | yes | password for database user $DB_USER | ||
DB_NAME | $DB_USER | no | yes | database the user $DB_USER will work on for LimeSurvey | |
DB_HOST | yes | yes | host of database $DB_NAME | ||
DB_PREFIX | "lime_" | no | no | prefix for all LimeSurvey-Tables within database | |
LIMESURVEY_ADMIN | yes | yes | username for LimeSurvey super admin | ||
LIMESURVEY_ADMIN_PASS | yes | yes | password for super admin $LIMESURVEY_ADMIN | ||
LIMESURVEY_ADMIN_NAME | yes | yes | real name for super admin $LIMESURVEY_ADMIN | ||
LIMESURVEY_ADMIN_MAIL | yes | yes | e-mail address for super admin $LIMESURVEY_ADMIN | ||
LIMESURVEY_DEFAULT_LANG | no | yes | abbreviation of default language to use | LimeSurvey defaults to en | |
LIMESURVEY_TITLE | no | yes | Title of LimeSurvey instance | defaults to LimeSurvey | |
ADMIN_THEME_NAME | no | yes | theme name for admin theme to be activated | ||
DEFAULT_TEMPLATE | no | yes | theme name for survey theme | has to be installed through the admin interface before it can be activated through this setting since there are done complex parsing steps during installation of a theme | |
LDAP_SERVER | no | yes | ldap server | mandatory for activating ldap configuration; every LDAP variable without default has to be defined – else installation will fail | |
LDAP_PORT | 389 | no | yes | port for ldap connection | |
LDAP_VERSION | 3 | no | no | ldap version to use | |
LDAP_TLS | 0 | no | 0 or 1 – whether TLS should not or should be activated | ||
LDAP_SEARCH_USER_ATTRIBUTE | uid | no | search attribute for users | ||
LDAP_USER_PREFIX | '' | no | set userprefix for ldap binds | ||
LDAP_USER_SUFFIX | '' | no | set usersuffix for ldap binds | ||
LDAP_USER_SEARCH_BASE | ou=people,dc=example,dc=com | no | yes | ldap search base | |
LDAP_BIND_DN | cn=admin,dc=example,dc=com | no | yes | ldap user / authority to check binds | |
LDAP_BIND_PASS | no | yes | password for ldap user / authority $LDAP_BIND_DN | ||
LDAP_MAIL_ATTRIBUTE | no | ldap attribute for logged in users to be fetched as mail attribute to LimeSurvey | |||
LDAP_FULLNAME_ATTRIBUTE | displayName | no | ldap attribute interpreted as fullname for logged in users in LimeSurvey | ||
LDAP_IS_DEFAULT | 1 | no | yes | 1 or 0 – whether ldap login should or not be default login method | |
LDAP_AUTOCREATE | 1 | no | yes | 1 or 0 – whether login through ldap should create LimeSurvey user | |
LDAP_ALLOW_CREATION_TO_LOGGEDIN | '' | no | yes | ||
LDAP_GROUP_SEARCH_BASE | ou=groups,dc=example,dc=com | no | yes | in which searchbase LimeSurvey should search for groups? | |
LDAP_GROUP_NAME | limesurvey | no | yes | group name an user should belong to for a successful login to LimeSurvey |
From Apache image it got these environmental variables for further usage:
env | default | mandatory | change recommended | description | comment |
---|---|---|---|---|---|
PHP_TIMEZONE | "Europe/Berlin" | no | yes | timezone-file to use as default – can be one value selected out of /usr/share/zoneinfo/ , i.e. <region>/<city> | |
APACHE_WORKDIR | /var/www/html | no | no | home folder of apache web application | installation directory for auto installation of LimeSurvey during build process of the image |
APACHE_LOG_DIR | /var/log/apache2 | no | yes | folder for log files of apache | |
APACHE_PUBLIC_DIR | $APACHE_WORKDIR | no | yes | folder used within apache configuration to be published – can be usefull if i.e. subfolder public of webproject should be exposed | |
PHP_XDEBUG | 0 | no | yes | You can use this to enable xdebug. start-apache2 script will enable xdebug if PHP_XDEBUG is set to 1 | |
YESWWW | false | no | yes | Duplicate content has to be avoided – therefore a decision for containers delivering content of www.domain.tld and domain.tld has to be made which one should be the mainly used one. YESWWW will be overridden by NOWWW if both are true. | |
NOWWW | false | no | yes | See YESWWW | |
HTTPS | true | no | yes | relevant for YESWWW and NOWWW since config rules have to be adjusted. | |
SMTP_HOST | no | yes | should be set to your smtp host, i.e. mail.example.com | ||
SMTP_PORT | no | yes | defaults to 587 | ||
SMTP_FROM | no | yes | should be set to your sending from address, i.e. motiontool@example.com | ||
SMTP_USER | no | yes | defaults to SMTP_FROM and has to be the user, you are authenticating on the SMTP_HOST | ||
SMTP_PASS | no | yes | should be set to your plaintext(!) smtp password, i.e. I'am very Secr3t! | ||
WORKINGUSER | www-data | no | no | user that works as apache user – not implemented changable | |
TERM | xterm | no | no | set terminal type – default xterm provides 16 colors | |
DEBIAN_FRONTEND | noninteractive | no | no | set frontent to use – default self-explaining |
tool(s) | description |
---|---|
software-properties-common, procps | simplify further installations |
python-setuptools, python-pip, python-pkg-resources | simplify python installations |
python-jinja2, j2cli | used for template provisioning |
python-yaml, python-paramiko | provision Image for further provisioning via Ansible |
vim, nano | editors |
python-httplib2 | Small, fast HTTP client library for Python |
python-keyczar | Toolkit for safe and simple cryptography |
htop, tree, tmux, screen, sudo, git, zsh, ssh, screen | usefull ops tools – oh-my-zsh is installed further |
supervisor | process manager that allows to manage long-running programs |
gnupg, openssl | encryption tools |
curl, wget | fetch remote content |
mysql-client, libpq-dev, postgresql-client, sqlite3, libsqlite3-dev | install database things – except of SQLite3 no real database is installed since full databases should run at least on a separate container |
libkrb5-dev, libc-client-dev | devtools especially for email |
zlib1g-dev | compression library |
libfreetype6-dev, libjpeg62-turbo-dev, libmcrypt-dev, libpng-dev | simplify working with and on images |
nodejs | javascript development tools |
composer | php package manager |
msmtp, msmtp-mta | simple and easy to use SMTP client replacing sendmail |
imap, pdo, pdo_mysql, imap, zip, gd, exif, mcrypt
rewrite
/templates/apache.j2
– the Apache ConfigThe apache config used within containers of this image. It will be provisioned at every start of the container – so you should consider to mount a new template instead of mounting a default apache config directly.
Full Template
<VirtualHost *:80>
ServerAdmin root
DocumentRoot {{ APACHE_PUBLIC_DIR | default(APACHE_WORKDIR) }}
<Directory {{ APACHE_PUBLIC_DIR | default(APACHE_WORKDIR) }}/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order deny,allow
Allow from all
</Directory>
AccessFileName .htaccess
<FilesMatch "^\.ht">
Require all denied
</FilesMatch>
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog /proc/self/fd/1 combined
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
ErrorLog {{ APACHE_LOG_DIR }}/error.log
CustomLog {{ APACHE_LOG_DIR }}/access.log combined
# Multiple DirectoryIndex directives within the same context will add
# to the list of resources to look for rather than replace
# https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex
DirectoryIndex disabled
DirectoryIndex index.php index.html
</VirtualHost>
docker pull iteconomics/limesurvey