From dd98368335ba008dce16a1d0b0f053ea2d13afcb Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Mon, 3 Jun 2024 09:41:35 +0300 Subject: [PATCH] Update Docker Compose test setups --- README.md | 10 ++-- .../{docker-compose.yml => compose.yaml} | 18 +++---- .../{docker-compose.yml => compose.yaml} | 18 +++---- tests/drupal-test/.env | 2 +- tests/drupal-test/compose.yaml | 28 +++++++++++ tests/drupal-test/docker-compose.yml | 28 ----------- tests/wp-test/compose.yaml | 34 +++++++++++++ tests/wp-test/docker-compose.yml | 50 ------------------- 8 files changed, 86 insertions(+), 102 deletions(-) rename examples/drupal-separate-services/{docker-compose.yml => compose.yaml} (52%) rename tests/drupal-and-nginx/{docker-compose.yml => compose.yaml} (52%) create mode 100644 tests/drupal-test/compose.yaml delete mode 100644 tests/drupal-test/docker-compose.yml create mode 100644 tests/wp-test/compose.yaml delete mode 100644 tests/wp-test/docker-compose.yml diff --git a/README.md b/README.md index a30adbb..a865d9d 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ Added features: Needs: -- Nginx (`druidfi/nginx:1.25-drupal`) +- Nginx (`druidfi/nginx:1.27-drupal`) - Database (`druidfi/mariadb:10.11-drupal-lts`) ENV variables: @@ -108,8 +108,8 @@ Needs: ### Base variant -- `1.24` stable based on `nginx:1.24-alpine` -- `1.25` mainline based on `nginx:1.25-alpine` +- `1.26` stable based on `nginx:1.26-alpine` +- `1.27` mainline based on `nginx:1.27-alpine` Added features: @@ -117,8 +117,8 @@ Added features: ### Drupal variant -- `1.24-drupal` based on `druidfi/nginx:1.24` -- `1.25-drupal` based on `druidfi/nginx:1.25` +- `1.26-drupal` based on `druidfi/nginx:1.26` +- `1.27-drupal` based on `druidfi/nginx:1.27` Added features: diff --git a/examples/drupal-separate-services/docker-compose.yml b/examples/drupal-separate-services/compose.yaml similarity index 52% rename from examples/drupal-separate-services/docker-compose.yml rename to examples/drupal-separate-services/compose.yaml index 1955847..5c83dd2 100644 --- a/examples/drupal-separate-services/docker-compose.yml +++ b/examples/drupal-separate-services/compose.yaml @@ -1,18 +1,18 @@ services: nginx: - hostname: ${DRUPAL_HOSTNAME} container_name: ${COMPOSE_PROJECT_NAME}-nginx - image: druidfi/nginx:1.25-drupal + hostname: ${COMPOSE_PROJECT_NAME} + image: druidfi/nginx:1.27-drupal volumes: - .:/app:delegated labels: - - "traefik.enable=true" - - "traefik.http.routers.${COMPOSE_PROJECT_NAME}-nginx.entrypoints=https" - - "traefik.http.routers.${COMPOSE_PROJECT_NAME}-nginx.rule=Host(`${DRUPAL_HOSTNAME}`)" - - "traefik.http.routers.${COMPOSE_PROJECT_NAME}-nginx.tls=true" - - "traefik.http.services.${COMPOSE_PROJECT_NAME}-nginx.loadbalancer.server.port=8080" - - "traefik.docker.network=stonehenge-network" + - traefik.enable=true + - traefik.http.routers.${COMPOSE_PROJECT_NAME}-nginx.entrypoints=https + - traefik.http.routers.${COMPOSE_PROJECT_NAME}-nginx.rule=Host(`${DRUPAL_HOSTNAME}`) + - traefik.http.routers.${COMPOSE_PROJECT_NAME}-nginx.tls=true + - traefik.http.services.${COMPOSE_PROJECT_NAME}-nginx.loadbalancer.server.port=8080 + - traefik.docker.network=stonehenge-network networks: - default - stonehenge-network @@ -21,7 +21,7 @@ services: app: container_name: ${COMPOSE_PROJECT_NAME}-app - image: druidfi/drupal:php-8.2 + image: druidfi/drupal:php-8.3 volumes: - .:/app:delegated environment: diff --git a/tests/drupal-and-nginx/docker-compose.yml b/tests/drupal-and-nginx/compose.yaml similarity index 52% rename from tests/drupal-and-nginx/docker-compose.yml rename to tests/drupal-and-nginx/compose.yaml index 1955847..5c83dd2 100644 --- a/tests/drupal-and-nginx/docker-compose.yml +++ b/tests/drupal-and-nginx/compose.yaml @@ -1,18 +1,18 @@ services: nginx: - hostname: ${DRUPAL_HOSTNAME} container_name: ${COMPOSE_PROJECT_NAME}-nginx - image: druidfi/nginx:1.25-drupal + hostname: ${COMPOSE_PROJECT_NAME} + image: druidfi/nginx:1.27-drupal volumes: - .:/app:delegated labels: - - "traefik.enable=true" - - "traefik.http.routers.${COMPOSE_PROJECT_NAME}-nginx.entrypoints=https" - - "traefik.http.routers.${COMPOSE_PROJECT_NAME}-nginx.rule=Host(`${DRUPAL_HOSTNAME}`)" - - "traefik.http.routers.${COMPOSE_PROJECT_NAME}-nginx.tls=true" - - "traefik.http.services.${COMPOSE_PROJECT_NAME}-nginx.loadbalancer.server.port=8080" - - "traefik.docker.network=stonehenge-network" + - traefik.enable=true + - traefik.http.routers.${COMPOSE_PROJECT_NAME}-nginx.entrypoints=https + - traefik.http.routers.${COMPOSE_PROJECT_NAME}-nginx.rule=Host(`${DRUPAL_HOSTNAME}`) + - traefik.http.routers.${COMPOSE_PROJECT_NAME}-nginx.tls=true + - traefik.http.services.${COMPOSE_PROJECT_NAME}-nginx.loadbalancer.server.port=8080 + - traefik.docker.network=stonehenge-network networks: - default - stonehenge-network @@ -21,7 +21,7 @@ services: app: container_name: ${COMPOSE_PROJECT_NAME}-app - image: druidfi/drupal:php-8.2 + image: druidfi/drupal:php-8.3 volumes: - .:/app:delegated environment: diff --git a/tests/drupal-test/.env b/tests/drupal-test/.env index 91c76b4..040c408 100644 --- a/tests/drupal-test/.env +++ b/tests/drupal-test/.env @@ -1,3 +1,3 @@ COMPOSE_PROJECT_NAME=test-drupal DRUPAL_HOSTNAME=test-drupal.docker.so -DRUPAL_IMAGE=druidfi/drupal-test:php-8.2 +DRUPAL_IMAGE=druidfi/drupal-test:php-8.3 diff --git a/tests/drupal-test/compose.yaml b/tests/drupal-test/compose.yaml new file mode 100644 index 0000000..c38100b --- /dev/null +++ b/tests/drupal-test/compose.yaml @@ -0,0 +1,28 @@ +services: + + app: + container_name: ${COMPOSE_PROJECT_NAME}-app + hostname: ${COMPOSE_PROJECT_NAME} + image: ${DRUPAL_IMAGE} + environment: + DRUSH_OPTIONS_URI: https://${DRUPAL_HOSTNAME} + labels: + - traefik.enable=true + - traefik.http.routers.${COMPOSE_PROJECT_NAME}-app.entrypoints=https + - traefik.http.routers.${COMPOSE_PROJECT_NAME}-app.rule=Host(`${DRUPAL_HOSTNAME}`) + - traefik.http.routers.${COMPOSE_PROJECT_NAME}-app.tls=true + - traefik.http.services.${COMPOSE_PROJECT_NAME}-app.loadbalancer.server.port=8080 + - traefik.docker.network=stonehenge-network + networks: + - default + - stonehenge-network + depends_on: + - db + + db: + container_name: ${COMPOSE_PROJECT_NAME}-db + image: druidfi/mariadb:10.11-drupal-lts + +networks: + stonehenge-network: + external: true diff --git a/tests/drupal-test/docker-compose.yml b/tests/drupal-test/docker-compose.yml deleted file mode 100644 index 8b89939..0000000 --- a/tests/drupal-test/docker-compose.yml +++ /dev/null @@ -1,28 +0,0 @@ -services: - - app: - container_name: ${COMPOSE_PROJECT_NAME}-app - hostname: ${DRUPAL_HOSTNAME} - image: ${DRUPAL_IMAGE} - environment: - DRUSH_OPTIONS_URI: https://${DRUPAL_HOSTNAME} - labels: - - "traefik.enable=true" - - "traefik.http.routers.${COMPOSE_PROJECT_NAME}-app.entrypoints=https" - - "traefik.http.routers.${COMPOSE_PROJECT_NAME}-app.rule=Host(`${DRUPAL_HOSTNAME}`)" - - "traefik.http.routers.${COMPOSE_PROJECT_NAME}-app.tls=true" - - "traefik.http.services.${COMPOSE_PROJECT_NAME}-app.loadbalancer.server.port=8080" - - "traefik.docker.network=stonehenge-network" - networks: - - default - - stonehenge-network - depends_on: - - db - - db: - container_name: ${COMPOSE_PROJECT_NAME}-db - image: druidfi/mariadb:10.11-drupal-lts - -networks: - stonehenge-network: - external: true diff --git a/tests/wp-test/compose.yaml b/tests/wp-test/compose.yaml new file mode 100644 index 0000000..2bdd908 --- /dev/null +++ b/tests/wp-test/compose.yaml @@ -0,0 +1,34 @@ +services: + + app: + container_name: ${COMPOSE_PROJECT_NAME}-app + hostname: ${COMPOSE_PROJECT_NAME} + image: ${WP_IMAGE} + environment: + WP_SITEURL: https://${WP_HOSTNAME} + DB_HOST: db + DB_NAME: drupal + DB_USER: drupal + DB_PASSWORD: drupal + labels: + - traefik.enable=true + - traefik.http.routers.${COMPOSE_PROJECT_NAME}-app.entrypoints=https + - traefik.http.routers.${COMPOSE_PROJECT_NAME}-app.rule=Host(`${WP_HOSTNAME}`) + - traefik.http.routers.${COMPOSE_PROJECT_NAME}-app.tls=true + - traefik.http.services.${COMPOSE_PROJECT_NAME}-app.loadbalancer.server.port=8080 + - traefik.docker.network=stonehenge-network + networks: + - default + - stonehenge-network + depends_on: + - db + + db: + container_name: ${COMPOSE_PROJECT_NAME}-db + image: druidfi/mysql:5.7-drupal + ports: + - 3306 + +networks: + stonehenge-network: + external: true diff --git a/tests/wp-test/docker-compose.yml b/tests/wp-test/docker-compose.yml deleted file mode 100644 index 03c8479..0000000 --- a/tests/wp-test/docker-compose.yml +++ /dev/null @@ -1,50 +0,0 @@ -version: '3.7' - -services: - - app: - container_name: "${COMPOSE_PROJECT_NAME}-app" - hostname: "${WP_HOSTNAME}" - image: "${WP_IMAGE}" -# volumes: -# - ssh:/tmp/amazeeio_ssh-agent:ro - environment: - WP_SITEURL: "https://${WP_HOSTNAME}" - DB_HOST: "db" - DB_NAME: "drupal" - DB_USER: "drupal" - DB_PASSWORD: "drupal" - labels: - - "traefik.enable=true" - - "traefik.http.routers.${COMPOSE_PROJECT_NAME}-app.entrypoints=https" - - "traefik.http.routers.${COMPOSE_PROJECT_NAME}-app.rule=Host(`${WP_HOSTNAME}`)" - - "traefik.http.routers.${COMPOSE_PROJECT_NAME}-app.tls=true" - - "traefik.http.services.${COMPOSE_PROJECT_NAME}-app.loadbalancer.server.port=8080" - - "traefik.docker.network=stonehenge-network" - networks: - - internal - - stonehenge-network - depends_on: - - db - - db: - container_name: "${COMPOSE_PROJECT_NAME}-db" - image: druidfi/mysql:5.7-drupal -# volumes: -# - db_data:/var/lib/mysql - ports: - - 3306 - networks: - - internal - -networks: - internal: - external: false - stonehenge-network: - external: true - -#volumes: -# db_data: -# ssh: -# name: stonehenge-ssh -# external: true