Wordpress - cannot change username or password in docker-compose

admin

Administrator
Staff member
If I use this inside docker-compose, it works fine:
Code:
db_node_domain:
 image: mysql:5.7
 volumes:
   - ./db_data:/var/lib/mysql
 restart: always
 environment:
   MYSQL_ROOT_PASSWORD: mystrongpassword
   MYSQL_DATABASE: wordpress
   MYSQL_USER: wordpress
   MYSQL_PASSWORD: wordpress
 container_name: wp_db
 networks:
   - "proxy-tier"

wordpress:
 depends_on:
   - db_node_domain
 image: wordpress:latest
 ports:
   - "8080:80"
 expose:
   - "8080"
 restart: always
 environment:
   VIRTUAL_HOST: blog.mydomain.com
   LETSENCRYPT_HOST: blog.mydomain.com
   LETSENCRYPT_EMAIL: [email protected]
   WORDPRESS_DB_HOST: db_node_domain:3306
   WORDPRESS_DB_USER: wordpress
   WORDPRESS_DB_PASSWORD: wordpress
 container_name: wordpress
 networks:
   - "proxy-tier"
I want to use different username and stronger passwords for MYSQL_USER and WORDPRESS_DB_USER but if I make any changes at all in them I get 502 Bad Gateway from nginx. Can I not change these?