|
2 | 2 |
|
3 | 3 | ## Prerequisites
|
4 | 4 |
|
5 |
| -- amazee.io local Docker development environment (https://docs.amazee.io/local_docker_development/local_docker_development.html) |
6 |
| -- Composer (http://getcomposer.org) |
7 |
| -- Yarn (http://yarnpkg.com) |
8 |
| -- Node (http://nodejs.org) |
| 5 | +- Docker |
| 6 | +- amazee.io/Lagoon local Docker development environment (http://lagoon.readthedocs.io/en/latest/using_lagoon/local_development_environments/) |
9 | 7 |
|
10 | 8 | ## Usage
|
11 | 9 |
|
12 | 10 | First, you need to clone this repository.
|
13 | 11 |
|
14 |
| -``` |
15 |
| -git clone git@github.com:fubhy/drupal-decoupled-app |
16 |
| -``` |
| 12 | + git clone git@github.com:drupal-graphql/drupal-decoupled-app.git |
17 | 13 |
|
18 |
| -Then, you need to install the dependencies. |
| 14 | +Then, you need to build the images |
19 | 15 |
|
20 |
| -``` |
21 |
| -cd backend && composer install |
22 |
| -cd frontend && yarn install |
23 |
| -``` |
| 16 | + docker-compose build |
24 | 17 |
|
25 |
| -Then, you need to boot the backend container. |
| 18 | +Then, start the containers: |
26 | 19 |
|
27 |
| -``` |
28 |
| -docker-compose up -d |
29 |
| -docker-compose exec --user drupal drupal bash |
30 |
| -``` |
31 | 20 |
|
32 |
| -Once connected to the container, you can now install Drupal. |
| 21 | + docker-compose up -d |
33 | 22 |
|
34 |
| -``` |
35 |
| -drush si config_installer -y --account-name=admin --account-pass=admin |
36 |
| -``` |
| 23 | +Once started, connect to the cli container of Drupal and install Drupal. |
37 | 24 |
|
38 |
| -Now you can create some content (basic page or article) and run the frontend application. |
| 25 | + docker-compose exec cli bash |
| 26 | + composer install |
| 27 | + drush si config_installer -y --account-name=admin --account-pass=admin |
39 | 28 |
|
40 |
| -``` |
41 |
| -yarn run dev |
42 |
| -``` |
| 29 | +Now you can create some content (basic page or article) within Drupal at http://drupal-varnish.drupal-decoupled-app.docker.amazee.io |
43 | 30 |
|
44 |
| -Navigating to http://localhost:3000 should present you with a paginated list of articles |
| 31 | +Navigating to http://drupal-decoupled-app.docker.amazee.io should present you with a paginated list of articles |
45 | 32 | and by navigation to the path of one of the nodes (basic page or article) you just
|
46 | 33 | created, you should see a simple teaser of that node.
|
47 | 34 |
|
48 |
| - |
49 |
| -### Development mode |
50 |
| - |
51 |
| -``` |
52 |
| -yarn run dev |
53 |
| -``` |
54 |
| - |
55 |
| -### Production mode |
56 |
| - |
57 |
| -``` |
58 |
| -yarn run build && yarn run start |
59 |
| -``` |
60 |
| - |
61 | 35 | ## License
|
62 | 36 |
|
63 | 37 | This project is licensed under the MIT license, Copyright (c) 2016 Sebastian Siemssen. For more information see LICENSE.md.
|
0 commit comments