Rename runtime -> barrel
This commit is contained in:
parent
bc16eb5893
commit
2b8d3e817d
13 changed files with 7 additions and 7 deletions
|
|
@ -97,7 +97,7 @@ sudo bash /distillery/system_update.sh
|
||||||
|
|
||||||
A new WissKI instance consists of several components:
|
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 entry in the SQL bookkeeping table that stores instance meta-data
|
||||||
- An SQL database and user for Drupal
|
- An SQL database and user for Drupal
|
||||||
- A GraphDB repository and user as SPARQL endpoint
|
- 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.
|
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.
|
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__
|
__2. Create an appropriate SQL database and user__
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ DRUPAL_PASS="$(randompw)"
|
||||||
|
|
||||||
# TODO: copy over docker-compose into the right directory
|
# TODO: copy over docker-compose into the right directory
|
||||||
log_info " => Creating instance 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 all the details into the bookeeping database
|
||||||
log_info "=> Storing configuration in bookkeeping table"
|
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}\""
|
"\"${SLUG}\",\"${INSTANCE_BASE_DIR}\",\"${MYSQL_DATABASE}\",\"${MYSQL_USER}\",\"${MYSQL_PASSWORD}\",\"${GRAPHDB_REPO}\",\"${GRAPHDB_USER}\",\"${GRAPHDB_PASSWORD}\""
|
||||||
|
|
||||||
log_info " => Writing configuration file"
|
log_info " => Writing configuration file"
|
||||||
load_template "docker-env/runtime" \
|
load_template "docker-env/barrel" \
|
||||||
"REAL_PATH" "${INSTANCE_DATA_DIR}" \
|
"REAL_PATH" "${INSTANCE_DATA_DIR}" \
|
||||||
"VIRTUAL_HOST" "${INSTANCE_DOMAIN}" \
|
"VIRTUAL_HOST" "${INSTANCE_DOMAIN}" \
|
||||||
"LETSENCRYPT_HOST" "${LETSENCRYPT_HOST}" \
|
"LETSENCRYPT_HOST" "${LETSENCRYPT_HOST}" \
|
||||||
|
|
@ -89,7 +89,7 @@ docker-compose build --pull
|
||||||
docker-compose pull
|
docker-compose pull
|
||||||
|
|
||||||
log_info " => Running provision script"
|
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}\" \
|
\"${INSTANCE_DOMAIN}\" \
|
||||||
\"${MYSQL_DATABASE}\" \"${MYSQL_USER}\" \"${MYSQL_PASSWORD}\" \
|
\"${MYSQL_DATABASE}\" \"${MYSQL_USER}\" \"${MYSQL_PASSWORD}\" \
|
||||||
\"${GRAPHDB_REPO}\" \"${GRAPHDB_USER}\" \"${GRAPHDB_PASSWORD}\" \
|
\"${GRAPHDB_REPO}\" \"${GRAPHDB_USER}\" \"${GRAPHDB_PASSWORD}\" \
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
version: "3.7"
|
version: "3.7"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
runtime:
|
barrel:
|
||||||
build: .
|
build: .
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
|
|
@ -24,4 +24,4 @@ read -r INSTANCE_BASE_DIR MYSQL_DATABASE MYSQL_USER GRAPHDB_REPO GRAPHDB_USER <<
|
||||||
cd "$INSTANCE_BASE_DIR"
|
cd "$INSTANCE_BASE_DIR"
|
||||||
|
|
||||||
# and open a www-data shell
|
# 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"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue