Coder Social home page Coder Social logo

crramirez / limesurvey Goto Github PK

View Code? Open in Web Editor NEW
57.0 5.0 105.0 682 MB

LimeSurvey - the most popular Free Open Source Software survey tool on the web. This docker image easies LimeSurvey installation. It includes a MySQL database as well as a web server. This is the most downloaded limesurvey container, but I don't have time to maintain it anymore. I am looking for a new maintainer

Home Page: https://hub.docker.com/r/crramirez/limesurvey/

License: GNU General Public License v3.0

Shell 40.97% Dockerfile 59.03%
limesurvey docker-container docker-compose maintainer-wanted hacktoberfest

limesurvey's Introduction

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.

Try in PWD

Usage

To run limesurvey in 80 port just:

docker pull crramirez/limesurvey:latest
docker run -d --name limesurvey -p 80:80 crramirez/limesurvey:latest

The latest image was upgraded to limesurvey 3, to continue using limesurvey 2 use:

docker pull crramirez/limesurvey:2
docker run -d --name limesurvey -p 80:80 crramirez/limesurvey:2
  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.

Separated containers

MySQL

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
  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 mysql
  • Database user root
  • Database password limesurvey
  • Database name limesurvey #Or whatever you like
  • Table prefix lime_ #Or whatever you like

PostgreSQL

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

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

To run with a separate PostgreSQL-container:

export COMPOSE_FILE=docker-compose.pgsql.yml
docker-compose up -d
  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 PostgreSQL
  • Database location pgsql
  • Database user postgres
  • Database password limesurvey
  • Database name limesurvey #Or whatever you like
  • Table prefix lime_ #Or whatever you like

limesurvey's People

Contributors

anmuel avatar cramirezsmtt avatar crramirez avatar hetzijzo avatar rsnyman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

limesurvey's Issues

Consider separating MySQL from the Container

First of all, thank you for your work on this image. I was wondering if you considered separating MySQL from the image and instead spun up MySQL via Docker Compose and linking the container?

Since everything is bundled in this one container I can't use it for a production deployment (which I'll be backing with an RDS instance. So, I'm left with essentially copying your Dockerfile, but rooting it on the php:apache image.

Alias for different location

Hi,

I was struggling with getting this to work on a different location than /, like https://domain.com/survey. In the end I had to add an Alias to the apache config:

<VirtualHost *:*>
        ServerAdmin webmaster@localhost

        Alias /${HTTP_LOCATION} /var/www/html
        DocumentRoot /var/www/html
...

And then pass an environment variable HTTP_LOCATION to the container. If none is given it works just like always.

Would be great if you add this to the next release. If you prefer a pull request I'll also be happy to provide one.

Installation dialog after container restart

Hi,

I am new to docker, so the problem might be my fault or expected. I use the docker limesurvey with the provided standard docker-compose.yaml file. After starting the container with docker-compose up -d, I get the installation dialog, which I completed. I then imported existing surveys. After stopping the container with docker-compose down --remove-orphans and starting it again with docker-compose up -d, I again have to complete the installation dialog. When I enter the same data, my previously imported surveys are directly available, but I wonder whether it is required to fill in the installation dialog each time.

Secondly, I initially used no password for the root db user. How can I change that without having to start with a completely new installation?

Thanks for your help, Birte

Smaller image

First of all, thanks for your great work!
Currently, the build of the docker images takes quite long and includes packages such as x11, which (to me) do not seem to be necessary here. Would be possible to skip the unneeded packages or switch to another base image such as alpine?

Update to current LTS Version

Hey,

Is it possible to update your image to 3.22.15 LTS and tag it as latest or provide a way to use the new version 4?

Thank you

limesurvey-3.x version bump

It would be great to have 3.x from scratch (instead ov having to upgrade the fresh container every time).

does NOT work after restart

login page:
The following surveys are available:
Please contact Administrator ( [email protected] ) for further assistance.

Docker Log
=> Using an existing volume of MySQL
/usr/lib/python2.7/dist-packages/supervisor/options.py:295: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
'Supervisord is running as root and it is searching '
2021-08-12 15:56:34,324 CRIT Supervisor running as root (no user in config file)
2021-08-12 15:56:34,337 WARN Included extra file "/etc/supervisor/conf.d/supervisord-apache2.conf" during parsing
2021-08-12 15:56:34,337 WARN Included extra file "/etc/supervisor/conf.d/supervisord-mysqld.conf" during parsing
Unlinking stale socket /var/run/supervisor.sock
2021-08-12 15:56:34,701 INFO RPC interface 'supervisor' initialized
2021-08-12 15:56:34,701 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2021-08-12 15:56:34,701 INFO supervisord started with pid 8
2021-08-12 15:56:35,703 INFO spawned: 'mysqld' with pid 12
2021-08-12 15:56:35,705 INFO spawned: 'apache2' with pid 13
2021-08-12 15:56:37,147 INFO success: mysqld entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-08-12 15:56:37,147 INFO success: apache2 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

Provide License

Would it be possible to attach a license here? I see that the open source ce is GNU GPL v3 on the limesurvey website - Is this container the same?

Error when I try to configure database mysql

Hi,

I try to configure the database, with separate mysql docker-compose, how the readme file say , but when I press next the installer show me the follow error:

SQLSTATE[HY000] [2059] Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/lib/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory

Regards

error by Survey import

hi i'm trying to import a Survey from Limesurvey cloud to my local. But I got this error:

500: Interner Servererror
Property "SurveyLanguageSetting.surveyls_legal_notice is not defined.

could you pls give a hint how to solve it? I have tried to update with "comfort update", but it required a Update key...

do you have an advice how can I easily update in docker?

localhost as database

Containers with MySQL and Postgresql are running fine, but in database configuration I always get "connection failed".

-- database location localhost
-- database user postgres
-- database password limesurvey

PHP PDO driver library None found&PHP/PECL JSON library with !mark

Hi, when I run following command in CentOS
docker run -d --name limesurvey -v $(pwd)/lim_upload:/app/upload -v $(pwd)/lim_etc_php5:/etc/php5 -v $(pwd)/lim_mysql:/var/lib/mysql -p 80:80 crramirez/limesurvey:latest

I got the error in 3. step Pre-installation check:

  1. PHP PDO driver library None found
  2. PHP/PECL JSON library with a !mark

also with several! marks PHP GD library&PHP LDAP library&PHP imap library in Optional modules.

I want to check the php.ini in docker to give the "extension=php_pdo.dll" under the construction from the Internet, but I didn’t find the file.

could you please give a hint of this Error? Thanks

No network inside container

Hi,

I had no network in docker container, it was because of my Synology NAS firewall settings.

Sorry for opening this issue.

How to do a Update?

Hi,
we use your docker-image for a long time now with success. Thank you.
However: Did you have an upgrade-guide? What is when I want to upgrade to a new version of Limesurvey? Currently we use Version 2.72.3+171020.
I fear that a simple docker-compose build will not work with my current version of Limesurvey and I want not lose my old surveys.

Thomas

Updated LimeSurvey but it returns error on admin login

Hi, I had a survey that was working successfully for many people a few years ago (2019). I just updated LimeSurvey to version 6.21 using Softaculous in Control Panel, in an effort to keep things up to date. However, when I log in to the admin, I get this error:

CDbException
The table "{{template_configuration}}" for active record class "TemplateConfiguration" cannot be found in the database.

I'd like to be able to use the same survey again, but would prefer not to have to enter all the questions manually again. Any suggestions as to how to either get this installation working, or extract the database content to insert into a new installation? Thanks

Emails aren't going out

I created a new user but the email giving the newly created password got stuck in the mail queue:

root@CONTAINERID:/var/spool# mailq
MSP Queue status...
                /var/spool/mqueue-client (1 request)
-----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
vBNGqqNO000204     1442 Sat Dec 23 16:52 [email protected]
                 (Deferred: Connection refused by [127.0.0.1])
                                         admin2 <[email protected]>
                Total requests: 1
MTA Queue status...
/var/spool/mqueue is empty
                Total requests: 0

Same thing happen if I invoke sendmail from the command line within the container.

Impossible to create instance with any database with separated containers

Hello,
I tried to create a docker-compose instance like you suggest on your main readme, in order to separate containers and use volumes.

However when I tried to use mysql I got the same problem as #32 . I also tried to modify the docker-compose to get a lower version of mysql but in this case the container keeps restarting and is unusable.

I then tried pgsql, the docker processes seem to start OK but when completing the admin user creation this gets throwed and it is impossible to continue.

Thanks in advance if you take the time to solve these issues.

Could not add administrator settings: exception 'CDbException' with message 'CDbCommand failed to execute the SQL statement: SQLSTATE[42703]: Undefined column: 7 ERROR: column d.adsrc does not exist LINE 1: ...ER(format_type(a.atttypid, a.atttypmod)) AS type, d.adsrc, a... ^' in /app/framework/db/CDbCommand.php:543 Stack trace: #0 /app/framework/db/CDbCommand.php(396): CDbCommand->queryInternal('fetchAll', Array, Array) #1 /app/framework/db/schema/pgsql/CPgsqlSchema.php(181): CDbCommand->queryAll() #2 /app/framework/db/schema/pgsql/CPgsqlSchema.php(113): CPgsqlSchema->findColumns(Object(CPgsqlTableSchema)) #3 /app/framework/db/schema/CDbSchema.php(103): CPgsqlSchema->loadTable('lime_users') #4 /app/framework/db/ar/CActiveRecord.php(2389): CDbSchema->getTable('{{users}}') #5 /app/framework/db/ar/CActiveRecord.php(413): CActiveRecordMetaData->__construct(Object(User)) #6 /app/framework/db/ar/CActiveRecord.php(682): CActiveRecord->getMetaData() #7 /app/application/models/LSActiveRecord.php(34): CActiveRecord->hasAttribute('created') #8 /app/framework/db/ar/CActiveRecord.php(398): LSActiveRecord->behaviors() #9 /app/application/models/User.php(53): CActiveRecord::model('User') #10 /app/application/controllers/InstallerController.php(594): User::model() #11 /app/application/controllers/InstallerController.php(87): InstallerController->stepOptionalConfiguration() #12 /app/framework/web/CWebApplication.php(282): InstallerController->run('optional') #13 /app/framework/web/CWebApplication.php(141): CWebApplication->runController('installer/optio...') #14 /app/framework/base/CApplication.php(185): CWebApplication->processRequest() #15 /app/index.php(194): CApplication->run() #16 {main}.

bug(docker): Returns to installation when container restarts

Upon deployment, when a node restarts, the docker container gets started up again, taking the user through the installation process all over again.

No data is lost, but you have to re-enter database details again.

Have not tested with:

  • External DB

Error 500 Serveur script Php

Hello, I made a script which allows to get back the key of session thanks to the API of Limesurvey. But concerns is that when I launch the container and what I launch my script which is in the root. I receive the error 500 at the level of the server is it possible to have a help thank you

Admin page login timeout behind proxy

After installation, I get to the login page. I always get a timeout after submitting the login information. Nginx gives me a HTTP 504 Gateway Time-out message. If I refresh the page from the timeout message, I successfully get to the admin dashboard. Why is the POST request on submit timing out?

Here's my nginx configuration (only the relevant bits):

   server {
      listen 80;
      server_name limesurvey.mydomain.com;

      location / {
        proxy_pass http://limesurvey/;
            proxy_http_version 1.1;
      }
    }

Docker-compose.yml (again only the relevant bits):

  limesurvey:
    image: crramirez/limesurvey:2.73.1
    container_name: limesurvey
    restart: always
    ports:
      - 8080:80
    networks:
      - proxy
    volumes:
      - limesurvey-db:/var/lib/mysql

(Network and volume are there too)

docker exec <containerId> cat /var/log/apache2/error.log:

[Thu Mar 29 16:37:27.656710 2018] [core:warn] [pid 11] AH00111: Config variable ${HTTP_LOCATION} is not defined
[Thu Mar 29 16:37:27.798837 2018] [mpm_prefork:notice] [pid 11] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.23 configured -- resuming normal operations
[Thu Mar 29 16:37:27.798868 2018] [core:notice] [pid 11] AH00094: Command line: 'apache2 -D FOREGROUND'
[Thu Mar 29 16:37:27.808096 2018] [negotiation:error] [pid 368] [client <IP>:60427] AH00687: Negotiation: discovered file(s) matching request: /var/www/html/admin/index (None could be negotiated).

nginx logs:

<IP> - - [29/Mar/2018:16:44:03 +0000] "POST /index.php/admin/authentication/sa/login HTTP/1.1" 302 0 "http://limesurvey.<mydomain>.com/index.php/admin/authentication/sa/login" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/604.5.6 (KHTML, like Gecko) Version/11.0.3 Safari/604.5.6" "-"
2018/03/29 16:45:03 [error] 5#5: *228 upstream timed out (110: Connection timed out) while reading response header from upstream, client: <IP>, server: limesurvey.<mydomain>.com, request: "GET /index.php/admin HTTP/1.1", upstream: "http://<IP>:80/index.php/admin", host: "limesurvey.<mydomain>.com", referrer: "http://limesurvey.<mydomain>.com/index.php/admin/authentication/sa/login"
<IP> - - [29/Mar/2018:16:45:03 +0000] "GET /index.php/admin HTTP/1.1" 504 183 "http://limesurvey.<mydomain>.com/index.php/admin/authentication/sa/login" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/604.5.6 (KHTML, like Gecko) Version/11.0.3 Safari/604.5.6" "-"

LimeSurvey behind traefik proxy

trying this docker-compose.yml:

version: '2'

services:

  limesurvey:
    volumes:
      - mysql:/var/lib/mysql
      - upload:/app/upload
    image: crramirez/limesurvey:latest
    labels:
      - "traefik.enable=true"
      - "traefik.frontend.rule=Host:survey.mydomain.com"
      - "traefik.port=80"
volumes:
  mysql:
  upload:

and it always times out.

logs of container show:

# docker-compose up 
Recreating limesurvey_limesurvey_1 ... done
Attaching to limesurvey_limesurvey_1
limesurvey_1  | => Using an existing volume of MySQL
limesurvey_1  | /usr/lib/python2.7/dist-packages/supervisor/options.py:295: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
limesurvey_1  |   'Supervisord is running as root and it is searching '
limesurvey_1  | 2019-07-25 14:30:34,290 CRIT Supervisor running as root (no user in config file)
limesurvey_1  | 2019-07-25 14:30:34,295 WARN Included extra file "/etc/supervisor/conf.d/supervisord-mysqld.conf" during parsing
limesurvey_1  | 2019-07-25 14:30:34,296 WARN Included extra file "/etc/supervisor/conf.d/supervisord-apache2.conf" during parsing
limesurvey_1  | 2019-07-25 14:30:34,385 INFO RPC interface 'supervisor' initialized
limesurvey_1  | 2019-07-25 14:30:34,391 CRIT Server 'unix_http_server' running without any HTTP authentication checking
limesurvey_1  | 2019-07-25 14:30:34,392 INFO supervisord started with pid 7
limesurvey_1  | 2019-07-25 14:30:35,396 INFO spawned: 'mysqld' with pid 11
limesurvey_1  | 2019-07-25 14:30:35,400 INFO spawned: 'apache2' with pid 12
limesurvey_1  | 2019-07-25 14:30:36,773 INFO success: mysqld entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
limesurvey_1  | 2019-07-25 14:30:36,774 INFO success: apache2 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

anything particular to do here?
thanks

Web app does not work behind a proxy

My server is using multiple web applications and thus this docker is used behind a proxy. However when the Limesurvey server is called, the url is rewritten to the internal Docker hostname, which is generally not exposed to the outside world.
Can you add a environment variable for baseUrl, so that rewriting is turned off?

image

How to use HTTP_LOCATION correctly?

Hi,
my URL is supposed to be https://my.server.net/surveys. So my docker-compose config looks like this:

   limesurvey:
      restart: always
      image: crramirez/limesurvey:2.72.3
      links:
        - "mysql:db"
      expose:
        - "80"
      environment:
        - "DISABLE_MYSQL=yes"
        - "HTTP_LOCATION=surveys"
      volumes:
        - "./limesurvey/upload:/app/upload"
        - "./limesurvey/config/config-defaults.php:/app/application/config/config-defaults.php"

But when I request https://my.server.net/surveys in the browser I always get redirected to https://my.server.net/index.php?r=installer. What am I doing wrong?

Config should be in a volume

While trying to move an install from one machine to another the new instance kept going into the installer although I copied all the volumes to the new machine. It turns out that some configuration is stored in /app/application/config, but it is not defined as a volume.

This is with crramirez/limesurvey:2 but that might also apply to version 3.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.