A sandbox for testing SmartyBundle features.
SmartyBundle is a Symfony2 bundle that provides integration for the Smarty3 template engine.
You can use this Docker-powered Symfony distribution if you want to check-out how Smarty plays with Symfony or when developing for SmartyBundle.
-
Start the container.
$ docker-compose up -d
-
Access your application via http://localhost/.
By default docker-compose.yml
uses the latest
tag name of the php image which corresponds to php7.0.
#
# Services definition
#
services:
php:
image: ${PROJECT_NAMESPACE}/${REPOSITORY_NAME}-php:latest
If you want a specific version of php, you can change it with one of those values: 5.6
, 7.0
or 7.1
. Example:
php:
image: ${PROJECT_NAMESPACE}/${REPOSITORY_NAME}-php:5.6
The default docker repository already provides the images for those php version. Otherwise you need to build them by yourself with:
$ ./bin/build
# Start containers.
$ docker-compose up -d
# Restart services.
$ docker-compose restart
# List containers.
$ docker-compose ps
# Start a terminal session for <container_name>.
$ docker exec -it <container_name> /bin/bash
# View logs.
$ docker-compose logs
# List/remove network.
$ docker network [ ls | rm <network_name> ]
# List/remove volumes.
$ docker volume [ ls | rm <volume_name> ]
# Stop containers.
$ docker-compose stop
# Removes stopped service containers. Any data which is not in a volume will be lost.
$ docker-compose rm
-
How can I use Composer?
Run Composer through the
php
container:$ docker-compose run --rm php composer install
-
Can I use phpMyAdmin?
You can include
docker-compose.phpmyadmin.yml
with the other services. Run this:$ docker-compose -f docker-compose.yml -f docker-compose.phpmyadmin.yml up -d
Then go to http://localhost:8080/