name: opp

services:
    opp-php:
        build:
            context: ../../../infra/docker/php82-fpm
        volumes:
            - .:/var/www/html
        networks:
            - mozart-network
        tty: true
        stdin_open: true

    opp-nginx:
        image: nginx:alpine
        volumes:
            - .:/var/www/html
            - ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
        # ports:
        #     - "8083:80" # Desactive au profit de Traefik, decommentez si besoin d'acces direct
        expose:
            - "80"
        networks:
            - mozart-network
        depends_on:
            - opp-php
        labels:
            - traefik.enable=true
            - traefik.http.routers.opp.rule=Host(`front.octave.immo.docker`)
            - traefik.http.routers.opp.entrypoints=websecure
            - traefik.http.routers.opp.tls=true
            - traefik.http.services.opp.loadbalancer.server.port=80
            - traefik.docker.network=mozart-network

networks:
    mozart-network:
        external: true
