Why do extra folders get created in laravel public folder when i use docker as a dev environment and how do i stop it

Viewed 14

enter image description here

In the image above the extra folders in the public folder only appears when ever i set up a dev environment with docker, the logs go to these folders instead of the /storage/logs/. Another thing i experience when i use docker dev environment is i always have to reload cache (artisan optimize) before my config or route changes can be applied in the container.

THIS IS MY Docker-Compose FILE

version: "3"

networks:
    laravel:

services:
    nginx:
        container_name: testproj-nginx
        image: nginx:stable-alpine
        ports:
            - "2022:80"
        volumes:
            - ./:/var/www/html
            - ./nginx/default.conf:/etc/nginx/conf.d/default.conf
        depends_on:
            - php
            - mysql
        networks:
            - laravel

    mysql:
        image: mysql:8
        container_name: testproj-mysql
        restart: unless-stopped
        tty: true
        ports:
            - "2306:3306"
        volumes:
            - ./mysql:/var/lib/mysql
        environment:
            MYSQL_DATABASE: testproj
            MYSQL_USER: root_user
            MYSQL_PASSWORD: password
            MYSQL_ROOT_PASSWORD: password
            SERVICE_TAGS: dev
            SERVICE_NAME: mysql
        networks:
            - laravel

    php:
        build: ./
        container_name: testproj-php
        volumes:
            - ./:/var/www/html
        networks:
            - laravel

    mailhog:
        image: "mailhog/mailhog:latest"
        container_name: testproj-mailhog
        ports:
            - "${FORWARD_MAILHOG_PORT:-2025}:1025"
            - "${FORWARD_MAILHOG_DASHBOARD_PORT:-9025}:8025"
        networks:
            - laravel

    phpmyadmin:
        image: phpmyadmin/phpmyadmin
        container_name: testproj-pma
        links:
            - mysql
        environment:
            PMA_HOST: testproj-mysql
            PMA_PORT: 3306
            PMA_ARBITRARY: 1
        restart: always
        ports:
            - 8083:80
        networks:
            - laravel
        depends_on:
            - php
            - mysql
    # ngrok:
    #     image: wernight/ngrok:latest
    #     container_name: testproj-ngrok

    #     ports:
    #         - 4041:4040
    #     environment:
    #         NGROK_AUTH: ${NGROK_AUTH_KEY}
    #         NGROK_REGION: eu
    #         NGROK_PROTOCOL: http
    #         NGROK_PORT: testproj-nginx:80
    #     networks:
    #         - laravel
    #     depends_on:
    #         - nginx


0 Answers
Related