From 09d1d1c9f13b196bb4bdcf13f932c94220fee205 Mon Sep 17 00:00:00 2001 From: Thomas Misilo Date: Wed, 9 Feb 2022 13:06:27 -0600 Subject: [PATCH] Move docker-compose files to subdirectory Fixes #221 - Update context to the new locations in docker-compose.*.yml files - Move tls.yml to `build` directory and rename file to traefik-tls.yml. Since this file is in SCM, it isn't expected to be modified. --- Makefile | 4 +-- .../docker-compose/docker-compose.acme.yml | 2 +- .../docker-compose.activemq.yml | 0 .../docker-compose/docker-compose.alpaca.yml | 0 .../docker-compose.blazegraph.yml | 0 .../docker-compose.cantaloupe.yml | 0 .../docker-compose.code-server.yml | 2 +- .../docker-compose.crayfish.yml | 0 .../docker-compose.crayfits.yml | 0 .../docker-compose/docker-compose.custom.yml | 2 +- .../docker-compose/docker-compose.demo.yml | 0 .../docker-compose.drupal.mariadb.yml | 0 .../docker-compose.drupal.postgresql.yml | 0 .../docker-compose/docker-compose.drupal.yml | 0 .../docker-compose/docker-compose.etcd.yml | 0 .../docker-compose.fcrepo.mariadb.yml | 0 .../docker-compose.fcrepo.postgresql.yml | 0 .../docker-compose/docker-compose.fcrepo.yml | 0 .../docker-compose.fcrepo6.mariadb.yml | 0 .../docker-compose.fcrepo6.postgresql.yml | 0 .../docker-compose/docker-compose.fcrepo6.yml | 0 .../docker-compose/docker-compose.local.yml | 2 +- .../docker-compose/docker-compose.mariadb.yml | 0 .../docker-compose/docker-compose.matomo.yml | 0 .../docker-compose.postgresql.yml | 0 .../docker-compose/docker-compose.secrets.yml | 32 +++++++++---------- .../docker-compose/docker-compose.solr.yml | 0 .../docker-compose/docker-compose.traefik.yml | 4 +-- .../docker-compose.watchtower.yml | 0 tls.yml => build/traefik-tls.yml | 0 30 files changed, 24 insertions(+), 24 deletions(-) rename docker-compose.acme.yml => build/docker-compose/docker-compose.acme.yml (98%) rename docker-compose.activemq.yml => build/docker-compose/docker-compose.activemq.yml (100%) rename docker-compose.alpaca.yml => build/docker-compose/docker-compose.alpaca.yml (100%) rename docker-compose.blazegraph.yml => build/docker-compose/docker-compose.blazegraph.yml (100%) rename docker-compose.cantaloupe.yml => build/docker-compose/docker-compose.cantaloupe.yml (100%) rename docker-compose.code-server.yml => build/docker-compose/docker-compose.code-server.yml (98%) rename docker-compose.crayfish.yml => build/docker-compose/docker-compose.crayfish.yml (100%) rename docker-compose.crayfits.yml => build/docker-compose/docker-compose.crayfits.yml (100%) rename docker-compose.custom.yml => build/docker-compose/docker-compose.custom.yml (98%) rename docker-compose.demo.yml => build/docker-compose/docker-compose.demo.yml (100%) rename docker-compose.drupal.mariadb.yml => build/docker-compose/docker-compose.drupal.mariadb.yml (100%) rename docker-compose.drupal.postgresql.yml => build/docker-compose/docker-compose.drupal.postgresql.yml (100%) rename docker-compose.drupal.yml => build/docker-compose/docker-compose.drupal.yml (100%) rename docker-compose.etcd.yml => build/docker-compose/docker-compose.etcd.yml (100%) rename docker-compose.fcrepo.mariadb.yml => build/docker-compose/docker-compose.fcrepo.mariadb.yml (100%) rename docker-compose.fcrepo.postgresql.yml => build/docker-compose/docker-compose.fcrepo.postgresql.yml (100%) rename docker-compose.fcrepo.yml => build/docker-compose/docker-compose.fcrepo.yml (100%) rename docker-compose.fcrepo6.mariadb.yml => build/docker-compose/docker-compose.fcrepo6.mariadb.yml (100%) rename docker-compose.fcrepo6.postgresql.yml => build/docker-compose/docker-compose.fcrepo6.postgresql.yml (100%) rename docker-compose.fcrepo6.yml => build/docker-compose/docker-compose.fcrepo6.yml (100%) rename docker-compose.local.yml => build/docker-compose/docker-compose.local.yml (96%) rename docker-compose.mariadb.yml => build/docker-compose/docker-compose.mariadb.yml (100%) rename docker-compose.matomo.yml => build/docker-compose/docker-compose.matomo.yml (100%) rename docker-compose.postgresql.yml => build/docker-compose/docker-compose.postgresql.yml (100%) rename docker-compose.secrets.yml => build/docker-compose/docker-compose.secrets.yml (64%) rename docker-compose.solr.yml => build/docker-compose/docker-compose.solr.yml (100%) rename docker-compose.traefik.yml => build/docker-compose/docker-compose.traefik.yml (96%) rename docker-compose.watchtower.yml => build/docker-compose/docker-compose.watchtower.yml (100%) rename tls.yml => build/traefik-tls.yml (100%) diff --git a/Makefile b/Makefile index d24da5591e..d8b368e0d0 100644 --- a/Makefile +++ b/Makefile @@ -89,8 +89,8 @@ SERVICES := $(REQUIRED_SERVICES) $(FCREPO_SERVICE) $(WATCHTOWER_SERVICE) $(ETCD_ default: download-default-certs docker-compose.yml pull .SILENT: docker-compose.yml -docker-compose.yml: $(SERVICES:%=docker-compose.%.yml) .env - docker-compose $(SERVICES:%=-f docker-compose.%.yml) config > docker-compose.yml +docker-compose.yml: $(SERVICES:%=build/docker-compose/docker-compose.%.yml) .env + docker-compose $(SERVICES:%=-f build/docker-compose/docker-compose.%.yml) config > docker-compose.yml .PHONY: pull ## Fetches the latest images from the registry. diff --git a/docker-compose.acme.yml b/build/docker-compose/docker-compose.acme.yml similarity index 98% rename from docker-compose.acme.yml rename to build/docker-compose/docker-compose.acme.yml index de43d6d706..ae3b50c260 100644 --- a/docker-compose.acme.yml +++ b/build/docker-compose/docker-compose.acme.yml @@ -29,7 +29,7 @@ services: - --certificatesresolvers.myresolver.acme.storage=/acme/acme.json - --certificatesResolvers.myresolver.acme.caServer=${ACME_SERVER-https://acme-v02.api.letsencrypt.org/directory} volumes: - - ./acme:/acme:rw + - ../../acme:/acme:rw cantaloupe: labels: - traefik.http.routers.${COMPOSE_PROJECT_NAME-isle-dc}-cantaloupe_https.tls.certresolver=myresolver diff --git a/docker-compose.activemq.yml b/build/docker-compose/docker-compose.activemq.yml similarity index 100% rename from docker-compose.activemq.yml rename to build/docker-compose/docker-compose.activemq.yml diff --git a/docker-compose.alpaca.yml b/build/docker-compose/docker-compose.alpaca.yml similarity index 100% rename from docker-compose.alpaca.yml rename to build/docker-compose/docker-compose.alpaca.yml diff --git a/docker-compose.blazegraph.yml b/build/docker-compose/docker-compose.blazegraph.yml similarity index 100% rename from docker-compose.blazegraph.yml rename to build/docker-compose/docker-compose.blazegraph.yml diff --git a/docker-compose.cantaloupe.yml b/build/docker-compose/docker-compose.cantaloupe.yml similarity index 100% rename from docker-compose.cantaloupe.yml rename to build/docker-compose/docker-compose.cantaloupe.yml diff --git a/docker-compose.code-server.yml b/build/docker-compose/docker-compose.code-server.yml similarity index 98% rename from docker-compose.code-server.yml rename to build/docker-compose/docker-compose.code-server.yml index 3129c58729..28528900cd 100644 --- a/docker-compose.code-server.yml +++ b/build/docker-compose/docker-compose.code-server.yml @@ -10,7 +10,7 @@ networks: external: true secrets: CODE_SERVER_PASSWORD: - file: "./secrets/live/CODE_SERVER_PASSWORD" + file: "../../secrets/live/CODE_SERVER_PASSWORD" services: code-server: environment: diff --git a/docker-compose.crayfish.yml b/build/docker-compose/docker-compose.crayfish.yml similarity index 100% rename from docker-compose.crayfish.yml rename to build/docker-compose/docker-compose.crayfish.yml diff --git a/docker-compose.crayfits.yml b/build/docker-compose/docker-compose.crayfits.yml similarity index 100% rename from docker-compose.crayfits.yml rename to build/docker-compose/docker-compose.crayfits.yml diff --git a/docker-compose.custom.yml b/build/docker-compose/docker-compose.custom.yml similarity index 98% rename from docker-compose.custom.yml rename to build/docker-compose/docker-compose.custom.yml index 8d5aec43fe..83dcdccf06 100644 --- a/docker-compose.custom.yml +++ b/build/docker-compose/docker-compose.custom.yml @@ -12,7 +12,7 @@ services: # The service name is drupal that is the default host name used by micro-services etc. drupal: build: - context: ./ + context: ../../ dockerfile: ${PROJECT_DRUPAL_DOCKERFILE:-./Dockerfile} environment: # diff --git a/docker-compose.demo.yml b/build/docker-compose/docker-compose.demo.yml similarity index 100% rename from docker-compose.demo.yml rename to build/docker-compose/docker-compose.demo.yml diff --git a/docker-compose.drupal.mariadb.yml b/build/docker-compose/docker-compose.drupal.mariadb.yml similarity index 100% rename from docker-compose.drupal.mariadb.yml rename to build/docker-compose/docker-compose.drupal.mariadb.yml diff --git a/docker-compose.drupal.postgresql.yml b/build/docker-compose/docker-compose.drupal.postgresql.yml similarity index 100% rename from docker-compose.drupal.postgresql.yml rename to build/docker-compose/docker-compose.drupal.postgresql.yml diff --git a/docker-compose.drupal.yml b/build/docker-compose/docker-compose.drupal.yml similarity index 100% rename from docker-compose.drupal.yml rename to build/docker-compose/docker-compose.drupal.yml diff --git a/docker-compose.etcd.yml b/build/docker-compose/docker-compose.etcd.yml similarity index 100% rename from docker-compose.etcd.yml rename to build/docker-compose/docker-compose.etcd.yml diff --git a/docker-compose.fcrepo.mariadb.yml b/build/docker-compose/docker-compose.fcrepo.mariadb.yml similarity index 100% rename from docker-compose.fcrepo.mariadb.yml rename to build/docker-compose/docker-compose.fcrepo.mariadb.yml diff --git a/docker-compose.fcrepo.postgresql.yml b/build/docker-compose/docker-compose.fcrepo.postgresql.yml similarity index 100% rename from docker-compose.fcrepo.postgresql.yml rename to build/docker-compose/docker-compose.fcrepo.postgresql.yml diff --git a/docker-compose.fcrepo.yml b/build/docker-compose/docker-compose.fcrepo.yml similarity index 100% rename from docker-compose.fcrepo.yml rename to build/docker-compose/docker-compose.fcrepo.yml diff --git a/docker-compose.fcrepo6.mariadb.yml b/build/docker-compose/docker-compose.fcrepo6.mariadb.yml similarity index 100% rename from docker-compose.fcrepo6.mariadb.yml rename to build/docker-compose/docker-compose.fcrepo6.mariadb.yml diff --git a/docker-compose.fcrepo6.postgresql.yml b/build/docker-compose/docker-compose.fcrepo6.postgresql.yml similarity index 100% rename from docker-compose.fcrepo6.postgresql.yml rename to build/docker-compose/docker-compose.fcrepo6.postgresql.yml diff --git a/docker-compose.fcrepo6.yml b/build/docker-compose/docker-compose.fcrepo6.yml similarity index 100% rename from docker-compose.fcrepo6.yml rename to build/docker-compose/docker-compose.fcrepo6.yml diff --git a/docker-compose.local.yml b/build/docker-compose/docker-compose.local.yml similarity index 96% rename from docker-compose.local.yml rename to build/docker-compose/docker-compose.local.yml index 1e81ea182e..f4f44103d6 100644 --- a/docker-compose.local.yml +++ b/build/docker-compose/docker-compose.local.yml @@ -18,7 +18,7 @@ services: restart: ${RESTART_POLICY:-unless-stopped} image: ${REPOSITORY:-islandora}/drupal:${TAG:-latest} volumes: - - ./codebase:/var/www/drupal:delegated + - ../../codebase:/var/www/drupal:delegated - drupal-sites-data:/var/www/drupal/web/sites/default/files - solr-data:/opt/solr/server/solr environment: diff --git a/docker-compose.mariadb.yml b/build/docker-compose/docker-compose.mariadb.yml similarity index 100% rename from docker-compose.mariadb.yml rename to build/docker-compose/docker-compose.mariadb.yml diff --git a/docker-compose.matomo.yml b/build/docker-compose/docker-compose.matomo.yml similarity index 100% rename from docker-compose.matomo.yml rename to build/docker-compose/docker-compose.matomo.yml diff --git a/docker-compose.postgresql.yml b/build/docker-compose/docker-compose.postgresql.yml similarity index 100% rename from docker-compose.postgresql.yml rename to build/docker-compose/docker-compose.postgresql.yml diff --git a/docker-compose.secrets.yml b/build/docker-compose/docker-compose.secrets.yml similarity index 64% rename from docker-compose.secrets.yml rename to build/docker-compose/docker-compose.secrets.yml index 8d77dbc260..142b566582 100644 --- a/docker-compose.secrets.yml +++ b/build/docker-compose/docker-compose.secrets.yml @@ -1,37 +1,37 @@ version: "3.7" secrets: ACTIVEMQ_PASSWORD: - file: "./secrets/live/ACTIVEMQ_PASSWORD" + file: "../../secrets/live/ACTIVEMQ_PASSWORD" ACTIVEMQ_WEB_ADMIN_PASSWORD: - file: "./secrets/live/ACTIVEMQ_WEB_ADMIN_PASSWORD" + file: "../../secrets/live/ACTIVEMQ_WEB_ADMIN_PASSWORD" ALPACA_ACTIVEMQ_PASSWORD: - file: "./secrets/live/ALPACA_ACTIVEMQ_PASSWORD" + file: "../../secrets/live/ALPACA_ACTIVEMQ_PASSWORD" ALPACA_KARAF_ADMIN_PASSWORD: - file: "./secrets/live/ALPACA_KARAF_ADMIN_PASSWORD" + file: "../../secrets/live/ALPACA_KARAF_ADMIN_PASSWORD" DB_ROOT_PASSWORD: - file: "./secrets/live/DB_ROOT_PASSWORD" + file: "../../secrets/live/DB_ROOT_PASSWORD" DRUPAL_DEFAULT_ACCOUNT_PASSWORD: - file: "./secrets/live/DRUPAL_DEFAULT_ACCOUNT_PASSWORD" + file: "../../secrets/live/DRUPAL_DEFAULT_ACCOUNT_PASSWORD" DRUPAL_DEFAULT_CONFIGDIR: - file: "./secrets/live/DRUPAL_DEFAULT_CONFIGDIR" + file: "../../secrets/live/DRUPAL_DEFAULT_CONFIGDIR" DRUPAL_DEFAULT_DB_PASSWORD: - file: "./secrets/live/DRUPAL_DEFAULT_DB_PASSWORD" + file: "../../secrets/live/DRUPAL_DEFAULT_DB_PASSWORD" DRUPAL_DEFAULT_SALT: - file: "./secrets/live/DRUPAL_DEFAULT_SALT" + file: "../../secrets/live/DRUPAL_DEFAULT_SALT" FCREPO_DB_PASSWORD: - file: "./secrets/live/FCREPO_DB_PASSWORD" + file: "../../secrets/live/FCREPO_DB_PASSWORD" JWT_ADMIN_TOKEN: - file: "./secrets/live/JWT_ADMIN_TOKEN" + file: "../../secrets/live/JWT_ADMIN_TOKEN" JWT_PUBLIC_KEY: - file: "./secrets/live/JWT_PUBLIC_KEY" + file: "../../secrets/live/JWT_PUBLIC_KEY" JWT_PRIVATE_KEY: - file: "./secrets/live/JWT_PRIVATE_KEY" + file: "../../secrets/live/JWT_PRIVATE_KEY" MATOMO_DB_PASSWORD: - file: "./secrets/live/MATOMO_DB_PASSWORD" + file: "../../secrets/live/MATOMO_DB_PASSWORD" MATOMO_USER_PASS: - file: "./secrets/live/MATOMO_USER_PASS" + file: "../../secrets/live/MATOMO_USER_PASS" TOMCAT_ADMIN_PASSWORD: - file: "./secrets/live/TOMCAT_ADMIN_PASSWORD" + file: "../../secrets/live/TOMCAT_ADMIN_PASSWORD" services: activemq: secrets: diff --git a/docker-compose.solr.yml b/build/docker-compose/docker-compose.solr.yml similarity index 100% rename from docker-compose.solr.yml rename to build/docker-compose/docker-compose.solr.yml diff --git a/docker-compose.traefik.yml b/build/docker-compose/docker-compose.traefik.yml similarity index 96% rename from docker-compose.traefik.yml rename to build/docker-compose/docker-compose.traefik.yml index 0793e24a89..481ec5d6a5 100644 --- a/docker-compose.traefik.yml +++ b/build/docker-compose/docker-compose.traefik.yml @@ -53,8 +53,8 @@ services: - ${CODE_SERVER_PORT:-8443}:8443 # code-server volumes: - /var/run/docker.sock:/var/run/docker.sock - - ./tls.yml:/etc/traefik/tls.yml - - ./certs:/etc/ssl/traefik + - ../../build/traefik-tls.yml:/etc/traefik/tls.yml + - ../../certs:/etc/ssl/traefik labels: # Do not expose in production. - traefik.http.routers.api.service=api@internal diff --git a/docker-compose.watchtower.yml b/build/docker-compose/docker-compose.watchtower.yml similarity index 100% rename from docker-compose.watchtower.yml rename to build/docker-compose/docker-compose.watchtower.yml diff --git a/tls.yml b/build/traefik-tls.yml similarity index 100% rename from tls.yml rename to build/traefik-tls.yml