I use docker-compose with the following `docker-compose.yml`:

```
web_db:
   image: mariadb:latest
   restart: always
   volumes:
    - ./var/mysql:/var/lib/mysql
   environment:
    MYSQL_ROOT_PASSWORD: X
    MYSQL_DATABASE: wordpress
    MYSQL_USER: wordpress
    MYSQL_PASSWORD: X
    MYSQL_ROOT_PASSWORD: X

web_front:
  image: nginx
  restart: always
  ports:
    - 80:80
  links:
    - web_fpm
  volumes:
    - ./www:/var/www/html:rw
    - ./etc/nginx/nginx.conf:/etc/nginx/nginx.conf:ro

web_fpm:
  build: ./PHP-FPM/
  restart: always
  links:
    - web_db:mysql
  volumes:
    - ./www:/var/www/html

```

When configuring Wordpress (manually downloaded in nginx root directory), I'm asked for the address of the database. I've tried `localhost`, but it doesn't work.

PS: I know there are Wordpress images for Docker, but they have the full stack (nginx + PHP) and I don't like it, so don't propose them. ;)