Symfony Webapp Server a Docker image for Symfony apps with Nginx, PHP 8.X FPM, Supervisor and more.
10K+
A production‑ready Docker image for Symfony apps with Nginx + PHP‑FPM + Supervisor + Composer. Two flavors: development (with Xdebug & Symfony CLI) and production (optimized with OPcache).
php8.0-dev, php8.1-dev, php8.2-dev, php8.3-dev, php8.4-dev, latest-devphp8.0-prod, php8.1-prod, php8.2-prod, php8.3-prod, php8.4-prod, latest-prod, latestDevelop and Production ready ! and PHP 8.0, 8.1, 8.2, 8.3, 8.4+
Main extensions:
Core, PDO, Opcache, APCu, Redis, Memcached, MySQL, PostgreSQL, SQLite, MongoDB, LDAP, AMQP (RabbitMQ), GD, Imagick, SOAP, XML, YAML, ZIP, cURL, Swoole, gRPC, Protobuf, Intl, MBString, BCMath, GMP, and many more...
development target)Run container
docker run -d \
-p 8080:80 \
-v $(pwd)/my-app:/var/www/html \
--name symfony-dev \
eidyev/symfony-webapp-server:php-8.3-dev
# Production
docker run -d \
-p 80:80 \
-v $(pwd)/my-app:/var/www/html \
--name symfony-prod \
eidyev/symfony-webapp-server:php-8.3-prod
# --- EXAMPLE --- docker-compose.yml ---------------------------------
networks:
net:
driver: bridge
services:
dev-server:
image: symfony-webapp-server:php-8.3-dev
container_name: webdev
ports:
- "8080:80"
volumes:
# webapp is your symfony app folder
- ./webapp:/var/www/html
depends_on:
- db
networks:
- net
profiles:
- development
prod-server:
image: symfony-webapp-server:php-8.3-prod
container_name: webprod
ports:
- "8081:80"
depends_on:
- db
networks:
- net
restart: unless-stopped
profiles:
- production
db:
image: postgres:16-alpine
container_name: database
environment:
POSTGRES_DB: app_db
POSTGRES_USER: app_user
POSTGRES_PASSWORD: app_password
healthcheck:
test: [ "CMD", "pg_isready", "-d", "${DB_DATABASE:-app}", "-U", "${DB_USER:-app}" ]
timeout: 5s
retries: 5
start_period: 60s
volumes:
- postgres_data:/var/lib/postgresql/data # Volumen para persistir los datos
networks:
- net
profiles:
- development
- production
volumes:
postgres_data:
driver: local
/var/www/html//var/www/html/public.If your Symfony app includes a deploy/ folder at the project root (mounted as /var/www/html/deploy inside the container), the image can automatically run custom commands on first run and on version changes.
Expected structure:
/deploy/ firstrun.cmds # commands executed ONLY once (first container start) updtrun.cmds # commands executed when the app version changes version # current app version (e.g. 1.0.0)
firstrun.cmds – runs only the first time the container starts with that volume (e.g. composer install, DB creation, initial migrations, seeds, etc.).
updtrun.cmds – runs only when deploy/version changes (e.g. migrations, cache warmup, data updates).
version – plain text file with any version string you like (1, 1.0.0, 2025-11-22, …).
To apply an update:
Change your code.
Update the value in deploy/version (for example 1.0.0 → 1.1.0).
Restart the container:
docker restart <container-name>
On restart, the entrypoint will:
Run firstrun.cmds only once (first ever start).
Run updtrun.cmds only when the version value changes.
Do nothing if the version is the same.
👤 Author Eidy EV < [email protected] > GitHub: @eidyev
If this project helps you, consider giving it a star ⭐ on GitHub.
More details in https://github.com/eidyev/symfony-webapp-server
Content type
Image
Digest
sha256:92c7c4b47…
Size
180.7 MB
Last updated
9 months ago
docker pull eidyev/symfony-webapp-server