version: '3.1'

services:
    pgsql:
        build:
            context: ./postgres
        restart: always
        environment:
            POSTGRES_USER: postgres
            POSTGRES_PASSWORD: root
            #development database
            POSTGRES_DB: platform
            #test database
            TEST_DB: test
        volumes:
            - ./volumes/postgres:/var/lib/postgresql/data
        networks:
            - phpunit
    php:
        build:
            context: ./php
        restart: unless-stopped
        tty: true
        volumes:
            - ../:/var/www/platform/
        networks:
            - phpunit

    adminer:
        image: adminer
        restart: always

networks:
    phpunit:
