version: '0.1-dev'

services:
- name: database
  containers:
  - image: mariadb:10
    env:
      - MYSQL_ROOT_PASSWORD=rootpasswd
      - MYSQL_DATABASE=wordpress
      - MYSQL_USER=wordpress
      - MYSQL_PASSWORD=wordpress
    ports:
    - port: 3306

- name: web
  containers:
  - image: wordpress:4
    env:
    - WORDPRESS_DB_HOST=database:3306
    - WORDPRESS_DB_PASSWORD=wordpress
    - WORDPRESS_DB_USER=wordpress
    - WORDPRESS_DB_NAME=wordpress
    ports:
    - port: 80

version: '0.1-dev'

services:
- name: database
  containers:
  - image: mariadb:10
    env:
      - MYSQL_ROOT_PASSWORD=rootpasswd
      - MYSQL_DATABASE=wordpress
      - MYSQL_USER=wordpress
      - MYSQL_PASSWORD=wordpress
    ports:
    - port: 3306

- name: web
  containers:
  - image: wordpress:4
    env:
    - WORDPRESS_DB_HOST=database:3306
    - WORDPRESS_DB_PASSWORD=wordpress
    - WORDPRESS_DB_USER=wordpress
    - WORDPRESS_DB_NAME=wordpress
    ports:
    - port: 80
      type: external

Make Wordpress accessible by a loadbalancer
Make Wordpress accessible by a loadbalancer
