Skip to content

Commit 1b1752a

Browse files
authored
uses drupal console instead of drush (GoogleCloudPlatform#184)
* uses drupal console instead of drush
1 parent 627f249 commit 1b1752a

File tree

9 files changed

+1200
-205
lines changed

9 files changed

+1200
-205
lines changed

appengine/flexible/drupal8/Dockerfile

Lines changed: 0 additions & 6 deletions
This file was deleted.

appengine/flexible/drupal8/README.md

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,22 @@ Before setting up Drupal 8 on Managed VMs, you will need to complete the followi
1717

1818
### Download
1919

20-
Use the [Drupal 8 Console][4] to install a drupal project with the following command:
20+
Use the [Drupal 8 Drush CLI][4] to install a drupal project. This can be installed locally
21+
by running `composer install` in this directory:
2122

2223
```sh
23-
drupal site:new PROJECT_NAME 8.0.0
24+
composer install
25+
./vendor/bin/drush
2426
```
2527

26-
Alternatively, you can download a compressed file from the [Drupal Website][5].
28+
Now you can run the command to download drupal:
29+
30+
```sh
31+
cd /path/to/drupal
32+
/path/to/drush dl drupal
33+
```
34+
35+
Alternatively, you can download a compressed file of Druapl 8 from the [Drupal Website][5].
2736

2837
### Installation
2938

@@ -34,17 +43,14 @@ Alternatively, you can download a compressed file from the [Drupal Website][5].
3443
```
3544
Open [http://localhost:8080](http://localhost:8080) in your browser after running these steps
3645

37-
1. **BETA** You can also try setting up your Drupal 8 instance using the [Drupal 8 Console][4]
46+
1. You can also try setting up your Drupal 8 instance using [Drush][4]
3847
```sh
3948
cd /path/to/drupal
40-
drupal site:install \
41-
--langcode en \
42-
--db-type mysql \
43-
--db-name DATABASE_NAME
44-
--db-user DATABASE_USERNAME
45-
--db-pass DATABASE_PASSWORD
46-
--site-name 'My Drupal Site On Google' \
47-
--site-mail [email protected] \
49+
/path/to/drush site-install \
50+
--locale=en \
51+
--db-path=mysql://user@pass:host/db_name \
52+
--site-name='My Drupal Site On Google' \
53+
4854
--account-name admin \
4955
--account-mail [email protected] \
5056
--account-pass admin
@@ -64,13 +70,12 @@ git clone https://github.com/GoogleCloudPlatform/php-docs-samples /path/to/php-d
6470
cd /path/to/php-docs-samples/
6571

6672
# copy the four files below to the root directory of your Drupal project
67-
cp managed_vms/drupal8/{app.yaml,php.ini,Dockerfile,nginx-app.conf} /path/to/drupal
73+
cp managed_vms/drupal8/{app.yaml,php.ini,nginx-app.conf} /path/to/drupal
6874
```
6975

7076
The four files needed are as follows:
7177

7278
1. [`app.yaml`](app.yaml) - The App Engine configuration for your project
73-
1. [`Dockerfile`](Dockerfile) - Container configuration for the PHP runtime
7479
1. [`php.ini`](php.ini) - Optional ini used to extend the runtime configuration.
7580
1. [`nginx-app.conf`](nginx-app.conf) - Nginx web server configuration needed for `Drupal 8`
7681

@@ -80,19 +85,20 @@ For now, you need to disable the CSS and JS preprocessed caching that Drupal 8 e
8085
To do this, go to `/admin/config/development/performance` and deselect the two
8186
chechboxes (`Aggregate CSS files` and `Aggregate JS files`) under **Bandwidth Optimizations**.
8287

83-
Alternatively, you can use the [Drupal 8 Console][4] to change this config setting:
88+
Alternatively, you can use [Drush][4] to change this config setting:
8489

8590
```sh
8691
# this command must be run inside the root directory of a drupal project
8792
$ cd /path/to/drupal
88-
# this will expand your text editor
89-
$ drupal config:edit system.performance
93+
$ /path/to/drush pm-enable config -y
94+
$ /path/to/drush config-set system.performance css.preprocess 0
95+
$ /path/to/drush config-set system.performance js.preprocess 0
9096
```
9197

92-
Change the values `preprocess` under `css` and `js` to `false`.
98+
This will change the values `preprocess` under `css` and `js` to `false`.
9399

94100
[1]: https://cloud.google.com/appengine/docs/managed-vms/
95101
[2]: https://console.cloud.google.com
96102
[3]: https://cloud.google.com/sql/docs/getting-started
97-
[4]: https://www.drupal.org/project/console
103+
[4]: http://docs.drush.org/en/master/install/
98104
[5]: https://www.drupal.org/8/download
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1-
runtime: custom
1+
runtime: php
22
vm: true
3+
4+
runtime_config:
5+
document_root: ""
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
{
2+
"require": {
3+
"drush/drush": "^8.1"
4+
},
25
"require-dev": {
36
"guzzlehttp/guzzle": "^6.2",
47
"monolog/monolog": "^1.19",
5-
"symfony/console": " ~2.6.0",
6-
"symfony/process": "^3.0",
7-
"symfony/yaml": "^3.0"
8+
"symfony/console": " ^2.7",
9+
"symfony/process": "^3.0"
810
}
911
}

0 commit comments

Comments
 (0)