Skip to content

Commit

Permalink
Merge pull request #11 from simesy/GOVCMS-3718-env-testing
Browse files Browse the repository at this point in the history
GOVCMS-3718: Env testing
  • Loading branch information
SRowlands authored Oct 24, 2019
2 parents be586a3 + 1e5b49b commit 87ce413
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .docker/Dockerfile.cli
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM govcmslagoon/govcms7
ARG GOVCMS_IMAGE_VERSION=latest
FROM govcmslagoon/govcms7:${GOVCMS_IMAGE_VERSION}

COPY themes/ /app/sites/default/themes/custom

Expand Down
5 changes: 3 additions & 2 deletions .docker/Dockerfile.nginx-drupal
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ARG CLI_IMAGE
FROM ${CLI_IMAGE} as cli
ARG GOVCMS_IMAGE_VERSION=latest

FROM govcmslagoon/nginx-drupal
FROM ${CLI_IMAGE} as cli
FROM govcmslagoon/nginx-drupal:${GOVCMS_IMAGE_VERSION}

COPY --from=cli /app /app
5 changes: 3 additions & 2 deletions .docker/Dockerfile.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ARG CLI_IMAGE
FROM ${CLI_IMAGE} as cli
ARG GOVCMS_IMAGE_VERSION=latest

FROM govcmslagoon/php
FROM ${CLI_IMAGE} as cli
FROM govcmslagoon/php:${GOVCMS_IMAGE_VERSION}

COPY --from=cli /app /app
4 changes: 3 additions & 1 deletion .docker/Dockerfile.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM govcmslagoon/test
ARG GOVCMS_IMAGE_VERSION=latest

FROM govcmslagoon/test:${GOVCMS_IMAGE_VERSION}

COPY themes/ /app/sites/default/themes/custom

Expand Down
6 changes: 6 additions & 0 deletions .env.default
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,9 @@ LOCALDEV_URL=http://govcms.docker.amazee.io
# Note: Seckit click-jacking configuration will need altering to suit if changed.
# See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
X_FRAME_OPTIONS=SameOrigin

# Docker image tag that is used in the Dockerfiles, in order to get specific
# versions of GovCMS images. On Lagoon the value comes from a buildtime
# variable set via GraphQL api.
# @see progress https://github.com/amazeeio/lagoon/issues/1168
#GOVCMS_IMAGE_VERSION=latest
11 changes: 11 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ x-lagoon-project:
x-lagoon-local-dev-url:
&lagoon-local-dev-url http://govcms7-scaffold.docker.amazee.io

x-govcms-image-version:
&govcms-image-version ${GOVCMS_IMAGE_VERSION:-latest}

x-volumes:
&default-volumes
volumes:
Expand All @@ -20,6 +23,7 @@ x-environment:
LAGOON_ENVIRONMENT_TYPE: ${LAGOON_ENVIRONMENT_TYPE}
LAGOON_PROJECT: *lagoon-project
LAGOON_ROUTE: &default-url ${LOCALDEV_URL:-http://govcms7-scaffold.docker.amazee.io}
GOVCMS_IMAGE_VERSION: ${GOVCMS_IMAGE_VERSION:-latest}
X_FRAME_OPTIONS: ${X_FRAME_OPTIONS:-SameOrigin}

services:
Expand All @@ -28,6 +32,8 @@ services:
build:
context: .
dockerfile: .docker/Dockerfile.cli
args:
GOVCMS_IMAGE_VERSION: *govcms-image-version
image: *lagoon-project
labels:
lagoon.type: cli-persistent
Expand All @@ -41,6 +47,9 @@ services:
build:
context: .
dockerfile: .docker/Dockerfile.test
args:
CLI_IMAGE: *lagoon-project
GOVCMS_IMAGE_VERSION: *govcms-image-version
labels:
lagoon.type: none
<< : *default-volumes
Expand All @@ -55,6 +64,7 @@ services:
dockerfile: .docker/Dockerfile.nginx-drupal
args:
CLI_IMAGE: *lagoon-project
GOVCMS_IMAGE_VERSION: *govcms-image-version
labels:
lagoon.type: nginx-php-persistent
lagoon.persistent: /app/sites/default/files/
Expand All @@ -74,6 +84,7 @@ services:
dockerfile: .docker/Dockerfile.php
args:
CLI_IMAGE: *lagoon-project
GOVCMS_IMAGE_VERSION: *govcms-image-version
labels:
lagoon.type: nginx-php-persistent
lagoon.name: nginx
Expand Down

0 comments on commit 87ce413

Please sign in to comment.