Question: Setting the container up for connection to another database host #1
Comments
The SSL should be self-signed^^ Forgot to mention tat. |
Hi @SeppPenner, a sample version: '2.3'
services:
phpbb:
image: blueimp/phpbb:3.2
ports:
- 443:443
environment:
- SERVER_NAME=example.org
- DBHOST=192.168.2.205
- DBPORT=3307
- DBNAME=phpBB
- DBUSER=phpBB
- DBPASSWD=phpBB
volumes:
- ./ssl:/etc/apache2/ssl
- ./files:/var/www/html/files
- ./store:/var/www/html/store
- ./avatars-upload:/var/www/html/images/avatars/upload The container runs a redirect service from HTTP to HTTPS, but as long as you don't expose port For the self-signed SSL certificate, you could follow the SSL setup guide. The other host mounts are for your existing |
Hi @blueimp, |
Hi @blueimp, I have now the following setup: where I only adjusted the passwords and host and so on in the Dockerfile:
I generated SSL files locally under the ssl subfolder in the same folder as the Dockerfile. (See image) Building the Dockerfile locally with docker build . -f Dockerfile works:
If I try to run the Dockerfile now with e.g.
I get the following message:
and the web server under the IP address does not respond... Why do I use the Dockerfile and not docker-compose? --> The docker-compose setup from the official site does somehow not work... Is my database port really 3307? --> Yes. Was changed during the update from MariaDB5 to MariaDB10. |
Do you have any idea what's wrong there? Thank you in advance 👍 EDIT: |
You get that error cause you did not host-mount the SSL directory, nor did you pass on the A working invocation with your setup would be: docker run -v "$PWD/ssl:/etc/apache2/ssl" -e SERVER_NAME=localhost nginxphpbb There are some other issues with your setup:
I'm closing this issue ticket now, as this is really not about any issue with this project, but rather about your specific setup requirements. |
Thank you, @blueimp. It works now 👍 |
Just one more thing: When I setup the board with the phpBB install page, I always get the following message: Renaming the install directory in the container: docker exec -t -i phpbb /bin/bash
cd /var/www/html/phpbb
mv install install_old does not seem to solve this. Do you have any suggestions here? Thanks again for your patience :) |
Make sure that |
Ok, thanks. But now I get the following message:
|
Let's assume that I already have a MySQL instance running on server 192.168.2.205 and already existing phpBB tables in it.
Your container seems to be perfect for my use case:
Running phpBB on another host (let's say 192.168.2.212) with connection to the MySQL DB on 192.168.2.205 (Let's assume username and password/ database all to be phpBB)
SSL only, so I do only want to have port 443 for the Webserver (disallow HTTP, enforce HTTPS)
No additional requirements (Except using volumes for the Html data)
No backups or so one needed (On AWS or whatever)
So the question is: How can I configure the container like that? :D
The text was updated successfully, but these errors were encountered: