Docker compose files

Let's start by creating a directory, compose, as a sibling to the users and notes directories. In that directory, create a file named docker-compose.yml:

version: '3'services:  db-userauth:    image: "mysql/mysql-server:5.7"    container_name: db-userauth    command: [ "mysqld", "--character-set-server=utf8mb4",               "--collation-server=utf8mb4_unicode_ci",              "--bind-address=0.0.0.0" ]    expose:      - "3306"    networks:      - authnet    volumes:      - db-userauth-data:/var/lib/mysql      - ../authnet/my.cnf:/etc/my.cnf    environment:      MYSQL_RANDOM_ROOT_PASSWORD: "true"      MYSQL_USER: userauth      MYSQL_PASSWORD: userauth      MYSQL_DATABASE: userauth    restart: always  userauth:    build: ../users    container_name: userauth    depends_on:      - db-userauth    networks:      - authnet - frontnet ...

Get Node.js Web Development - Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.