version: '3'
services:
    postgres:
        image: postgres:10.11-alpine
        ports:
            - "5432:5432"
        environment:
            - POSTGRES_USER=USER
            - POSTGRES_PASSWORD=PASSWORD
            - POSTGRES_DB=myhealth
        volumes:
            - ./2.database/01.CreateTables.sql:/docker-entrypoint-initdb.d/01.CreateTables.sql
            - ./2.database/02.Datos_prueba.sql:/docker-entrypoint-initdb.d/02.Datos_prueba.sql
    wildfly:
        build: .
        ports:
            - "8080:8080"
        environment:
            - DB_USER=USER
            - DB_PASS=PASSWORD
            - JBOSS_HOME=/opt/jboss/wildfly
        depends_on:
            - postgres

