version: "3.8"

services:
    nginx:
        build:
            dockerfile: docker/fpm/Dockerfile
            context: .
            target: symfony_nginx
        depends_on:
            - fpm

    fpm:
        build:
            context: .
            dockerfile: docker/fpm/Dockerfile
            target: symfony_php
            args:
                SYMFONY_VERSION: ${SYMFONY_VERSION:-}
                STABILITY: ${STABILITY:-stable}
        healthcheck:
            interval: 10s
            timeout: 3s
            retries: 3
            start_period: 30s
        environment:
            - SYMFONY_VERSION
            - COMPOSER_MEMORY_LIMIT=-1
        volumes:
            - var:/srv/app/var/
volumes:
    var:
