Skip to content

Commit

Permalink
Merge pull request #1190 from dan2k3k4/update-dockerfile-naming
Browse files Browse the repository at this point in the history
Update Dockerfile naming convention to <purpose>.dockerfile
  • Loading branch information
Schnitzel authored Aug 28, 2019
2 parents 2818f92 + 0ead0d1 commit a143bcb
Show file tree
Hide file tree
Showing 80 changed files with 56 additions and 56 deletions.
8 changes: 4 additions & 4 deletions docs/using_lagoon/docker-compose_yml.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ services:
nginx:
build:
context: .
dockerfile: Dockerfile.nginx
dockerfile: nginx.dockerfile
labels:
lagoon.type: nginx-php-persistent
lagoon.persistent: /app/web/sites/default/files/
php:
build:
context: .
dockerfile: Dockerfile.php
dockerfile: php.dockerfile
labels:
lagoon.type: nginx-php-persistent
lagoon.name: nginx
Expand Down Expand Up @@ -101,7 +101,7 @@ An example:
web:
build:
context: .
dockerfile: Dockerfile.nginx
dockerfile: nginx.dockerfile
labels:
lagoon.type: nginx-php-persistent
lagoon.persistent: /app/web/sites/default/files/
Expand All @@ -110,7 +110,7 @@ An example:
phehaphe:
build:
context: .
dockerfile: Dockerfile.php
dockerfile: php.dockerfile
labels:
lagoon.type: nginx-php-persistent
lagoon.persistent: /app/web/sites/default/files/
Expand Down
4 changes: 2 additions & 2 deletions docs/using_lagoon/docker_images/nginx.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ By default nginx only serves static files - this can be used for static sites th
### redirects-map.conf
In order to create redirects we have the redirects-map.conf in place. This helps you to redirect marketing domains to subsites or do non-www to www redirects.
If you have a lot of redirects we suggest to have the `redirects-map.conf` stored next to your code for easier maintainability.
If you just have a few redirects there's a handy trick to create the redirects with a `RUN` command in your Dockerfile.nginx.
If you just have a few redirects there's a handy trick to create the redirects with a `RUN` command in your `nginx.dockerfile`.


Example for redirecting `www.example.com` to `example.com` and preserving the request.
Expand All @@ -28,7 +28,7 @@ RUN echo "~^www.example.com http://example.com\$request_uri;" >> /etc/

To get more details about the various types of redirects that can be achieved see the documentation within the [redirects-map.conf](https://github.com/amazeeio/lagoon/blob/master/images/nginx/redirects-map.conf) directly.

After you put the `redirects-map.conf` in place you also need to include it in your `Dockerfile.nginx` in order to get
After you put the `redirects-map.conf` in place you also need to include it in your `nginx.dockerfile` in order to get
the configuration file into your build.

```
Expand Down
6 changes: 3 additions & 3 deletions docs/using_lagoon/drupal/drupal7-mariadb/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ services:
cli: # cli container, will be used for executing composer and any local commands (drush, drupal, etc.)
build:
context: .
dockerfile: Dockerfile.cli
dockerfile: cli.dockerfile
image: *lagoon-project # this image will be reused as `CLI_IMAGE` in subsequent Docker builds
labels:
# Lagoon Labels
Expand All @@ -42,7 +42,7 @@ services:
nginx:
build:
context: .
dockerfile: Dockerfile.nginx
dockerfile: nginx.dockerfile
args:
CLI_IMAGE: *lagoon-project # Inject the name of the cli image
labels:
Expand All @@ -61,7 +61,7 @@ services:
php:
build:
context: .
dockerfile: Dockerfile.php
dockerfile: php.dockerfile
args:
CLI_IMAGE: *lagoon-project
labels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* - settings.development.php
* For settings only for the development environment (dev servers, docker).
* - settings.local.php
* For settings only for the local environment, this file will not be commited in GIT!
* For settings only for the local environment, this file will not be committed in GIT!
*/

// Lagoon Database connection.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ services:
cli: # cli container, will be used for executing composer and any local commands (drush, drupal, etc.)
build:
context: .
dockerfile: Dockerfile.cli
dockerfile: cli.dockerfile
image: *lagoon-project # this image will be reused as `CLI_IMAGE` in subsequent Docker builds
labels:
# Lagoon Labels
Expand All @@ -42,7 +42,7 @@ services:
nginx:
build:
context: .
dockerfile: Dockerfile.nginx
dockerfile: nginx.dockerfile
args:
CLI_IMAGE: *lagoon-project # Inject the name of the cli image
labels:
Expand All @@ -61,7 +61,7 @@ services:
php:
build:
context: .
dockerfile: Dockerfile.php
dockerfile: php.dockerfile
args:
CLI_IMAGE: *lagoon-project
labels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
* - production.services.yml
* For services only for the production environment.
* - development.settings.php
* For settings only for the development environment (devevlopment sites, docker).
* For settings only for the development environment (development sites, docker).
* - development.services.yml
* For services only for the development environment (devevlopment sites, docker).
* For services only for the development environment (development sites, docker).
* - settings.local.php
* For settings only for the local environment, this file will not be commited in GIT!
* For settings only for the local environment, this file will not be committed in GIT!
* - services.local.yml
* For services only for the local environment, this file will not be commited in GIT!
* For services only for the local environment, this file will not be committed in GIT!
*/

// Lagoon Database connection.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ services:
cli: # cli container, will be used for executing composer and any local commands (drush, drupal, etc.)
build:
context: .
dockerfile: Dockerfile.cli
dockerfile: cli.dockerfile
image: *lagoon-project # this image will be reused as `CLI_IMAGE` in subsequent Docker builds
labels:
# Lagoon Labels
Expand All @@ -42,7 +42,7 @@ services:
nginx:
build:
context: .
dockerfile: Dockerfile.nginx
dockerfile: nginx.dockerfile
args:
CLI_IMAGE: *lagoon-project # Inject the name of the cli image
labels:
Expand All @@ -61,7 +61,7 @@ services:
php:
build:
context: .
dockerfile: Dockerfile.php
dockerfile: php.dockerfile
args:
CLI_IMAGE: *lagoon-project
labels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
* - production.services.yml
* For services only for the production environment.
* - development.settings.php
* For settings only for the development environment (devevlopment sites, docker).
* For settings only for the development environment (development sites, docker).
* - development.services.yml
* For services only for the development environment (devevlopment sites, docker).
* For services only for the development environment (development sites, docker).
* - settings.local.php
* For settings only for the local environment, this file will not be commited in GIT!
* For settings only for the local environment, this file will not be committed in GIT!
* - services.local.yml
* For services only for the local environment, this file will not be commited in GIT!
* For services only for the local environment, this file will not be committed in GIT!
*/

// Lagoon Database connection.
Expand Down
2 changes: 1 addition & 1 deletion docs/using_lagoon/drupal/lagoonize.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ In order for Drupal to work with Lagoon we need to teach Drupal about Lagoon and
You find [these Files in our GitHub repository](https://github.com/amazeeio/lagoon/tree/master/docs/using_lagoon/drupal); the easiest way is to [download these files as a ZIP file](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/amazeeio/lagoon/tree/master/docs/using_lagoon/drupal) and copy them into your Git repository. For each Drupal version and database type you will find an individual folder. A short overview of what they are:

- `.lagoon.yml` - The main file that will be used by Lagoon to understand what should be deployed and many more things. This file has some sensible Drupal defaults, if you would like to edit or modify, please check the specific [Documentation for .lagoon.yml](/using_lagoon/lagoon_yml.md)
- `docker-compose.yml`, `.dockerignore` and `Dockerfile.*` - These files are used to run your Local Drupal Development environment, they tell docker which services to start and how to build them. They contain sensible defaults and many commented lines, it should be pretty much self describing. If you would like to find out more, see [Documentation for docker-compose.yml]()
- `docker-compose.yml`, `.dockerignore`, and `*.dockerfile` (or `Dockerfile`) - These files are used to run your Local Drupal Development environment, they tell docker which services to start and how to build them. They contain sensible defaults and many commented lines, it should be pretty much self describing. If you would like to find out more, see [Documentation for docker-compose.yml]()
- `sites/default/*` - These .php and .yml files teach Drupal how to communicate with Lagoon containers both locally and in production. It also provides an easy system for specific overrides in development and production environments. Unlike other Drupal hosting systems, Lagoon never ever injects Drupal Settings files into your Drupal. Therefore you can edit them to your wish. Like all other files they contain sensible defaults and some commented parts.
- `drush/aliases.drushrc.php` - These files are specific to Drush and tell Drush how to talk to the Lagoon GraphQL API in order to learn about all Site Aliases there are.
- `drush/drushrc.php` - Some sensible defaults for Drush Commands.
Expand Down
4 changes: 2 additions & 2 deletions docs/using_lagoon/drupal/services/solr.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ To implement schema customizations for Solr in your project look to how Lagoon [
```
build:
context: .
dockerfile: Dockerfile.solr
dockerfile: solr.dockerfile
```

* Place your schema files in your code repository, we typically like to use `.lagoon/solr`
* Create a Dockerfile.solr
* Create a solr.dockerfile

```
FROM amazeeio/solr:6.6
Expand Down
2 changes: 1 addition & 1 deletion docs/using_lagoon/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ Some Docker Images and Containers need additional customizations from the provid
| varnish-drupal | 5 | [varnish-drupal/Dockerfile](https://github.com/amazeeio/lagoon/blob/master/images/varnish-drupal/Dockerfile) |

All images are pushed to https://hub.docker.com/u/amazeeio.
We suggest to always use the latest tag (like `amazeeio/nignx:latest`) or unsuffixed images (like `amazeeio/node:10`), as they are kept up to date in terms of features and security. If you shall choose to use a specific Lagoon Version of an image like `amazeeio/nignx:v0.21.0` or `amazeeio/node:10-v0.21.0` it is your own responsibility to upgrade the version of the Images as soon as a new Lagoon Version is released!
We suggest to always use the latest tag (like `amazeeio/nginx:latest`) or unsuffixed images (like `amazeeio/node:10`), as they are kept up to date in terms of features and security. If you shall choose to use a specific Lagoon Version of an image like `amazeeio/nginx:v0.21.0` or `amazeeio/node:10-v0.21.0` it is your own responsibility to upgrade the version of the Images as soon as a new Lagoon Version is released!
14 changes: 7 additions & 7 deletions tests/files/drupal8-mariadb/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:
cli:
build:
context: .
dockerfile: Dockerfile.builder
dockerfile: builder.dockerfile
image: builder
labels:
lagoon.type: cli-persistent
Expand All @@ -21,7 +21,7 @@ services:
- default
build:
context: .
dockerfile: Dockerfile.varnish
dockerfile: varnish.dockerfile
labels:
lagoon.type: varnish
lagoon.name: varnish
Expand All @@ -33,7 +33,7 @@ services:
- default
build:
context: .
dockerfile: Dockerfile.nginx
dockerfile: nginx.dockerfile
labels:
lagoon.type: nginx-php-persistent
lagoon.persistent: /app/web/sites/default/files/
Expand All @@ -50,7 +50,7 @@ services:
php-myname:
build:
context: .
dockerfile: Dockerfile.php
dockerfile: php.dockerfile
labels:
lagoon.type: nginx-php-persistent
lagoon.persistent: /app/web/sites/default/files/
Expand All @@ -63,13 +63,13 @@ services:
mariadb:
build:
context: .
dockerfile: Dockerfile.mariadb
dockerfile: mariadb.dockerfile
labels:
lagoon.type: mariadb
redis:
build:
context: .
dockerfile: Dockerfile.redis
dockerfile: redis.dockerfile
labels:
lagoon.type: redis
solr:
Expand All @@ -78,7 +78,7 @@ services:
- default
build:
context: .
dockerfile: Dockerfile.solr
dockerfile: solr.dockerfile
labels:
lagoon.type: solr
networks:
Expand Down
8 changes: 4 additions & 4 deletions tests/files/drupal8-mariadb/web/sites/default/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
* - production.services.yml
* For services only for the production environment.
* - development.settings.php
* For settings only for the development environment (devevlopment sites, docker).
* For settings only for the development environment (development sites, docker).
* - development.services.yml
* For services only for the development environment (devevlopment sites, docker).
* For services only for the development environment (development sites, docker).
* - settings.local.php
* For settings only for the local environment, this file will not be commited in GIT!
* For settings only for the local environment, this file will not be committed in GIT!
* - services.local.yml
* For services only for the local environment, this file will not be commited in GIT!
* For services only for the local environment, this file will not be committed in GIT!
*
*/

Expand Down
14 changes: 7 additions & 7 deletions tests/files/drupal8-postgres/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:
cli:
build:
context: .
dockerfile: Dockerfile.builder
dockerfile: builder.dockerfile
image: builder
labels:
lagoon.type: cli-persistent
Expand All @@ -21,7 +21,7 @@ services:
- default
build:
context: .
dockerfile: Dockerfile.varnish
dockerfile: varnish.dockerfile
labels:
lagoon.type: varnish
lagoon.name: varnish
Expand All @@ -33,7 +33,7 @@ services:
- default
build:
context: .
dockerfile: Dockerfile.nginx
dockerfile: nginx.dockerfile
labels:
lagoon.type: nginx-php-persistent
lagoon.persistent: /app/web/sites/default/files/
Expand All @@ -49,7 +49,7 @@ services:
php:
build:
context: .
dockerfile: Dockerfile.php
dockerfile: php.dockerfile
labels:
lagoon.type: nginx-php-persistent
lagoon.persistent: /app/web/sites/default/files/
Expand All @@ -61,13 +61,13 @@ services:
postgres:
build:
context: .
dockerfile: Dockerfile.postgres
dockerfile: postgres.dockerfile
labels:
lagoon.type: postgres
redis:
build:
context: .
dockerfile: Dockerfile.redis
dockerfile: redis.dockerfile
labels:
lagoon.type: redis
solr:
Expand All @@ -76,7 +76,7 @@ services:
- default
build:
context: .
dockerfile: Dockerfile.solr
dockerfile: solr.dockerfile
labels:
lagoon.type: solr
networks:
Expand Down
8 changes: 4 additions & 4 deletions tests/files/drupal8-postgres/web/sites/default/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
* - production.services.yml
* For services only for the production environment.
* - development.settings.php
* For settings only for the development environment (devevlopment sites, docker).
* For settings only for the development environment (development sites, docker).
* - development.services.yml
* For services only for the development environment (devevlopment sites, docker).
* For services only for the development environment (development sites, docker).
* - settings.local.php
* For settings only for the local environment, this file will not be commited in GIT!
* For settings only for the local environment, this file will not be committed in GIT!
* - services.local.yml
* For services only for the local environment, this file will not be commited in GIT!
* For services only for the local environment, this file will not be committed in GIT!
*
*/

Expand Down
4 changes: 2 additions & 2 deletions tests/files/elasticsearch-cluster/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
- default
build:
context: .
dockerfile: Dockerfile.elasticsearch
dockerfile: elasticsearch.dockerfile
labels:
lagoon.type: elasticsearch-cluster
expose:
Expand All @@ -18,6 +18,6 @@ services:
- default
build:
context: .
dockerfile: Dockerfile.nginx
dockerfile: nginx.dockerfile
labels:
lagoon.type: nginx
Loading

0 comments on commit a143bcb

Please sign in to comment.