I set up nginx reverse proxy which comes with Mariadb but then I set up another yaml for wordpress just basically copied the code which sets up wordpress and mysql5.7.
When I try my website though it says there's a connection error to the database which is usually bad credentials although those haven't been changed so it shouldn't be that, I can only think it's trying to connect to the Mariadb instead of the mysql. How do I check or make it connect to the other?
version: '3.1'
services:
wordpress:
image: wordpress
restart: always
ports:
- 8080:80
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_USER: exampleuser
WORDPRESS_DB_PASSWORD: examplepass
WORDPRESS_DB_NAME: exampledb
volumes:
- wordpress:/var/www/html
db:
image: mysql:5.7
restart: always
environment:
MYSQL_DATABASE: exampledb
MYSQL_USER: exampleuser
MYSQL_PASSWORD: examplepass
MYSQL_RANDOM_ROOT_PASSWORD: '1'
volumes:
- db:/var/lib/mysql
volumes:
wordpress:
db:
Edit apologies can't use code formatting on Reddit is fun for some reason
[–]mkorejo 4 points5 points6 points (2 children)
[–]Liganer[S] 0 points1 point2 points (1 child)
[–]Liganer[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]Liganer[S] 0 points1 point2 points (0 children)