Skip to content

Commit 715e92b

Browse files
committed
Update README.md due to latest changes
1 parent 91da633 commit 715e92b

File tree

1 file changed

+17
-18
lines changed

1 file changed

+17
-18
lines changed

README.md

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,49 +2,48 @@
22
Docker compose environment for Symfony (also works for Laravel or plain PHP) projects
33

44
# Summary of what is included
5-
* PHP 8.1.2 with XDEBUG 3.1.3
5+
* PHP 8.2 with XDEBUG 3
66
* Apache2
77
* MySQL 8.0
88
* PhpMyAdmin - manage MySQL
9-
* Mailhog - local mailing server to test emails
10-
* Installs `composer` and `symfony` commands
9+
* Mailhog - local mailing server
10+
* Installs `composer` command
1111
* Virtualhost configuration dedicated for Symfony projects
12-
* Latest stable NPM and Yarn
13-
* Latest stable Node.js
1412

1513
# How to install this in my project?
1614

17-
* Download `.docker` folder and `docker-compose.yml` file and add them to your project (Don't download `.github` folder)
18-
* Run `docker-compose up` command from your terminal. [(Install docker compose)](https://docs.docker.com/compose/install/)
15+
* Download `.docker` folder and `docker-compose.yml` file and add them to your project (Skip `.github` and `public` folders)
16+
* Run `docker compose up` command from your terminal. [(Install docker compose)](https://docs.docker.com/compose/install/)
1917

2018
# How to access everything?
2119

2220
By default you can access services via:
23-
* Access your project website via - http://192.168.2.2/
24-
* MySQL can be accessed via 192.168.2.3:3306
25-
* PhpMyAdmin can be accessed via http://192.168.2.4/
26-
* Mailhog can be accessed via http://192.168.2.5:8025/
21+
* Access your project website via - http://localhost/
22+
* MySQL can be accessed via localhost:3306
23+
* PhpMyAdmin can be accessed via http://localhost:81
24+
* Mailhog can be accessed via http://localhost:8025/
2725
* Access docker apache-php terminal by writing - `docker exec -it project_web bash`
2826

2927
# Modifying .env file (If you are using Symfony)
3028

3129
If you use default IP addresses, append your `.env` file with the following:
3230

33-
* For database connection -`DATABASE_URL=mysql://project:project@192.168.2.3:3306/project`
34-
* For mailing server - `MAILER_URL=mailhog:1025//randomemail@gmail.com:randompassword` (You don't need to change email or password)
31+
* For database connection -`DATABASE_URL=mysql://project:project@mysql:3306/project`
32+
* For mailing server - `MAILER_URL=mailhog:1025//randomemail@gmail.com:randompassword` (You can you any email and password)
3533

3634
# MySQL
3735

38-
* If you haven't modified IP addresses, you can connect to your MySQL via 192.168.2.3:3306
39-
* If you don't have any additional software, you can connect to database via phpmyadmin (http://192.168.2.4/)
40-
* Nickname: `project`
36+
* You can connect to your MySQL via `localhost:3306`
37+
* If you don't have any additional software, you can connect to database via phpmyadmin (http://localhost:81)
38+
* Username: `project`
4139
* Password: `project`
4240
* Default table is called `project`
4341

4442
# Notes and common issues
4543

46-
* You cannot use same configuration for multiple projects. Docker won't allow you to allocate same IP addresses for multiple containers.
47-
* You would need to modify `docker-compose.yml` IP addresses. For example from `192.168.2.0/24` to `192.168.3.0/24`
44+
* I use this configuration on `Windows 11` with `WSL 2`
45+
* You cannot use same `container_name` for multiple projects. Make sure to change them, or you can just delete that optional argument from `docker-compose.yml` file
46+
* You can't run multiple projects that allocate same ports on your localhost.
4847
* If you can't compose a new project, you might need to delete your old docker networks. Type `docker network ls` and then remove your old project network by writing `docker network rm NETWORK_ID` (for example `docker network rm 528d8c753c17`)
4948
* `cannot start service XXX: network YYY not found`. Open up container list with `docker container ls -a` and remove old containers with `docker container rm ID`.
5049

0 commit comments

Comments
 (0)