You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,5 +41,26 @@ You will see individual containers for PHP, MySql and Apache as shown below:
41
41
| 8294e1800058 | dockerize-existing-drupal-project_php | "docker-php-entrypoi…" | 33 seconds ago | Up 31 seconds | 9000/tcp | php |
42
42
| d8b2cbac5695 | mysql:8.0.0 | "docker-entrypoint.s…" | 33 seconds ago | Up 31 seconds | 0.0.0.0:3306->3306/tcp | mysql |
43
43
44
+
4. Now hit the http://localhost:80 in browser to ensure setup is successful. Along with the below output, you will also see phpinfo() output.
45
+
```
46
+
Congratulations!! Docker setup connection is successful.
47
+
Checking MySQL integration with php.
48
+
MySql connection is successful!
49
+
```
50
+
5. With the current setup you will get below versions but you can change it anytime in .env file.
51
+
```
52
+
PHP Version = 7.3.11
53
+
APACHE_VERSION = 2.4.41
54
+
MYSQL_VERSION = 8.0.0
55
+
```
56
+
6. Now put your codebase inside `docroot` folder that is pointed to `/var/www/html` in the PHP container. You can also see it using docker command as shown below:
57
+
```
58
+
docker exec -it 8294e1800058 /bin/sh
59
+
```
60
+
`8294e1800058` is PHP container id as shown in the above table.
61
+
62
+
7. Since the Drush and composer are already part of PHP docker image, you can simply import the database using drush.
44
63
64
+
8. This way the basic setup is done and you can change the composer file accordingly. In case any additional PHP library is needed, update the PHP docker file and rebuild the PHP Docker image.
0 commit comments