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
Clone this repository on your local computer and run the docker compose on your terminal.
34
+
33
35
```shell
34
36
git clone https://github.com/andreipa/docker-lamp
35
37
cd docker-lamp/
36
38
git fetch --all
37
39
docker-compose up -d --build
38
40
```
39
-
You can access your LAMP stack via `http://localhost` or `http://app1.test`
41
+
42
+
You can access your LAMP stack via `http://localhost` or `http://app1.local`
43
+
44
+
> You need to modify your hosts file. [How to Edit the Hosts File?](https://gist.github.com/andreipa/47ce0679d1905883c18b9ac3a1a9a8f6)
40
45
41
46
### Configuration
42
47
43
-
This package comes with default configuration options. You can modify them by editing the Dockerfile inside the folders `./bin/mysql` and `./bin/webserver`. The variables are contained in the default **Environment file**`./.env` - you *must* run `doocker-compose` command from the project root, otherwise the file is ignored.
48
+
This package comes with default configuration options. You can modify them by editing the Dockerfile inside the folders `./bin/mysql` and `./bin/webserver`. The variables are contained in the default **Environment file**`./.env` - you _must_ run `doocker-compose` command from the project root, otherwise the file is ignored.
44
49
45
50
#### Environment Variables
46
51
47
-
*`DOCUMENT_ROOT` - The document root for the Apache server. The default value is `./www`. All your sites will go here and will be synced automatically. You can create subfolders for each project.
48
-
*`VHOSTS_DIR` - The virtual hosts. The default value for this is `./config/vhosts.` You can place your virtual hosts conf files here.
49
-
*`APACHE_LOG_DIR` - This will be used to store Apache logs. The default value for this is `./logs/apache2`.
50
-
*`MYSQL_LOG_DIR` - This will be used to store Apache logs. The default value for this is `./logs/mysql`.
51
-
*`MYSQL_DATA_DIR` - This is MySQL data directory. The default value for this is `./data/mysql`. All your MySQL data files will be stored here.
52
-
*`PHP_INI` - The file php.ini with custom configuration. You can customise as you need and saving it at `./config/php/`.
52
+
-`DOCUMENT_ROOT` - The document root for the Apache server. The default value is `./www`. All your sites will go here and will be synced automatically. You can create subfolders for each project.
53
+
-`VHOSTS_DIR` - The virtual hosts. The default value for this is `./config/vhosts.` You can place your virtual hosts conf files here.
54
+
-`APACHE_LOG_DIR` - This will be used to store Apache logs. The default value for this is `./logs/apache2`.
55
+
-`MYSQL_LOG_DIR` - This will be used to store Apache logs. The default value for this is `./logs/mysql`.
56
+
-`MYSQL_DATA_DIR` - This is MySQL data directory. The default value for this is `./data/mysql`. All your MySQL data files will be stored here.
57
+
-`PHP_INI` - The file php.ini with custom configuration. You can customise as you need and saving it at `./config/php/`.
53
58
54
59
#### Database Environment Variables
55
60
56
-
*`DB_ROOT_PASSWORD` - The root password of the MySQL. Default `root`.
57
-
*`DB_USER` - Optional user name with superuser permissions. Default `user`.
58
-
*`DB_PASSWORD` - Optional password for the user. Default `root`.
61
+
-`DB_ROOT_PASSWORD` - The root password of the MySQL. Default `root`.
62
+
-`DB_USER` - Optional user name with superuser permissions. Default `user`.
63
+
-`DB_PASSWORD` - Optional password for the user. Default `root`.
59
64
60
65
## Containers
61
66
@@ -67,17 +72,17 @@ Apache is configured to run on port 80. So, you can access it via `http://localh
67
72
68
73
By default following modules are enabled.
69
74
70
-
* rewrite
71
-
* headers
75
+
- rewrite
76
+
- headers
72
77
73
78
> If you want to enable more modules. Just update `./bin/webserver/Dockerfile`.
74
79
75
-
#### Connect via SSH
80
+
#### Connect via bash
76
81
77
-
You can connect to web server using `docker exec` command to perform various operation on it. Use below command to login to container via ssh.
82
+
You can connect to web server using `docker exec` command to perform various operation on it. Use below command to login to container via bash.
78
83
79
84
```shell
80
-
docker exec -it de-v7.4.x-webserver /bin/bash
85
+
docker exec -it dev-7.4-webserver bash
81
86
```
82
87
83
88
### PHP
@@ -88,19 +93,19 @@ The installed version of PHP is 7.4
88
93
89
94
By default following extensions are installed.
90
95
91
-
* bcmath
92
-
* calendar
93
-
* curl
94
-
* exif
95
-
* gettext
96
-
* intl
97
-
* json
98
-
* imagick-3.4.4
99
-
* mysqli
100
-
* pdo_sqlite
101
-
* xdebug-3.0.1
102
-
* xml
103
-
* zip
96
+
- bcmath
97
+
- calendar
98
+
- curl
99
+
- exif
100
+
- gettext
101
+
- intl
102
+
- json
103
+
- imagick-3.4.4
104
+
- mysqli
105
+
- pdo_sqlite
106
+
- xdebug-3.0.3
107
+
- xml
108
+
- zip
104
109
105
110
> If you want to install more extension, just update `./bin/webserver/Dockerfile`.
106
111
@@ -114,10 +119,10 @@ http://localhost:8025
114
119
115
120
## Built With
116
121
117
-
*[Debian](https://www.debian.org/)
118
-
*[Composer](https://getcomposer.org/)
119
-
*[Browscap](https://browscap.org/)
120
-
*[MailHog](https://github.com/mailhog/MailHog)
122
+
-[Debian](https://www.debian.org/)
123
+
-[Composer](https://getcomposer.org/)
124
+
-[Browscap](https://browscap.org/)
125
+
-[MailHog](https://github.com/mailhog/MailHog)
121
126
122
127
## Using this LAMP stack to host a website
123
128
@@ -129,19 +134,19 @@ Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduc
129
134
130
135
## Versioning
131
136
132
-
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the
133
-
[tags on this repository](https://github.com/andreipa/docker-lamp/tags).
137
+
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the
138
+
[tags on this repository](https://github.com/andreipa/docker-lamp/tags).
0 commit comments