Skip to content

Commit

Permalink
chore: update compose-go spec to v1.20.0 with lagoon fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
shreddedbacon committed Nov 3, 2023
1 parent 6bd767a commit 4b2360c
Show file tree
Hide file tree
Showing 8 changed files with 83 additions and 77 deletions.
17 changes: 9 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ go 1.18
require (
github.com/PaesslerAG/gval v1.1.2
github.com/amazeeio/dbaas-operator v0.3.0
github.com/compose-spec/compose-go v1.2.7
github.com/compose-spec/compose-go v1.20.0
github.com/cxmcc/unixsums v0.0.0-20131125091133-89564297d82f
github.com/google/go-cmp v0.5.9
github.com/hashicorp/go-retryablehttp v0.5.4
github.com/imdario/mergo v0.3.13
github.com/imdario/mergo v0.3.16
github.com/k8up-io/k8up/v2 v2.5.2
github.com/spf13/cobra v1.5.0
github.com/uselagoon/machinery v0.0.7
Expand All @@ -25,9 +25,9 @@ require (
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/distribution/distribution/v3 v3.0.0-20210316161203-a01c71e2477e // indirect
github.com/distribution/reference v0.5.0 // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/emicklei/go-restful/v3 v3.8.0 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
Expand Down Expand Up @@ -55,10 +55,11 @@ require (
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect
golang.org/x/net v0.0.0-20220822230855-b0a4917ee28c // indirect
golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2 // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sys v0.0.0-20220818161305-2296e01440c6 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.1.0 // indirect
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20220609170525-579cf78fd858 // indirect
Expand All @@ -75,6 +76,6 @@ require (
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
)

replace github.com/compose-spec/compose-go v1.2.7 => github.com/shreddedbacon/compose-go v0.0.0-20220616064547-4e908a2865c1
replace github.com/compose-spec/compose-go v1.20.0 => github.com/shreddedbacon/compose-go v0.0.0-20231103005133-1fbf57481b8b

// replace github.com/compose-spec/compose-go v1.2.7 => ../../compose-spec/compose-go
// replace github.com/compose-spec/compose-go v1.2.7 => ../../shreddedbacon/compose-go
67 changes: 16 additions & 51 deletions go.sum

Large diffs are not rendered by default.

31 changes: 21 additions & 10 deletions internal/lagoon/compose_test.go

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions test-resources/docker-compose/test1/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ services:
lagoon.type: nginx-php-persistent
lagoon.persistent: /app/web/sites/default/files/ # define where the persistent storage should be mounted too
lando.type: nginx-drupal
<< : *default-volumes # loads the defined volumes from the top
# << : *default-volumes # loads the defined volumes from the top
<< : *default-user # uses the defined user from top
depends_on:
- cli # basically just tells docker-compose to build the cli first
Expand All @@ -77,7 +77,7 @@ services:
lagoon.name: nginx # we want this service be part of the nginx pod in Lagoon
lagoon.persistent: /app/web/sites/default/files/ # define where the persistent storage should be mounted too
lando.type: php-fpm
<< : *default-volumes # loads the defined volumes from the top
# << : *default-volumes # loads the defined volumes from the top
<< : *default-user # uses the defined user from top
depends_on:
- cli # basically just tells docker-compose to build the cli first
Expand Down
29 changes: 29 additions & 0 deletions test-resources/docker-compose/test12/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
version: '2'

x-environment: &default-environment
MYVAR1: ${MYVAR1:-${MYVAR2:-defaultvalue}substring}

services:
cli:
image: uselagoon/php-8.1-cli-drupal:23.10.0
environment:
<<: *default-environment

node:
networks:
- amazeeio-network
- default
build:
context: .
dockerfile: node.dockerfile
labels:
lagoon.type: node
volumes:
- .:/app:delegated
environment:
- LAGOON_LOCALDEV_HTTP_PORT=3000
- LAGOON_ROUTE=http://node.docker.amazee.io

networks:
amazeeio-network:
external: true
4 changes: 2 additions & 2 deletions test-resources/docker-compose/test5/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ services:
dockerfile: .docker/Dockerfile.nginx-drupal
args:
CLI_IMAGE: *project
<<: *default-volumes
# <<: *default-volumes
<<: *default-user
environment:
<<: *default-environment
Expand All @@ -74,7 +74,7 @@ services:
dockerfile: .docker/Dockerfile.php
args:
CLI_IMAGE: *project
<<: *default-volumes
# <<: *default-volumes
<<: *default-user
environment:
<<: *default-environment
Expand Down
4 changes: 2 additions & 2 deletions test-resources/identify-ingress/test17/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ services:
lagoon.type: nginx-php-persistent
lagoon.persistent: /app/web/sites/default/files/ # define where the persistent storage should be mounted too
lando.type: nginx-drupal
<< : *default-volumes # loads the defined volumes from the top
# << : *default-volumes # loads the defined volumes from the top
<< : *default-user # uses the defined user from top
depends_on:
- cli # basically just tells docker-compose to build the cli first
Expand All @@ -79,7 +79,7 @@ services:
lagoon.name: nginx # we want this service be part of the nginx pod in Lagoon
lagoon.persistent: /app/web/sites/default/files/ # define where the persistent storage should be mounted too
lando.type: php-fpm
<< : *default-volumes # loads the defined volumes from the top
# << : *default-volumes # loads the defined volumes from the top
<< : *default-user # uses the defined user from top
depends_on:
- cli # basically just tells docker-compose to build the cli first
Expand Down
4 changes: 2 additions & 2 deletions test-resources/template-dbaas/test1/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ services:
lagoon.type: nginx-php-persistent
lagoon.persistent: /app/web/sites/default/files/ # define where the persistent storage should be mounted too
lando.type: nginx-drupal
<< : *default-volumes # loads the defined volumes from the top
# << : *default-volumes # loads the defined volumes from the top
<< : *default-user # uses the defined user from top
depends_on:
- cli # basically just tells docker-compose to build the cli first
Expand All @@ -77,7 +77,7 @@ services:
lagoon.name: nginx # we want this service be part of the nginx pod in Lagoon
lagoon.persistent: /app/web/sites/default/files/ # define where the persistent storage should be mounted too
lando.type: php-fpm
<< : *default-volumes # loads the defined volumes from the top
# << : *default-volumes # loads the defined volumes from the top
<< : *default-user # uses the defined user from top
depends_on:
- cli # basically just tells docker-compose to build the cli first
Expand Down

0 comments on commit 4b2360c

Please sign in to comment.