📂skeleton-docker-react-symfony
┣📦apps
┃┣ 📂back-symfony
┃┣ 📂front-react
┃┣ 📂logs
┃┣ 📂nginx
┃┗ 📂php-fpm
┣ 📜.env
┣ 📜.gitignore
┣ 📜Makefile
┗ 📜README.md
- Windows: WSL2 & Docker Desktop
- Linux / Max: Docker
git clone https://github.com/AlexisChup/skeleton-docker-react-symfony.git
cd skeleton-docker-react-symfony
rm .git
folder- Rename folder
skeleton-docker-react-symfony
with your project's name git init
to create a new git repository- Generate APP_SECRET in both .env
📂skeleton-docker-react-symfony
┣📦apps
┃┣ 📂back-symfony
┃┃┗ 📜.env
┃┣📜.env
- Update
DATABASE_URL
in
📂skeleton-docker-react-symfony
┣📦apps
┃┣📜.env
- Edit database name (
POSTGRES_DB
), for db service, underenvironment
line 10 in:
📂skeleton-docker-react-symfony
┃┣📜docker-compose.yaml
- Return to root of the project
- Build Docker Images
make runbuild
- Wait few minutes, the 1st build might take some times
- Generate the SSL keys
-
- Run
docker exec -it php-fpm sh
- Run
-
- Run
php bin/console lexik:jwt:generate-keypair
- Run
- Load Fixtures
-
- Run
php bin/console doctrine:fixtures:load
- Run
- Open browser at http://localhost:9090
- React app should display a form for testing backend integration
- Try to fill in and submit the form
- New product should appear on the right
- If ok, you are now ready to create awesome projects ! ✅
- You can delete § Installation in the README.md file
make runbuild
- Wait few minutes, the 1st build might take some times
- Generate the SSL keys
-
- Run
docker exec -it php-fpm sh
- Run
-
- Run
php bin/console lexik:jwt:generate-keypair
- Run
- Load Fixtures
-
- Run
php bin/console doctrine:fixtures:load
- Run
- Open browser at http://localhost:9090
- Run containers:
make run
- Wait about few seconds until containers are started
- Open browser at http://localhost:9090
- Run
make stop
- Run
docker exec -it php-fpm sh
- Run
php bin/console doctrine:fixtures:load
- Run
docker exec -it php-fpm sh
- Run
php bin/console make:entity
- Run
php bin/console make:migration
- Run
php bin/console doctrine:migrations:migrate
- Run
docker exec -it php-fpm sh
- Run
php bin/console make:entity
- Run
php bin/console make:controller XXXXController
See SymfonyDoc for more
- react-bootstrap
- react-icons
- react-redux
- react-router-dom
- react-toastify
- Run
docker exec -it front-react sh
- Run
npm install my-lib