parent
a6737875ad
commit
6144c3531f
|
@ -11,4 +11,5 @@ export MEDIAWIKI_EMAIL_FROM="wiki@wiki.example.com"
|
|||
export DB_ROOT_PASSWORD_VERSION=v1
|
||||
export DB_PASSWORD_VERSION=v1
|
||||
export LOCAL_SETTINGS_CONF_VERSION=v1
|
||||
export HTACCESS_CONF_VERSION=v1
|
||||
export ENTRYPOINT_CONF_VERSION=v1
|
||||
|
|
|
@ -29,6 +29,8 @@ $wgMetaNamespace = "{{ env "MEDIAWIKI_SITENAMESPACE" }}";
|
|||
## https://www.mediawiki.org/wiki/Manual:Short_URL
|
||||
$wgScriptPath = "";
|
||||
|
||||
$wgArticlePath = "/wiki/$1";
|
||||
|
||||
## The protocol and server name to use in fully-qualified URLs
|
||||
$wgServer = "https://{{ env "DOMAIN" }}";
|
||||
|
||||
|
|
|
@ -37,6 +37,8 @@ services:
|
|||
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
|
||||
|
@ -81,7 +83,11 @@ 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
|
||||
file: entrypoint.sh.tmpl
|
||||
template_driver: golang
|
||||
|
|
|
@ -20,6 +20,8 @@ init_db() {
|
|||
main() {
|
||||
set -eu
|
||||
|
||||
a2enmod rewrite
|
||||
|
||||
init_db
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
# Generated using https://shorturls.redwerks.org
|
||||
|
||||
RewriteEngine On
|
||||
RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/index.php [L]
|
||||
|
||||
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
|
||||
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
|
||||
RewriteRule ^/?images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/thumb.php?f=$1&width=$2 [L,QSA,B]
|
||||
|
||||
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
|
||||
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
|
||||
RewriteRule ^/?images/thumb/archive/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/thumb.php?f=$1&width=$2&archived=1 [L,QSA,B]
|
Reference in New Issue