I am trying to set up wordpress in Docker. Or rather to re-set it up as it worked on an older machine. I have the following
version: "3" services: db: image: mariadb volumes: - db_data:/var/lib/mysql restart: always environment: MYSQL_ROOT_PASSWORD: my_root_pword MYSQL_DATABASE: my_db MYSQL_USER: my_user MYSQL_PASSWORD: my_pword ports: - 3306:3306 wordpress: depends_on: - db image: wordpress:latest ports: - 8000:80 restart: always working_dir: /var/www/html volumes: - ../wordpress:/var/www/html phpmyadmin: image: phpmyadmin/phpmyadmin ports: - 61112:80 depends_on: - db environment: MYSQL_USERNAME: root MYSQL_ROOT_PASSWORD: my_root_pword restart: always volumes: db_data:
But I get an error
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.4. Set the 'ServerName' directive globally to suppress this message and - perhaps for the same reason - wordpress will not connect to mariadb when I load
This script is the first and only one I’ve ever written and I’m devastated that it has stopped working because Docker is hard. Any clues on how to solve this.