version: "3"

services:
    alfresco:
        image: ${REPOSITORY_IMAGE}:${REPOSITORY_TAG}
        environment:
            JAVA_OPTS : "
                -Ddb.driver=org.postgresql.Driver
                -Ddb.username=alfresco
                -Ddb.password=alfresco
                -Ddb.url=jdbc:postgresql://postgres:5432/alfresco
                -Dsolr.host=solr6
                -Dsolr.port=8983
                -Dsolr.secureComms=none
                -Dsolr.base.url=/solr
                -Dindex.subsystem.name=solr6
                "
        ports:
            - ${REPOSITORY_PORT}:8080 #Browser port

    share:
        image: ${SHARE_IMAGE}:${SHARE_TAG}
        environment:
            - REPO_HOST=alfresco
            - REPO_PORT=8080
        ports:
            - ${SHARE_PORT}:8080

    postgres:
        image: ${POSTGRES_IMAGE}:${POSTGRES_TAG}
        environment:
            - POSTGRES_PASSWORD=alfresco
            - POSTGRES_USER=alfresco
            - POSTGRES_DB=alfresco
        ports:
            - ${POSTGRES_PORT}:5432

    solr6:
        image: ${SOLR_IMAGE}:${SOLR_TAG}
        environment:
            #Solr needs to know how to register itself with Alfresco
            - SOLR_ALFRESCO_HOST=alfresco
            - SOLR_ALFRESCO_PORT=8080
            #Alfresco needs to know how to call solr
            - SOLR_SOLR_HOST=solr6
            - SOLR_SOLR_PORT=8983
            #Create the default alfresco and archive cores
            - SOLR_CREATE_ALFRESCO_DEFAULTS=alfresco,archive
        ports:
            - ${SOLR_PORT}:8983 #Browser port
            
    firefox:
        image: selenium/standalone-firefox:3.11
        volumes:
            - /dev/shm:/dev/shm
        ports:
            - 4444:4444
  
