From a8b31310ba7cabe4ffe4aafa64d8f23af3eb4ba3 Mon Sep 17 00:00:00 2001 From: 3wc <3wc.git@doesthisthing.work> Date: Sat, 24 Oct 2020 19:01:17 +0200 Subject: [PATCH] Further post-image-switch tidying Ref #8 --- .drone.yml | 1 - README.md | 2 +- compose.simplesaml.yml | 1 - compose.yml | 8 -------- entrypoint.sh.tmpl | 10 ++++------ 5 files changed, 5 insertions(+), 17 deletions(-) diff --git a/.drone.yml b/.drone.yml index 2f8fea5..5813c74 100644 --- a/.drone.yml +++ b/.drone.yml @@ -24,7 +24,6 @@ steps: DB_PASSWORD_VERSION: v1 MEDIAWIKI_SECRET_KEY_VERSION: v1 LOCAL_SETTINGS_CONF_VERSION: v1 - HTACCESS_CONF_VERSION: v1 ENTRYPOINT_CONF_VERSION: v1 trigger: branch: diff --git a/README.md b/README.md index 8ee4012..62fa036 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Based on [`mediawiki`][mediawiki]. 3. `cp .envrc.sample .envrc` 4. Edit `.envrc` - be sure to change `$DOMAIN` to something that resolves to your Docker swarm box -5. `direnv allow` (or `. .envrc`) +5. `direnv allow` (or `source .envrc`) 6. Generate secrets: ``` abra secret_generate db_password v1 diff --git a/compose.simplesaml.yml b/compose.simplesaml.yml index fe9d991..4450901 100644 --- a/compose.simplesaml.yml +++ b/compose.simplesaml.yml @@ -51,7 +51,6 @@ services: networks: - proxy entrypoint: /docker-entrypoint.simplesaml.sh - #entrypoint: ["tail", "-f", "/dev/null"] deploy: labels: - "traefik.enable=true" diff --git a/compose.yml b/compose.yml index 37967f4..b3f45c6 100644 --- a/compose.yml +++ b/compose.yml @@ -19,12 +19,9 @@ services: - DB_NAME=mediawiki volumes: - "mediawiki_images:/var/www/html/images" - - "parsoid:/usr/lib/parsoid" configs: - source: LocalSettings_conf target: /var/www/html/LocalSettings.php - - source: htaccess_conf - target: /var/www/html/.htaccess - source: entrypoint2_conf target: /docker-entrypoint2.sh mode: 0555 @@ -80,7 +77,6 @@ services: volumes: mariadb: mediawiki_images: - parsoid: networks: proxy: @@ -103,10 +99,6 @@ configs: name: ${STACK_NAME}_local_settings_${LOCAL_SETTINGS_CONF_VERSION} file: LocalSettings.php.tmpl template_driver: golang - htaccess_conf: - name: ${STACK_NAME}_htaccess_${HTACCESS_CONF_VERSION} - file: htaccess.tmpl - template_driver: golang entrypoint2_conf: name: ${STACK_NAME}_entrypoint2_${ENTRYPOINT_CONF_VERSION} file: entrypoint.sh.tmpl diff --git a/entrypoint.sh.tmpl b/entrypoint.sh.tmpl index e0dd407..145a70d 100755 --- a/entrypoint.sh.tmpl +++ b/entrypoint.sh.tmpl @@ -5,7 +5,7 @@ set -eu -o pipefail init_composer() { set -eu - if [ -n "$OPENID_ENABLED" ]; then + if [ -n "${OPENID_ENABLED-}" ]; then if ! type composer > /dev/null 2>&1; then apt update && apt install -y curl git unzip zip curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php @@ -18,7 +18,7 @@ init_composer() { composer_install() { set -eu - if [ -n "$OPENID_ENABLED" ]; then + if [ -n "${OPENID_ENABLED-}" ]; then cd /var/www/html/ && composer update && composer install fi } @@ -54,7 +54,7 @@ install_extensions() { /var/www/html/extensions/PluggableAuth fi - if [ -n "$SAML_ENABLED" ]; then + if [ -n "${SAML_ENABLED-}" ]; then if [ ! -d /var/www/html/extensions/SimpleSAMLphp ]; then git clone --depth 1 -b REL1_32 \ https://gerrit.wikimedia.org/r/p/mediawiki/extensions/SimpleSAMLphp \ @@ -62,7 +62,7 @@ install_extensions() { fi fi - if [ -n "$OPENID_ENABLED" ]; then + if [ -n "${OPENID_ENABLED-}" ]; then if [ ! -d /var/www/html/extensions/OpenIDConnect ]; then git clone --depth 1 -b REL1_35 \ https://gerrit.wikimedia.org/r/mediawiki/extensions/OpenIDConnect \ @@ -75,8 +75,6 @@ install_extensions() { main() { set -eu - a2enmod rewrite - install_extensions init_db