version: "3.7"

networks:
    deployment.network:
        driver: bridge

services:
    web:
        image: $AZURE_REGISTRY_IMAGE_URL_WEB
        # image: siddha.azurecr.io/siddha-web:1264434860-cicd-cf0c2787
        restart: unless-stopped
        container_name: siddha.web
        tty: true
        # depends_on:
        #     - mysql
        networks:
            - deployment.network
        # volumes:
        #     - .:/var/www
    nginx:
        image: $AZURE_REGISTRY_IMAGE_URL_NGINX
        # image: siddha.azurecr.io/siddha-nginx:1264434860-cicd-cf0c2787
        container_name: siddha.nginx
        restart: unless-stopped
        tty: true
        depends_on:
            - web
        ports:
            - "10443:433"
            - "8083:80"
        networks:
            - deployment.network
        # volumes:
        #     - .:/var/www

    # mysql:
    #     container_name: siddha.mysql8
    #     image: mysql:8.0
    #     command: mysqld --default-authentication-plugin=mysql_native_password --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
    #     networks:
    #         - deployment.network
    #     environment:
    #         - MYSQL_ROOT_PASSWORD=root
    #         - MYSQL_DATABASE=${DOCKER_DB_DATABASE:-siddha}
    #         - MYSQL_USER=${DOCKER_DB_USERNAME:-siddha}
    #         - MYSQL_PASSWORD=${DOCKER_DB_PASSWORD:-siddha}
    #     ports:
    #         - '3309:3306'
    #     volumes:
    #         - mysql-data:/var/lib/mysql
    redis:
        image: redis:latest
        container_name: siddha.redis
        platform: ${DOCKER_PLATFORM:-linux/amd64}
        command: redis-server --appendonly yes
        networks:
            - deployment.network
        volumes:
            - redis-data:/data
        ports:
            - ${REDIS_LOCAL_PORT}:6379
        environment:
            - REDIS_PASSWORD=&{REDIS_DEFAULT_PASSWORD:sidha}
            - REDIS_PORT=6379
            - REDIS_DATABASES=1
volumes:
#     mysql-data:
    redis-data:
