Skip to content

Commit e9a56f3

Browse files
committed
re-add required Lagoon hosting info
1 parent 056bc18 commit e9a56f3

35 files changed

+2739
-11
lines changed

.lagoon.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,6 @@ tasks:
1010
# service: cli
1111

1212
post-rollout:
13-
- run:
14-
# If no DB, sync from Master branch.
15-
name: If no Drupal installed - get database from Master
16-
command: |
17-
if [[ ${LAGOON_GIT_SAFE_BRANCH} != "master" ]] && ! drush status --fields=bootstrap | grep -q "Successful"; then
18-
drush -y sql-sync @lagoon.master @self
19-
fi
20-
service: cli
21-
shell: bash
2213
- run:
2314
name: drush updb
2415
command: drush -y updb --cache-clear=0 || (drush cr && drush -y updb --cache-clear=0)

assets/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Place files in here that you want to add to your Drupal site. You will also need to add them to the extra/file-mapping section in composer.json.
2+
3+
As per https://www.drupal.org/docs/develop/using-composer/using-drupals-composer-scaffold
4+
e.g.
5+
```
6+
"file-mapping": {
7+
"[web-root]/sites/default/all.settings.php": "assets/all.settings.php"
8+
},
9+
```
10+
11+
12+
13+
Settings files are loaded in this order:
14+
* _Loaded by amazeeio/drupal-integrations_
15+
- settings.php
16+
- settings.lagoon.php
17+
* _For settings and services that should be applied to all environments (dev, prod, staging, docker, etc)._
18+
- all.settings.php
19+
- all.services.yml
20+
* _For settings and services that should be applied only for the production environment._
21+
- production.settings.php
22+
- production.services.yml
23+
* _For settings and services that should be applied only for the development (Lagoon and local) environments._
24+
- development.settings.php
25+
- development.services.yml
26+
* _For settings and services only for the local environment, these files will not be committed in Git!_
27+
- settings.local.php
28+
- services.local.yml

assets/all.settings.php

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?php
2+
/**
3+
* @file
4+
* amazee.io Drupal all environment configuration file.
5+
*
6+
* This file should contain all settings.php configurations that are needed by all environments.
7+
*
8+
* It contains some defaults that the amazee.io team suggests, please edit them as required.
9+
*/
10+
11+
// Defines where the sync folder of your configuration lives. In this case it's inside
12+
// the Drupal root, which is protected by amazee.io Nginx configs, so it cannot be read
13+
// via the browser. If your Drupal root is inside a subfolder (like 'web') you can put the config
14+
// folder outside this subfolder for an advanced security measure: '../config/sync'.
15+
$settings['config_sync_directory'] = '../config/sync';
16+
17+
if (getenv('LAGOON_ENVIRONMENT_TYPE') !== 'production') {
18+
/**
19+
* Skip file system permissions hardening.
20+
*
21+
* The system module will periodically check the permissions of your site's
22+
* site directory to ensure that it is not writable by the website user. For
23+
* sites that are managed with a version control system, this can cause problems
24+
* when files in that directory such as settings.php are updated, because the
25+
* user pulling in the changes won't have permissions to modify files in the
26+
* directory.
27+
*/
28+
$settings['skip_permissions_hardening'] = TRUE;
29+
}

composer.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
}
3333
},
3434
"require": {
35+
"amazeeio/drupal_integrations": "^0.3.7",
3536
"bower-asset/lazysizes": "^5.3",
3637
"composer/installers": "^2.0",
3738
"cweagans/composer-patches": "^1.7",
@@ -144,12 +145,16 @@
144145
"extra": {
145146
"composer-exit-on-patch-failure": true,
146147
"drupal-scaffold": {
148+
"allowed-packages": [
149+
"amazeeio/drupal_integrations"
150+
],
147151
"gitignore": false,
148152
"locations": {
149153
"web-root": "docroot/"
150154
},
151155
"file-mapping": {
152-
"[web-root]/robots.txt": false
156+
"[web-root]/robots.txt": false,
157+
"[web-root]/sites/default/all.settings.php": "assets/all.settings.php"
153158
}
154159
},
155160
"enable-patching": true,

composer.lock

Lines changed: 55 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docker-compose.yml

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
version: '2.3'
2+
3+
x-lagoon-project:
4+
# Lagoon project name (leave `&lagoon-project` when you edit this)
5+
&lagoon-project drupal_ch
6+
7+
x-volumes:
8+
&default-volumes
9+
# Define all volumes you would like to have real-time mounted into the docker containers
10+
volumes:
11+
- .:/app:delegated
12+
13+
x-environment:
14+
&default-environment
15+
LAGOON_PROJECT: *lagoon-project
16+
# Route that should be used locally
17+
LAGOON_ROUTE: http://drupal-ch.docker.amazee.io
18+
# Uncomment if you like to have the system behave like in production
19+
#LAGOON_ENVIRONMENT_TYPE: production
20+
# Uncomment to enable xdebug and then restart via `docker-compose up -d`
21+
#XDEBUG_ENABLE: "true"
22+
23+
24+
services:
25+
26+
cli: # cli container, will be used for executing composer and any local commands (drush, drupal, etc.)
27+
build:
28+
context: .
29+
dockerfile: lagoon/cli.dockerfile
30+
image: *lagoon-project # this image will be reused as `CLI_IMAGE` in subsequent Docker builds
31+
labels:
32+
# Lagoon Labels
33+
lagoon.type: cli-persistent
34+
lagoon.persistent.name: nginx # mount the persistent storage of nginx into this container
35+
lagoon.persistent: /app/docroot/sites/default/files/ # location where the persistent storage should be mounted
36+
<< : *default-volumes # loads the defined volumes from the top
37+
volumes_from: # mount the ssh-agent from the pygmy or cachalot ssh-agent
38+
- container:amazeeio-ssh-agent
39+
environment:
40+
<< : *default-environment # loads the defined environment variables from the top
41+
ports:
42+
- "1234" # exposes the port 1234 with a random local port, find it with `docker-compose port cli 1234`
43+
extra_hosts:
44+
- "drupal-ch.docker.amazee.io:172.17.0.1"
45+
46+
nginx:
47+
build:
48+
context: .
49+
dockerfile: lagoon/nginx.dockerfile
50+
args:
51+
CLI_IMAGE: *lagoon-project # Inject the name of the cli image
52+
labels:
53+
lagoon.type: nginx-php-persistent
54+
lagoon.persistent: /app/docroot/sites/default/files/ # define where the persistent storage should be mounted too
55+
<< : *default-volumes # loads the defined volumes from the top
56+
depends_on:
57+
- cli # basically just tells docker-compose to build the cli first
58+
environment:
59+
<< : *default-environment # loads the defined environment variables from the top
60+
LAGOON_LOCALDEV_URL: nginx.drupal-ch.docker.amazee.io # generate another route for nginx, by default we go to varnish
61+
networks:
62+
- amazeeio-network
63+
- default
64+
65+
php:
66+
build:
67+
context: .
68+
dockerfile: lagoon/php.dockerfile
69+
args:
70+
CLI_IMAGE: *lagoon-project
71+
labels:
72+
lagoon.type: nginx-php-persistent
73+
lagoon.name: nginx # we want this service be part of the nginx pod in Lagoon
74+
lagoon.persistent: /app/docroot/sites/default/files/ # define where the persistent storage should be mounted too
75+
<< : *default-volumes # loads the defined volumes from the top
76+
depends_on:
77+
- cli # basically just tells docker-compose to build the cli first
78+
environment:
79+
<< : *default-environment # loads the defined environment variables from the top
80+
81+
82+
mariadb:
83+
image: amazeeio/mariadb-drupal
84+
labels:
85+
lagoon.type: mariadb
86+
ports:
87+
- "3306" # exposes the port 3306 with a random local port, find it with `docker-compose port mariadb 3306`
88+
environment:
89+
<< : *default-environment
90+
91+
## Uncomment for Redis
92+
# redis:
93+
# image: amazeeio/redis
94+
# labels:
95+
# lagoon.type: redis
96+
# environment:
97+
# << : *default-environment
98+
99+
## Uncomment for Solr
100+
# solr:
101+
# image: amazeeio/solr:6.6-drupal
102+
# labels:
103+
# lagoon.type: solr
104+
# ports:
105+
# - "8983" # exposes the port 8983 with a random local port, find it with `docker-compose port solr 8983`
106+
# environment:
107+
# << : *default-environment
108+
109+
varnish:
110+
image: amazeeio/varnish-drupal
111+
labels:
112+
lagoon.type: varnish
113+
links:
114+
- nginx # links varnish to the nginx in this docker-compose project, or it would try to connect to any nginx running in docker
115+
environment:
116+
<< : *default-environment
117+
VARNISH_BYPASS: "true" # by default we bypass varnish, change to 'false' or remove in order to tell varnish to cache if possible
118+
networks:
119+
- amazeeio-network
120+
- default
121+
122+
networks:
123+
amazeeio-network:
124+
external: true

docroot/modules/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/README.txt

docroot/profiles/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/README.txt

docroot/sites/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/README.txt
2+
/development.services.yml
3+
/example.settings.local.php
4+
/example.sites.php

docroot/sites/default/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/default.services.yml
2+
/default.settings.php

0 commit comments

Comments
 (0)