Please ensure there is no similar service are running on the same ports on your host machine before start running the containers; after successfully cloning the repository, you should see a folder named docfony; please go inside the docfony and follow the rest of the document:
$ git clone https://github.com/impixel/docfony.git
$ cd docfony
For Stable version; please download the archive version of latest stable release of Docfony from Releases tab on Github
If you are novice to Docker, you could use Makefile
to get your environment up and running by:
$ make help
In order to build the images and create the containers please run:
$ make build
$ make up
Docker daemon starts to download and build the required images to run your Symfony application. During process docker will create three virtual volumes for data presistency for both databases MySQL and Mongo:
/var/lib/mysql
/data/db
/data/configdb
/data
For development purpose volume for Symfony application is shared with your machine (Host) and is accessible via folder outside of docfony, called project. This shall become a virtual volume in production In addition to virtual volumes, Docker will also creates a network with bridge driver named
docfony_symfony_dev
to make the containers to communicate with each other
Please execute make file at the root of Docfony as presented below:
$ make php
to automatically enter inside the PHP container with tty access (bash), now you can install your symfony application.
root@2ecca:/var/www#: composer create-project symfony/skeleton project
Please Note Project name must be
project
as illustrated above due to NGINX path configuration.
Composer will download the necessary packages for your Symfony application and now you can view the app via your browser from following URL:
http://localhost
, you may also view your application via virtual host domain: http://docfony.docker
Please Note you need to add
docfony.docker
assigned to127.0.0.1
on your host machine (Mac/Linux in /etc/hosts and for Windows via Firewall settings)
Example of parameters being asked during Symfony installation below:
parameters:
database_host: mysql
database_port: 3308
database_name: symfony
database_user: root
database_password: null
mailer_transport: smtp
mailer_host: php
mailer_user: null
mailer_password: null
secret: f0379aa3b94f435c057060d21e7afb10
You may use GUI applications to manage your database by specifying mysql
or mongo
as a host
and specified port in docker-compose.yml
. Please use following to connect to MySQL, Mongo Database
and Xdebug via your machine:
Please Note you may also use IP address
127.0.0.1
as a host for each service instead.
In order to quit and remove containers run the following make command:
$ make down
You can view and edit your codes via project
folder outside of docfony
and change
on your machine will be synchronised with running containers.
Please Note make sure your containers are running while you are making changes to your project to ensure data persistency all across containers with the host machine
If you found an issue, please use git issues to report and if you wish to contribute to this project feel free to fork and create a pull request to the develop branch
Disclaimer: Please don't use this to deploy in production, this project been built for Symfony enthusiasts to attract more contributors and prospect companies whom wish to give an enterprise level PHP Framework a quick try, without a worry of configuration and installation of required packages
Built with ❤️ and maintained at beautiful London
Regarding licensing and version of please visit: Creative Commons License or read through license file LICENSE.md
included in the repository.