Skip to content

Docker setup for start working with symfony4 and mysql, with phpmyadmin and maildev

License

Notifications You must be signed in to change notification settings

pjam/docker-symfony4-mysql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Symfony 4.1 Docker setup

This project provides a complete stack to easily start developing a Symfony 4.1 project using Docker.
It has a database (MySQL), phpMyAdmin, SMTP server for development with web interface (Maildev) and allows using Xdebug.

Installation and Setup

First, clone the repository and enter the project folder:

$ git clone [email protected]:pjam/docker-symfony4-mysql.git
$ cd docker-symfony4-mysql

Then, create and build all the needed images and containers and start them

bin/docker build
bin/docker start

After the images finish building and the containers, you should be able to see the Symfony welcome page in your browser at

http://localhost:8080

You can also access phpMyAdmin and the Maildev web interface, respectively at:

http://localhost:8000
http://localhost:8001

Usage/Commands

Docker

# Build images
$ bin/docker build

# Start the containers
$ bin/docker start

# Stop the containers
$ bin/docker stop

CLI

# Access the Container Shell
$ bin/cli

Console

# You can run Symfony console commands without entering the container
# For example, create an entity:
$ bin/console make:entity

Composer

# To install/updates packages in your projects without having to install Composer on your machine
# use the composer script:
$ bin/composer require symfony/webpack-encore-pack

xdebug

# enable xdebug
$ bin/xdebug enable

# disable xdebug
$ bin/xdebug disable

For a complete list of available commands, go here.

Remarks

  • This project is intended for development. It is not prepared for production
  • Tested on Ubuntu 16.04 and Windows 10 with Ubuntu linux subsystem, with Docker 18.06
  • Feel free to improve it on your own or even contribute, with your pull requests

About

Docker setup for start working with symfony4 and mysql, with phpmyadmin and maildev

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published