tarlepp/symfony-flex-backend

View on GitHub
compose.yaml

Summary

Maintainability
Test Coverage
services:
    php:
        container_name: symfony-backend-php-fpm
        hostname: php-fpm
        build:
            context: .
            dockerfile: ./Dockerfile_dev
            args:
                HOST_UID: $HOST_UID
                HOST_GID: $HOST_GID
        command: php-fpm
        user: $HOST_UID:$HOST_GID
        depends_on:
            - mariadb
        volumes:
            - ./:/app:cached
            - ./docker/php/php-dev.ini:/usr/local/etc/php/php.ini
            - ./docker/php/www-dev.conf:/usr/local/etc/php-fpm.d/www.conf
        tmpfs:
            - /app/var/:uid=$HOST_UID,gid=$HOST_GID
        environment:
            PHP_IDE_CONFIG: "serverName=app.localhost"
        extra_hosts:
            - "host.docker.internal:host-gateway"

    nginx:
        container_name: symfony-backend-nginx
        hostname: nginx
        build:
            context: ./docker/nginx/
            dockerfile: ./Dockerfile_dev
        depends_on:
            - php
        ports:
            - "8080:80"
            - "8000:443"
        volumes:
            - ./:/app:cached
            - ./docker/nginx/nginx-dev.conf:/etc/nginx/conf.d/default.conf
            - ./docker/nginx/ssl/:/etc/nginx/ssl/:ro
        tmpfs:
            - /app/var/:uid=$HOST_UID,gid=$HOST_GID

    mariadb:
        container_name: symfony-backend-mariadb
        hostname: mariadb
        build:
            context: ./docker/mariadb/
        command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
        environment:
            MYSQL_ROOT_PASSWORD: password
        ports:
            - "33060:3306"
        volumes:
            - mariadb:/var/lib/mysql

    dozzle:
        container_name: symfony-backend-dozzle
        hostname: dozzle
        image: amir20/dozzle
        ports:
            - "8100:8080"
        volumes:
            -  /var/run/docker.sock:/var/run/docker.sock

    adminer:
        container_name: symfony-backend-adminer
        hostname: adminer
        image: adminer
        environment:
            ADMINER_DEFAULT_SERVER: mariadb
            ADMINER_DESIGN: pepa-linha-dark
        ports:
            - "8200:8080"

volumes:
    mariadb: