version: '3'

services:

  sql:
    container_name: webcat-sql
    restart: always
    image: mysql/mysql-server:5.7 #:latest
    ports:
        - 3306:3306
    environment:
        MYSQL_ROOT_PASSWORD: contrasenna
        MYSQL_DATABASE: WebCAT
        MYSQL_USER: admin
        MYSQL_PASSWORD: contrasenna
    volumes:
        - my-datavolume:/var/lib/mysql

  webcat:
    container_name: webcat
    restart: always
    image: pablogn/web-cat
    depends_on:
        - sql
    ports:
        - "666:8080"
    volumes:
        - WebCAT-datavolume:/datos
volumes:
    my-datavolume:
    WebCAT-datavolume:

