version: '2'
services:
    tpf-app:
        image: tpf
        environment:
            - _JAVA_OPTIONS=-Xmx1024m -Xms512m
            - SPRING_PROFILES_ACTIVE=prod,swagger
            - SPRING_DATASOURCE_URL=jdbc:mysql://smart-farm-mysql:3306/smart_farm?useUnicode=true&characterEncoding=utf8&useSSL=false
            - JHIPSTER_SLEEP=10 # gives time for the database to boot before the application
            - SPRING_DATA_JEST_URI=http://smart-farm-elasticsearch:9200
        ports:
            - 8080:8080
    smart-farm-mysql:
        extends:
            file: mysql.yml
            service: smart-farm-mysql
    smart-farm-elasticsearch:
        extends:
            file: elasticsearch.yml
            service: smart-farm-elasticsearch
