Based on Symfony Docker by Dunglas
- WSL
- Docker (Docker Desktop on Windows, windows only)
- Make (Wsl)
- Git
(cmd admin mode) : wsl --install Debian
=> Reboot
https://docs.docker.com/desktop/windows/wsl/
=> Reboot
https://chocolatey.org/install
Execute in cmd (with privileges admin !) :
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
Then : "choco install make"Then : "choco install git"
- Make
- Docker (Not Docker Desktop)
- Git
Use button "Use this template" from https://github.com/Respawnsive/docker-symfony-skeleton
git clone [URI.git]
Or
Use PhpStorm
// First Clone the repo ! (PhpStorm or Git Clone)
=> chrome://flags/#allow-insecure-localhost <<< you can ignore certificate error on chrome ;
- (Linux) in terminal ( in wsl ) : make up (need to install Make)
- (Windows) : docker-compose up -d
- open browser => https://localhost => if CSS/Js doesn't load => show source code of page => Then click https://localhost:8080/build/runtime.js , and accept certificate !
- mail info => http://localhost:1080/
- sql info => 127.0.0.1 , port 3306 , => user : root => !ChangeMeRootPassword! => database : main
Example (Linux) :
- in terminal : make sf c=make:entity
Example (Windows) :
- go in php container : php bin/console make:entity
=> Test env
docker compose down ; MARIADB_USER="userTest" MARIADB_PASSWORD="test" MARIADB_DATABASE="main_test" docker compose up -d
make test
=> Execute cmd with docker :
docker compose exec php bin/console
* go in container "node" => Yarn add --dev Module
=> https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/blob/master/Resources/doc/installation.rst (already installed)
=> https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/blob/master/Resources/doc/usage.rst
If the route is not up to date => restart the container "node"
** [WIP]
==> https://stackoverflow.com/questions/56577184/github-pull-changes-from-a-template-repository