version: "3.1"
services:
  db:
    image: mysql:5.7
    container_name: res-mysql
    #restart: always
    environment:
      MYSQL_ROOT_PASSWORD: my-secret-password
      MYSQL_DATABASE: wyc
    volumes:
      - ./mysql-data:/var/lib/mysql
  res:
    image: res:latest
    ports:
      - 8080:80
    volumes:
      - .:/var/www/html
        #dbclient:
    #image: mysql:5.7 --rm mysql sh -c 'exec mysql -h"$MYSQL_PORT_3306_TCP_ADDR" -P"$MYSQL_PORT_3306_TCP_PORT" -uroot -p"$MYSQL_ENV_MYSQL_ROOT_PASSWORD"'
