Further post-image-switch tidying

Ref #8
This commit is contained in:
3wc 2020-10-24 19:01:17 +02:00
parent 0e196b33d2
commit a8b31310ba
5 changed files with 5 additions and 17 deletions

View File

@ -24,7 +24,6 @@ steps:
DB_PASSWORD_VERSION: v1 DB_PASSWORD_VERSION: v1
MEDIAWIKI_SECRET_KEY_VERSION: v1 MEDIAWIKI_SECRET_KEY_VERSION: v1
LOCAL_SETTINGS_CONF_VERSION: v1 LOCAL_SETTINGS_CONF_VERSION: v1
HTACCESS_CONF_VERSION: v1
ENTRYPOINT_CONF_VERSION: v1 ENTRYPOINT_CONF_VERSION: v1
trigger: trigger:
branch: branch:

View File

@ -13,7 +13,7 @@ Based on [`mediawiki`][mediawiki].
3. `cp .envrc.sample .envrc` 3. `cp .envrc.sample .envrc`
4. Edit `.envrc` - be sure to change `$DOMAIN` to something that resolves to 4. Edit `.envrc` - be sure to change `$DOMAIN` to something that resolves to
your Docker swarm box your Docker swarm box
5. `direnv allow` (or `. .envrc`) 5. `direnv allow` (or `source .envrc`)
6. Generate secrets: 6. Generate secrets:
``` ```
abra secret_generate db_password v1 abra secret_generate db_password v1

View File

@ -51,7 +51,6 @@ services:
networks: networks:
- proxy - proxy
entrypoint: /docker-entrypoint.simplesaml.sh entrypoint: /docker-entrypoint.simplesaml.sh
#entrypoint: ["tail", "-f", "/dev/null"]
deploy: deploy:
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"

View File

@ -19,12 +19,9 @@ services:
- DB_NAME=mediawiki - DB_NAME=mediawiki
volumes: volumes:
- "mediawiki_images:/var/www/html/images" - "mediawiki_images:/var/www/html/images"
- "parsoid:/usr/lib/parsoid"
configs: configs:
- source: LocalSettings_conf - source: LocalSettings_conf
target: /var/www/html/LocalSettings.php target: /var/www/html/LocalSettings.php
- source: htaccess_conf
target: /var/www/html/.htaccess
- source: entrypoint2_conf - source: entrypoint2_conf
target: /docker-entrypoint2.sh target: /docker-entrypoint2.sh
mode: 0555 mode: 0555
@ -80,7 +77,6 @@ services:
volumes: volumes:
mariadb: mariadb:
mediawiki_images: mediawiki_images:
parsoid:
networks: networks:
proxy: proxy:
@ -103,10 +99,6 @@ configs:
name: ${STACK_NAME}_local_settings_${LOCAL_SETTINGS_CONF_VERSION} name: ${STACK_NAME}_local_settings_${LOCAL_SETTINGS_CONF_VERSION}
file: LocalSettings.php.tmpl file: LocalSettings.php.tmpl
template_driver: golang template_driver: golang
htaccess_conf:
name: ${STACK_NAME}_htaccess_${HTACCESS_CONF_VERSION}
file: htaccess.tmpl
template_driver: golang
entrypoint2_conf: entrypoint2_conf:
name: ${STACK_NAME}_entrypoint2_${ENTRYPOINT_CONF_VERSION} name: ${STACK_NAME}_entrypoint2_${ENTRYPOINT_CONF_VERSION}
file: entrypoint.sh.tmpl file: entrypoint.sh.tmpl

View File

@ -5,7 +5,7 @@ set -eu -o pipefail
init_composer() { init_composer() {
set -eu set -eu
if [ -n "$OPENID_ENABLED" ]; then if [ -n "${OPENID_ENABLED-}" ]; then
if ! type composer > /dev/null 2>&1; then if ! type composer > /dev/null 2>&1; then
apt update && apt install -y curl git unzip zip apt update && apt install -y curl git unzip zip
curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php
@ -18,7 +18,7 @@ init_composer() {
composer_install() { composer_install() {
set -eu set -eu
if [ -n "$OPENID_ENABLED" ]; then if [ -n "${OPENID_ENABLED-}" ]; then
cd /var/www/html/ && composer update && composer install cd /var/www/html/ && composer update && composer install
fi fi
} }
@ -54,7 +54,7 @@ install_extensions() {
/var/www/html/extensions/PluggableAuth /var/www/html/extensions/PluggableAuth
fi fi
if [ -n "$SAML_ENABLED" ]; then if [ -n "${SAML_ENABLED-}" ]; then
if [ ! -d /var/www/html/extensions/SimpleSAMLphp ]; then if [ ! -d /var/www/html/extensions/SimpleSAMLphp ]; then
git clone --depth 1 -b REL1_32 \ git clone --depth 1 -b REL1_32 \
https://gerrit.wikimedia.org/r/p/mediawiki/extensions/SimpleSAMLphp \ https://gerrit.wikimedia.org/r/p/mediawiki/extensions/SimpleSAMLphp \
@ -62,7 +62,7 @@ install_extensions() {
fi fi
fi fi
if [ -n "$OPENID_ENABLED" ]; then if [ -n "${OPENID_ENABLED-}" ]; then
if [ ! -d /var/www/html/extensions/OpenIDConnect ]; then if [ ! -d /var/www/html/extensions/OpenIDConnect ]; then
git clone --depth 1 -b REL1_35 \ git clone --depth 1 -b REL1_35 \
https://gerrit.wikimedia.org/r/mediawiki/extensions/OpenIDConnect \ https://gerrit.wikimedia.org/r/mediawiki/extensions/OpenIDConnect \
@ -75,8 +75,6 @@ install_extensions() {
main() { main() {
set -eu set -eu
a2enmod rewrite
install_extensions install_extensions
init_db init_db