This page is about the Docker container setup for Tjado's homeopathy forum.
Contents
The tjado forum runs on elba.informatik.uni-freiburg.de. It consists of the docker container "forum" with an Apache which serves the phpBB, and the docker container "mariadb" with the database.
Data locations
All data related to the docker container is in /home/docker/tjado/ . To migrate or backup the docker containers, just copying this folder is required. The actual forum data (phpBB files) is located inside /home/docker/tjado/forum-data and the SQL database data is in /home/docker/tjado/docker-volumes/
Changing the text for the Terms of Use (Nutzungsvereinbarung)
The text for the current terms of use is contained in the file /home/docker/tjado/forum-data/tjado/forum/language/de/ucp.php (starting from line 42).
Adding an Imprint (Impressum)
The overall footer can be edited in /home/docker/tjado/forum-data/tjado/forum/styles/subsilver2/template/overall_footer.html (this is a short file).
The overall header can be edited in /home/docker/tjado/forum-data/tjado/forum/styles/subsilver2/template/overall_header.html. To insert a link to the left of the FAQ link, go to line 177 (search FAQ). To insert a link after the title on the very top, go to line 157 (search SITENAME).
For these edits to become active, empty the caches (Administrationsbereich -> "Den Cache leeren" -> "Jetzt ausführen").
How to stop/restart
To stop or restart the "forum" or "mariadb" container, use this command:
cd /home/docker/tjado && sudo docker-compose restart forum
.. or with stop instead of restart respectively.
(the cd is necessary because docker-compose accesses the docker-compose.yml in /home/docker/tjado for settings)
If the containers aren't running, use the following command:
cd /home/docker/tjado && sudo-docker-compose up -d forum
(and with mariadb respectively)
How to get a shell
The containers work similarly to a virtual machine which an own contained linux install. To get a shell in the forum container with the Apache, run:
cd /home/docker/tjado && sudo docker-compose exec forum /bin/bash
and respectively for the forum:
cd /home/docker/tjado && sudo docker-compose exec mariadb /bin/bash
Detailed container settings
The detailed container settings can be found in /home/docker/tjado/docker-compose.yml for both containers, including the current SQL root password. The build instructions (what software is preinstalled in the containers) can be found in /home/docker/tjado/dockerfile-forums/Dockerfile and /home/docker/tjado/dockerfile-mariadb/Dockerfile .
How to make an independent copy of the forum
ssh elba sudo vim /home/docker/tjado/docker-compose.yml -> EDIT restart: unless-stopped cd /home/docker/tjado && sudo docker-compose stop sudo cp -a /home/docker/tjado /home/docker/tjado-tmp-copy cd /home/docker/tjado && sudo docker-compose start sudo vim /home/docker/tjado-tmp-copy/docker-compose.yml -> EDIT as follows: ipv4_address: 172.16.238.12 (change part after last dot) sudo vim /etc/apache2/sites-enabled/homeonet.conf -> EDIT as follows: ProxyPass /forum-tmp-copy http://172.16.238.12:80/forum-tmp-copy ProxyPassReverse /forum-tmp-copy http://172.16.238.12:80/forum-tmp-copy sudo /etc/init.d/apache2 restart sudo mv /home/docker/tjado-tmp-copy/forum-data/forum /home/docker/tjado-tmp-copy/forum-data/forum-tmp-copy cd /home/docker/tjado-tmp-copy && sudo docker-compose up -d cd /home/docker/tjado-tmp-copy && sudo docker-compose start sudo docker exec -it tjadotmpcopy_mariadb_1 /bin/bash $ mysql -p # PW in /home/docker/tjado-tmp-copy/docker-compose.yml > use forum-supervision-tjado; > select * from phpbb_config where config_name="script_path"; > update phpbb_config set config_value="/forum-tmp-copy/tjado" where config_name="script_path"; > select * from phpbb_config where config_name="script_path"; > select * from phpbb_config where config_name="server_name"; > update phpbb_config set config_value="<name without http://>" where config_name="server_name"; > select * from phpbb_config where config_name="server_name"; > select * from phpbb_config where config_name="cookie_domain"; > update phpbb_config set config_value="<name without http://>" where config_name="cookie_domain"; > select * from phpbb_config where config_name="cookie_domain"; > quit $ exit sudo rm /home/docker/tjado-tmp-copy/forum-data/forum-tmp-copy/tjado/cache/data_global.php
Update phpBB Version 3.2
Important: try on copy first, then do it for real
Adminstrationsbereicht -> PHP Information -> CHECK the following: PHP Version >= 5.4.0 (for phpBB Version 3.2) JSON Support enabled cd /home/docker/tjado-tmp-copy sudo wget https://downloads.phpbb.de/pakete/deutsch/3.2/3.2.2/phpBB-3.2.2-deutsch.zip sudo unzip phpBB-3.2.2-deutsch.zip https://www.phpbb.com/support/docs/en/3.2/ug/upgradeguide/upgrade3 -> follow the instructions: 1. Deactivate Styles [must make prosilver default first] 5. Remove all MOD-related changes [not applicable] 6. Set British English as the only language pack [not applicable] 12. Only works with sudo chown -R www-data:www-data cache