Open ovizii opened 6 years ago
always change LocalSettings.php, not LocalSettings.php.template!
You can unomment https://github.com/krabina/Datencockpit/blob/master/wiki/LocalSettings.php#L143 but you have to have a correct .htaccess file prepared: http://www.mediawiki.org/wiki/Manual:Short_URL/Apache
Thanks, I'll give it a try. after copying LocalSettings.php.template to LocalSettings.php and editing it, do I simply trigger the build process again or do I need to remove/clean some caches for the new settings to be applied?
Also, any advice on how to get this working with HTTPS without any warnings about insecure components? Any variables or URLs to set? So far I only found this one to change:
datencockpit:
build:
context: .
args:
DATENCOCKPIT_SITENAME: "Datencockpit"
DATENCOCKPIT_URL: "https://sub.domain.tld"
The build process creates the LocalSettings.php out of the template, so it will overwritte any changes you make manually => do not trigger it afterwards
About the HTTPS: Simply chaning the protocol from http to https is not sufficient. You would need to have a SSL Server Certificate in place. If your server is accessible to the internet you can use let's encrypt. There are 2 practical docker images that set up a nginx reverse proxy and automatically obtain and refresh let's encrypt certificates for any running docker containers with the right environment variables (VIRTUAL_HOST and LETSENCRYPT_HOST):
https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion
You can add the following section to the services section of your docker-compose.yml:
nginx-proxy:
image: jwilder/nginx-proxy
ports:
- "80:80"
- "443:443"
volumes:
- "/etc/nginx/vhost.d"
- "/usr/share/nginx/html"
- "/var/run/docker.sock:/tmp/docker.sock:ro"
- "/etc/nginx/certs"
letsencrypt-nginx-proxy-companion:
image: jrcs/letsencrypt-nginx-proxy-companion
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
volumes_from:
- "nginx-proxy"
then change the ports part of the datencockpit service from:
ports:
- 80:80
to:
ports:
- 80
and add an environment part to the datencockpit service:
environment:
- VIRTUAL_HOST=sub.domain.tld
- VIRTUAL_PORT=80
- LETSENCRYPT_HOST=sub.domain.tld
- LETSENCRYPT_EMAIL=adminemail@example.com
and finally run
docker-compose up -d
again. I have not tested this, so please search the web or the documentation of the 2 docker images if you run into any troubles.
Thanks for the detailed answer and sorry for not giving you enough info.
Regarding HTTPS:
I already have a reverse proxy in place, I am using traefik so the letsencrypt certificate is already in place and working. I think I have identified the problem. Inside the LocalSettings.php file there were a couple of hard coded http links. I will try and see if changing those works:
$wgFooterIcons['poweredby']['kdz'] = array(
"src" => "https://www.datencockpit.at/images/projektvon_kdz.png",
"url" => "https://www.kdz.or.at",
"alt" => "ein Projekt des KDZ",
"height" => "31",
"width" => "100",
);
$wgFooterIcons['poweredby']['wikiahoi'] = array(
"src" => "https://www.datencockpit.at/images/projektvon_wikiahoi.png",
"url" => "https://www.wikiahoi.at/dsgvo/",
"alt" => "ein Projekt von Wikiahoi",
"height" => "31",
"width" => "100",
);
$wgFooterIcons['poweredby']['netidee'] = array(
"src" => "https://www.datencockpit.at/images/0/0e/Netidee.jpg",
"url" => "https://www.netidee.at",
"alt" => "supported by netidee.at",
"height" => "31",
"width" => "100",
);
I am confused by two of your statements, they sound contradictory or I might have misunderstood. Would you mind clarifying?
At first you said:
always change LocalSettings.php, not LocalSettings.php.template!
Then later on:
The build process creates the LocalSettings.php out of the template, so it will overwrite any changes you make manually => do not trigger it afterwards
Does that mean I trigger the build process ONCE then make my changes to the LocalSettings.php? What if I later change stuff inside the docker-compose.yml don't I have to trigger the build process again thus making my changes to LocalSettings.php useless as it gets overwritten?
P.S. Thanks for the brilliant explanations and just for the record, if one of my questions is above the scope you feel comfortable giving support for, feel free to send me to google.com
The URLs are quite ugly by default containing index.php which results in something like sub.domain.tld/index.php/Datencockpit
I have read https://www.mediawiki.org/wiki/Manual:Short_URL but I didn't fully understand how to change LocalSettings.php.template to get something prettier like sub.domain.tld/DSGVO/Datencockpit as the result.
Can you help out?