title: Create database on docker-compose startup
body: <p>I would like to create a MySQL database using environment variables in docker-compose.yml file, but it is not working. I have the following code:</p>
  
  <pre><code># The Database
  database:
    image: mysql:5.7
    volumes:
      - dbdata:/var/lib/mysql
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: secret
      MYSQL_DATABASE: homestead
      MYSQL_USER: root
      MYSQL_PASSWORD: secret
    ports:
      - "33061:3306"
  </code></pre>
  
  <p>Could someone explain the function of this vars?</p>