From 2b8d3e817d0b274df39daed9dc7e0e3396adf89c Mon Sep 17 00:00:00 2001 From: Tom Wiesing Date: Tue, 14 Jul 2020 16:23:36 +0200 Subject: [PATCH] Rename runtime -> barrel --- README.md | 4 ++-- distillery/provision.sh | 6 +++--- .../resources/compose/{runtime => barrel}/.dockerignore | 0 .../resources/compose/{runtime => barrel}/.env.sample | 0 distillery/resources/compose/{runtime => barrel}/Dockerfile | 0 .../resources/compose/{runtime => barrel}/conf/ports.conf | 0 .../resources/compose/{runtime => barrel}/conf/wisski.conf | 0 .../compose/{runtime => barrel}/docker-compose.yml | 2 +- .../compose/{runtime => barrel}/patch/easyrdf.patch | 0 .../compose/{runtime => barrel}/scripts/entrypoint.sh | 0 .../{runtime => barrel}/scripts/provision_container.sh | 0 .../resources/templates/docker-env/{runtime => barrel} | 0 distillery/shell.sh | 2 +- 13 files changed, 7 insertions(+), 7 deletions(-) rename distillery/resources/compose/{runtime => barrel}/.dockerignore (100%) rename distillery/resources/compose/{runtime => barrel}/.env.sample (100%) rename distillery/resources/compose/{runtime => barrel}/Dockerfile (100%) rename distillery/resources/compose/{runtime => barrel}/conf/ports.conf (100%) rename distillery/resources/compose/{runtime => barrel}/conf/wisski.conf (100%) rename distillery/resources/compose/{runtime => barrel}/docker-compose.yml (97%) rename distillery/resources/compose/{runtime => barrel}/patch/easyrdf.patch (100%) rename distillery/resources/compose/{runtime => barrel}/scripts/entrypoint.sh (100%) rename distillery/resources/compose/{runtime => barrel}/scripts/provision_container.sh (100%) rename distillery/resources/templates/docker-env/{runtime => barrel} (100%) diff --git a/README.md b/README.md index 3828bdc..3319003 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ sudo bash /distillery/system_update.sh A new WissKI instance consists of several components: -- A Drupal instance inside a lightweight php runtime container +- A Drupal instance inside a lightweight php runtime container (a `barrel` in which to store WissKI) - An entry in the SQL bookkeeping table that stores instance meta-data - An SQL database and user for Drupal - A GraphDB repository and user as SPARQL endpoint @@ -114,7 +114,7 @@ __1. Create a new docker-compose.yml file__ In this step we first create a directory on the real system to hold all files relating to this instance. By default, this takes place inside `/var/www/deploy/instances/$DOMAIN`, but this can be configured. -We then create a docker-compose file in this directory that is ready for running the runtime container. +We then create a docker-compose file in this directory that is ready for running the `barrel` container. __2. Create an appropriate SQL database and user__ diff --git a/distillery/provision.sh b/distillery/provision.sh index a390fb0..12cbd5f 100755 --- a/distillery/provision.sh +++ b/distillery/provision.sh @@ -66,7 +66,7 @@ DRUPAL_PASS="$(randompw)" # TODO: copy over docker-compose into the right directory log_info " => Creating instance directory" -install_resource_dir "compose/runtime" "$INSTANCE_BASE_DIR" +install_resource_dir "compose/barrel" "$INSTANCE_BASE_DIR" # Log all the details into the bookeeping database log_info "=> Storing configuration in bookkeeping table" @@ -75,7 +75,7 @@ sql_bookkeep_insert \ "\"${SLUG}\",\"${INSTANCE_BASE_DIR}\",\"${MYSQL_DATABASE}\",\"${MYSQL_USER}\",\"${MYSQL_PASSWORD}\",\"${GRAPHDB_REPO}\",\"${GRAPHDB_USER}\",\"${GRAPHDB_PASSWORD}\"" log_info " => Writing configuration file" -load_template "docker-env/runtime" \ +load_template "docker-env/barrel" \ "REAL_PATH" "${INSTANCE_DATA_DIR}" \ "VIRTUAL_HOST" "${INSTANCE_DOMAIN}" \ "LETSENCRYPT_HOST" "${LETSENCRYPT_HOST}" \ @@ -89,7 +89,7 @@ docker-compose build --pull docker-compose pull log_info " => Running provision script" -docker-compose run --rm runtime /bin/bash -c "sudo PATH=\$PATH -u www-data /bin/bash /provision_container.sh \ +docker-compose run --rm barrel /bin/bash -c "sudo PATH=\$PATH -u www-data /bin/bash /provision_container.sh \ \"${INSTANCE_DOMAIN}\" \ \"${MYSQL_DATABASE}\" \"${MYSQL_USER}\" \"${MYSQL_PASSWORD}\" \ \"${GRAPHDB_REPO}\" \"${GRAPHDB_USER}\" \"${GRAPHDB_PASSWORD}\" \ diff --git a/distillery/resources/compose/runtime/.dockerignore b/distillery/resources/compose/barrel/.dockerignore similarity index 100% rename from distillery/resources/compose/runtime/.dockerignore rename to distillery/resources/compose/barrel/.dockerignore diff --git a/distillery/resources/compose/runtime/.env.sample b/distillery/resources/compose/barrel/.env.sample similarity index 100% rename from distillery/resources/compose/runtime/.env.sample rename to distillery/resources/compose/barrel/.env.sample diff --git a/distillery/resources/compose/runtime/Dockerfile b/distillery/resources/compose/barrel/Dockerfile similarity index 100% rename from distillery/resources/compose/runtime/Dockerfile rename to distillery/resources/compose/barrel/Dockerfile diff --git a/distillery/resources/compose/runtime/conf/ports.conf b/distillery/resources/compose/barrel/conf/ports.conf similarity index 100% rename from distillery/resources/compose/runtime/conf/ports.conf rename to distillery/resources/compose/barrel/conf/ports.conf diff --git a/distillery/resources/compose/runtime/conf/wisski.conf b/distillery/resources/compose/barrel/conf/wisski.conf similarity index 100% rename from distillery/resources/compose/runtime/conf/wisski.conf rename to distillery/resources/compose/barrel/conf/wisski.conf diff --git a/distillery/resources/compose/runtime/docker-compose.yml b/distillery/resources/compose/barrel/docker-compose.yml similarity index 97% rename from distillery/resources/compose/runtime/docker-compose.yml rename to distillery/resources/compose/barrel/docker-compose.yml index d5997e3..62320bf 100644 --- a/distillery/resources/compose/runtime/docker-compose.yml +++ b/distillery/resources/compose/barrel/docker-compose.yml @@ -1,7 +1,7 @@ version: "3.7" services: - runtime: + barrel: build: . restart: always environment: diff --git a/distillery/resources/compose/runtime/patch/easyrdf.patch b/distillery/resources/compose/barrel/patch/easyrdf.patch similarity index 100% rename from distillery/resources/compose/runtime/patch/easyrdf.patch rename to distillery/resources/compose/barrel/patch/easyrdf.patch diff --git a/distillery/resources/compose/runtime/scripts/entrypoint.sh b/distillery/resources/compose/barrel/scripts/entrypoint.sh similarity index 100% rename from distillery/resources/compose/runtime/scripts/entrypoint.sh rename to distillery/resources/compose/barrel/scripts/entrypoint.sh diff --git a/distillery/resources/compose/runtime/scripts/provision_container.sh b/distillery/resources/compose/barrel/scripts/provision_container.sh similarity index 100% rename from distillery/resources/compose/runtime/scripts/provision_container.sh rename to distillery/resources/compose/barrel/scripts/provision_container.sh diff --git a/distillery/resources/templates/docker-env/runtime b/distillery/resources/templates/docker-env/barrel similarity index 100% rename from distillery/resources/templates/docker-env/runtime rename to distillery/resources/templates/docker-env/barrel diff --git a/distillery/shell.sh b/distillery/shell.sh index 6ce8c7a..5ccc352 100644 --- a/distillery/shell.sh +++ b/distillery/shell.sh @@ -24,4 +24,4 @@ read -r INSTANCE_BASE_DIR MYSQL_DATABASE MYSQL_USER GRAPHDB_REPO GRAPHDB_USER << cd "$INSTANCE_BASE_DIR" # and open a www-data shell -docker-compose exec runtime /bin/bash -c "cd /var/www/data/project; sudo -u www-data /bin/bash" +docker-compose exec barrel /bin/bash -c "cd /var/www/data/project; sudo -u www-data /bin/bash"