This repository provides a fully-configured, containerized development environment for LimeSurvey using VS Code Dev Containers, Docker Compose, and PostgreSQL.
It supports backend and frontend development, unit and functional testing (PHPUnit + Selenium), Xdebug, and includes several helper scripts and tasks.
- Clone the repository
- Open it in VS Code
- When prompted, click “Reopen in Container”
- Wait for the build and setup to complete
Visit: http://localhost:8080/admin
Use credentials:
Username: admin
Password: password
./.devcontainer/scripts/php-unit-tests.shOr via VS Code task:
Ctrl+Shift+P → Tasks: Run Task → LimeSurvey: Run functional tests
Clear LimeSurvey’s runtime cache and restart services:
./.devcontainer/scripts/clear-cache.shAlso available as a VS Code task:
LimeSurvey: Clear cache and restart services
Reset the dev container, volumes, DB, and reinstall everything:
./.devcontainer/scripts/reset-dev.sh| Script | Purpose |
|---|---|
setup.sh |
Runs at container init, installs LS |
clear-cache.sh |
Clears cache + restarts nginx/php-fpm |
php-unit-tests.sh |
Runs PHPUnit tests |
reset-dev.sh |
Full environment reset |
Defined in docker-compose.yml:
- app: PHP 8.1 + Nginx + Composer + Xdebug + Supervisor
- db: PostgreSQL 14 with persistent volume
- selenium: Optional Firefox driver for browser testing
- PHP Config:
.devcontainer/php.ini - Xdebug:
.devcontainer/xdebug.ini - Nginx Site:
.devcontainer/default.conf - Supervisor:
.devcontainer/supervisord.conf
- Port:
9003 - Automatically connects on request
- Configured via
.vscode/launch.json
To debug:
- Set breakpoints
- Run
Listen for Xdebugin VS Code debugger - Trigger a request via browser or terminal
- Editor: auto formats on save
- Excluded folders:
vendor,node_modules - Tasks: run tests, clear cache, restart services
- Debug: works with Xdebug out-of-the-box
.
├── .devcontainer/
│ ├── devcontainer.json
│ ├── docker-compose.yml
│ ├── Dockerfile
│ ├── supervisord.conf
│ ├── php
│ ├── php.ini
│ └── xdebug.ini
│ ├── nginx
│ └── default.conf
│ └── scripts/
│ ├── setup.sh
│ ├── clear-cache.sh
│ ├── php-unit-tests.sh
│ └── reset-dev.sh
├── .vscode/
│ ├── launch.json
│ ├── settings.json
│ └── tasks.json
├── .env
├── workspace.code-workspace
└── limesurvey/ # Source code from LimeSurvey repo
- PostgreSQL and Composer cache are mounted volumes — deleted during full reset
- Xdebug log (if enabled):
/tmp/xdebug.loginside the container supervisorctl restart allrestarts services without rebuilding
- Initial setup: HaroWana