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
Choose PHP version by modifying the name of the image:
72
+
5\.Choose PHP version by modifying the name of the image:
70
73
```yml
71
74
image: wodby/drupal-php:7.0 # Allowed: 7.0, 5.6
72
75
```
73
76
74
-
5\. Update database credentials in your settings.php file:
77
+
6\. Update database credentials in your settings.php file:
75
78
```
76
79
database: drupal
77
80
username: drupal
78
81
password: drupal
79
82
host: mariadb
80
83
```
81
84
82
-
6\. If you want to import your database, uncomment the following line in the compose file:
85
+
7\. If you want to import your database, uncomment the following line in the compose file:
83
86
```yml
84
87
# - ./docker-runtime/mariadb-init:/docker-entrypoint-initdb.d # Place init .sql file(s) her
85
88
```
86
89
87
90
Create the volume directory `./docker-runtime/mariadb-init` in the same directory as the compose file and put there your SQL file(s). All SQL files will be automatically imported once MariaDB container has started.
88
91
89
-
7\. Now, let's run the compose file. It will download the images and run the containers:
92
+
8\. If you need to deploy one of the optional containers ([Redis](#redis), [Memcached](#memcached), [Apache Solr](#apache-solr)) uncomment the corresponding lines in the compose file.
93
+
94
+
9\. Now, let's run the compose file. It will download the images and run the containers:
90
95
```bash
91
96
$ docker-compose up -d
92
97
```
93
98
94
-
8\. Make sure all containers are running by executing:
99
+
10\. Make sure all containers are running by executing:
95
100
96
101
```bash
97
102
$ docker-compose ps
98
103
```
99
104
100
-
9\. That's it! You drupal website should be up and running at http://localhost:8000.
105
+
11\. That's it! You drupal website should be up and running at http://localhost:8000.
106
+
107
+
## Containers
108
+
109
+
### Accessing containers
110
+
111
+
You can connect to any container by executing the following command:
112
+
```bash
113
+
$ docker-compose exec php sh
114
+
```
115
+
116
+
Replace `php` with the name of your service (e.g. `mariadb`, `nginx`, etc).
117
+
118
+
### PHP
119
+
120
+
Currently PHP version 5.6 and 7 are provided. Check out [the instructions (step 5)](#instructions) to learn how to switch the version.
101
121
102
-
## Drush
122
+
####Drush
103
123
104
124
PHP container has installed drush. When running drush make sure to open the shell as user 82 (www-data) to avoid access problems in the web server, which is running as user 82, too:
By default, container with mailhog included in the bundle. It will catch all email sent from the PHP container. You can view emails by visiting its admin UI on localhost:8002.
189
211
190
-
## phpMyAdmin
212
+
###phpMyAdmin
191
213
192
214
By default, container with phpMyAdmin included in the bundle. You can accessit by localhost:8001
193
215
194
-
## Apache Solr
216
+
###Apache Solr
195
217
196
218
To spin up a container with Apache Solr search engine uncomment lines with solr service definition in the compose file. Use volume directory `./docker-runtime/solr` to access configuration files. Solr admin UI can be accessed by localhost:8003
197
219
198
-
## Accessing containers
199
-
200
-
You can connect to any container by executing the following command:
201
-
```bash
202
-
$ docker-compose exec php sh
203
-
```
204
-
205
-
Replace `php` with the name of your service (e.g. `mariadb`, `nginx`).
206
-
207
220
## Logs
208
221
209
222
To get logs from a container simply run (skip the last param to get logs form all the containers):
@@ -216,21 +229,15 @@ Example: real-time logs of the PHP container:
216
229
$ docker-compose logs -f php
217
230
```
218
231
219
-
## Updating
232
+
## Status
233
+
234
+
We're actively working on this instructions and containers. More options will be added soon. If you have a feature request or found a bug please submit an issue.
220
235
221
236
We update containers from time to time, to get the lastest changes simply run again:
222
237
```
223
238
$ docker-compose up -d
224
239
```
225
240
226
-
## Status
227
-
228
-
We're actively working on this instructions and containers. More options will be added soon. If you have a feature request or found a bug please sumbit an issue.
229
-
230
-
## Troubleshooting
231
-
232
-
In case you have any problems submit an issue or contact us at hello [at] wodby.com.
233
-
234
241
## Going beyond local machine
235
242
236
243
Check out <ahref="https://wodby.com"target="_blank">Wodby</a> if you need optimized consistent docker-based environment for Drupal on your dev/staging or production servers.
0 commit comments