Skip to content

This is a Symfony in Docker boilerplate project structure

Notifications You must be signed in to change notification settings

cangelozzi/symfony-docker-master

Repository files navigation

Symfony5 Docker Development Stack

This is a lightweight stack based on Alpine Linux for running Symfony 5 into Docker containers using docker-compose.

Build Status

Prerequisites

  • Docker
  • For Symfony5, we need at least php7.2

Container

Installing

run docker and connect to container:

 docker-compose up -d

install latest version of Symfony via composer:

# traditional web application, inside a folder/project called `symfony`
$ composer create-project symfony/website-skeleton symfony

or

# microservice, console application or API
$ composer create-project symfony/skeleton .

modify your DATABASE_URL config in .env

DATABASE_URL=mysql://root:root@mysql:3306/symfony?serverVersion=5.7

call localhost in your browser:

Install The Symfony MakerBundle

cd symfony composer require symfony/maker-bundle --dev

Handle db in Sequel Pro

Opening mySQL in the Terminal or in SequelPro, we need the below parameters:

Host: 0.0.0.0
Username: root
Password: root
Port: 3006

Configure Home Page

  • make a test controller which will create a view template, navigate to it.
  • Go inside symfony folder
  • php bin/console make:controller

Check route in Controller Annotation, and welcome to Symfony world.

About

This is a Symfony in Docker boilerplate project structure

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published