Public | Automated Build

Last pushed: 3 months 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.

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 volume which maps to a directory in your host:

docker run -d --name limesurvey -v ~/limesurvey/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 volume which maps to a directory in your host:

docker run -d --name limesurvey -v ~/limesurvey/upload:/app/upload -v ~/limesurvey/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:

limesurvey:
  ports:
    - "80:80"
  volumes:
    - ~/limesurvey/mysql:/var/lib/mysql
    - ~/limesurvey/upload:/app/upload
  image:
    crramirez/limesurvey:latest

And run:

docker-compose up -d
Docker Pull Command
Owner
crramirez
Source Repository

Comments (14)
crramirez
2 months 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
2 months 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
3 months ago

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

crramirez
3 months 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
3 months 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

yogeek
3 months ago

Hello @crramirez,

Thank you for your quick answer.
I tested the following command on the version of your image I had on my machine and it works :

docker run -d -v ~/limesurvey/mysql:/var/lib/mysql -p 80:80 crramirez/limesurvey:latest

However, then, i updated your image and your latest image does not seem to work anymore : the http://locahost displays the apache page and not the limesurvey one...
Did you modify the configuration of the latest image compared to the previous one ?

Thank you

crramirez
3 months ago

Hello @yogeek,

In fact you can use volumes for that. I've updated the description talking about this case. Test and tell me. Later I will submit how to preserve images and uploads in general

Regards,
Carlos

yogeek
4 months ago

Hello @crramirez,

First thank you for this image !
Then, concerning the persistence of the data in the container, isn't there a way to launch the container with volumes (docker run -v <some_host_dir>:<data_in_container_dir> ...) to persist limesurvey datas (surveys, configuration, users...) ? By the way, are all datas stored in the database ? (if so, the only volume to mount is the one containing the DB files no ?

You said in a previous answer that surveys could be exported and imported again but what if the container stops brutally (because of an server down for example), the export was not done, and yet we want to be able to retrieve all the previous data at the next launch, right ?
Isn't volumes could solve this situation ?

Thanks

crramirez
8 months ago

Updated to limesurvey 2.06

crramirez
8 months ago

Hello @wildkiwi,

I think I saw your comment too late. This error denotes that the database is down. You should test restarting the container.

If you made a backup you can try from scratch and import the surveys.

This is what I could try