Cannot connect to Postgres after install
kevinvanryck opened this issue · comments
I've been trying to setup this docker image locally but I'm getting connection issues with Postgres.
When browsing to the nginx server, I get the install page. I try to start up the installation with the Postgres credentials setup in my docker compose file, however it doesn't connect.
The strange thing is, I'm able to connect using a postgres client, but not through then nginx mybb.
This is what I've got in my docker-compose.yaml
:
version: '3.6'
services:
mybb:
image: mybb/mybb:latest
volumes:
- ${PWD}/mybb:/var/www/html:rw
- ${PWD}/plugins:/var/www/html/inc/plugins:rw
depends_on:
- postgresql
links:
- postgresql
nginx:
image: nginx:mainline
ports:
- published: 8080
target: 80
volumes:
- ${PWD}/mybb:/var/www/html:ro
- ${PWD}/nginx:/etc/nginx/conf.d:ro
restart: always
postgresql:
environment:
POSTGRES_DB: mybb
POSTGRES_PASSWORD: changeme
POSTGRES_USER: mybb
image: postgres:10.4
ports:
- published: 5432
target: 5432
restart: always
volumes:
- ${PWD}/postgres/data:/var/lib/postgresql/data:rw
Then I've also got the nginx/default.conf file as described in the readme, unchanged.
Is the mybb container supposed to automatically install the tables, or are we supposed to do this manually? Any idea why it's not connecting?
What settings are you using in MyBB to connect to PostgreSQL? I believe they should be as follows: - Host:
postgresql
- Database:mybb
- Username:mybb
- Password:changeme
The docker image doesn't set up the tables, you have to do a normal install with the MyBB installer web pages.
…
I just noticed, I didn't try putting postgresql as host, let me try again 😁
What settings are you using in MyBB to connect to PostgreSQL? I believe they should be as follows: - Host:
postgresql
- Database:mybb
- Username:mybb
- Password:changeme
The docker image doesn't set up the tables, you have to do a normal install with the MyBB installer web pages.
…
Worked like a charm, thanks! Might be worth mentioning in the readme the hostname to be used.
Pinging @kawaii since he's the principal maintainer :) Might be best to provide some further documentation/instructions.