Skip to content

noiselabs/smarty-bundle-sandbox

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SmartyBundle Sandbox

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.

Gitter

nginx mysql php5.6 php7.0 php7.1

Usage

  1. Start the container.

    $ docker-compose up -d
  2. Access your application via http://localhost/.

Choose a different version of php

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

Useful docker commands

# 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

F.A.Q.

  • 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/

Wiki

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 62.7%
  • CSS 32.5%
  • PHP 3.7%
  • Other 1.1%