Public | Automated Build

Last pushed: a month ago
Short Description
A container with Limesurvey (https://www.limesurvey.org/en/) installed and ready to go
Full Description

LimeSurvey

LimeSurvey - the most popular
Free Open Source Software survey tool on the web.

https://www.limesurvey.org/en/

This docker image easies limesurvey installation. It includes a MySQL database as well a web server.

Usage

To run limesurvey in 80 port just:

docker pull crramirez/limesurvey:latest
docker run -d --name limesurvey -p 80:80 crramirez/limesurvey:latest
  1. Go to a browser and type http://localhost
  2. Click Next until you reach the Database configuration screen
  3. Then enter the following in the field:
    • Database type MySQL
    • Database location localhost
    • Database user root*
    • Database password
    • Database name limesurvey #Or whatever you like
    • Table prefix lime_ #Or whatever you like

You are ready to go.

Environment variables

To run limesurvey in a different http location set the HTTP_LOCATION environment variable.

docker run -d --name limesurvey -p 80:80 -e HTTP_LOCATION="surveys" crramirez/limesurvey:latest

Limesurvey will then be available via http://localhost/surveys.

Database in volumes

If you want to preserve data in the event of a container deletion, or version upgrade, you can assign the MySQL data into a named volume:

docker volume create --name mysql
docker run -d --name limesurvey -v mysql:/var/lib/mysql -p 80:80 crramirez/limesurvey:latest

If you delete the container simply run again the above command. The installation page will appear again. Don't worry just put the same parameters as before and limesurvey will recognize the database.

Upload folder

If you want to preserve the uploaded files in the event of a container deletion, or version upgrade, you can assign the upload folder into a named volume:

docker volume create --name upload
docker run -d --name limesurvey -v upload:/app/upload -v mysql:/var/lib/mysql -p 80:80 crramirez/limesurvey:latest

If you delete the container simply run again the above command. The installation page will appear again. Don't worry just put the same parameters as before and limesurvey will recognize the database and the uploaded files including images.

Using Docker Compose

You can use docker compose to automate the above command if you create a file called docker-compose.yml and put in there the following:

version: '2'
services:
  limesurvey:
    ports:
      - "80:80"
    volumes:
      - mysql:/var/lib/mysql
      - upload:/app/upload
    image:
      crramirez/limesurvey:latest
volumes:
  mysql:
  upload:

To run:

docker-compose up -d

The GitHub repository includes this docker-compose.yml file which you can use to setup a basic container structure. You can add a docker-compose.override.yml to edit the default configuration.

The repository also contains a Docker Compose configuration which builds a separate MySQL-container named docker-compose.mysql.yml.

Warning: The docker-compose.mysql.yml contains default MySQL database credentials. It is highly recommended to change these in a production environment.

To run with a separate MySQL-container:

export COMPOSE_FILE=docker-compose.mysql.yml
docker-compose up -d
Docker Pull Command
Owner
crramirez
Source Repository

Comments (19)
crramirez
2 days ago

I definitely need to run a Selenium script over this page, so I can get comments notifications!!!

In the Dockerfile you need to add apt-get install php5-sybase. I haven't included it for two reasons:

  1. I though that no one was interested.
  2. SQL Server installs as default in Limesurvey installation and I want to avoid problems from who confuse it with MySQL.

Please test it if you can. I can include an special build with it. But at this time I cannot test with SQL Server.

Regards

nd90
6 days ago

Any way to add the necessary pieces to connect to mssql as well?

crramirez
10 months ago

Sorry for the delay. Again I only see the comments when I visit the site. It doesn't send me any emails.

Docker has a new way to manage volumes called named volumes. Using this docker takes care of the volume but it never deletes it unless you explicitly say it. With the advantage that can be associated with a new container in the same way as host directories.

First create the volumes:

docker volume create --name mysql
docker volume create --name upload

Then the docker run:

docker run -d --name limesurvey -v upload:/app/upload -v mysql:/var/lib/mysql -p 80:80 crramirez/limesurvey:latest

You can always see your volumes here:

docker volume ls

I will update the documentation for this information.

I had problems with the config volume. I will update this when it works for me.

Regards,
Carlos

caraka
10 months ago

I am getting this error on both 14.04 and 16.04 using this image:
/upload directory Found & writable Found & Unwritable

Setup cannot proceed. If I take the /upload volume out of the command, all is well, but that limits my options going forward, doesn't it?

fuerst
10 months ago

You may save your configuration to the Docker host by adding this to your docker run command:

-v ~/limesurvey/config.php:/app/application/config/config.php
crramirez
a year ago

Hello @zhchaoxing

I can help giving you the command line sentences to run:

Be sure you have already an empty container with initialized database. I mean you ran the setup steps.

First figure out your container id:

docker ps

Your first value. In this example: d4cc1a0a79f0

Then copy your backup to the container:

docker cp LimeSurvey_lime_dump_2016-03-11.sql d4cc1a0a79f0:/root

Then restore your backup:

docker exec d4cc1a0a79f0 bash -c "mysql -D lime </root/LimeSurvey_lime_dump_2016-03-11.sql"

Remember using your database name in -D option.

Refresh your browser. It should be working now.

Hope it helps

zhchaoxing
a year ago

Hi crramirez, thanks for making this container! Do you have an interface to import the backup from LS's "Backup entire database" option? It is supposed to be restored via phpmyadmin, but you do seem to have installed it in the container. Please advise, thanks!

crramirez
a year ago

New version 2.50.1 maps to livesurvey 2.50. This version adds persistence to the upload folder via a volume.

crramirez
a year ago

Version upgraded to 2.50 a new look with bootstrap take a look.

If you are upgrating remember to backup your upload folder and your surveys

crramirez
a year ago

Hello @yogeek,

Sorry when I updated the README.md a new automatic docker build was triggered and the limesurvey download url wasn't available anymore.

I updated the Dockerfile and also tagged the version with 2.06 so in a similar event you can always pull the tagged version.

Regards,
Carlos