ben-xo / dir2cast

Turn a directory of MP3s into a podcast - automatically.
http://www.ben-xo.com/dir2cast
BSD 3-Clause "New" or "Revised" License
156 stars 22 forks source link

No files are created in the temp caching folder #75

Open MichielvanBeers opened 1 year ago

MichielvanBeers commented 1 year ago

Hi,

I'm currently running the project using the (default) docker configuration. When I don't change anything and run sudo docker-compose up everything runs as expected. However, when I make changes to my dir2cast.ini file and rerun the container, the changes are not reflected (specifically increase the value of ITEM_COUNT from 10 to 99). Also adding the FORCE_PASSWORD and trying to force a cache refresh doesn't work. When I open the /tmp folder, it is also empty, giving me the idea that something is going wrong there. Is there a way to run a debugger to see where it breaks? Thanks in advance!

MichielvanBeers commented 1 year ago

Ah, I think I got it! The dir2cast.ini is not mapped to the Docker container. Adding it as a volume like ./dir2cast.ini:/dir2cast.ini fixes it. I can do a PR for that if you want.

However, I still don't see the data generated in the tmp folder. Do you know what might be causing that?

ben-xo commented 1 year ago

The tmp folder will be inside the container unless you map that too.

MichielvanBeers commented 1 year ago

Hi @ben-xo,

Thanks for your reply. I thought the same, but I can't see the content in the container as well. See below for some details. Any ideas?

Docker-compose yaml

version: "2.3"

# after "docker-compose up" try the following URLs as examples:
# http://localhost:8080/
# http://localhost:8080/test/fixtures/

services:
    web:
        image: nginx:alpine
        restart: unless-stopped
        ports:
            - "5001:80"
        volumes:
            - .:/var/www/html
            - ./docker-compose/nginx/default.conf:/etc/nginx/conf.d/default.conf
        links:
            - php-fpm

    php-fpm:
        image: php:7-fpm-alpine
        restart: unless-stopped
        volumes:
            - .:/var/www/html

            # You could also create a Dockerfile FROM php:7-fpm-alpine which includes these next two
            - ./dir2cast.php:/dir2cast.php
            - ./dir2cast.ini:/dir2cast.ini
            - ./getID3:/getID3

            # You should map a temp folder in otherwise you'll see errors about permission denied mkdir()
            - /tmp:/temp

Output of terminal after connecting with the php-fpm container

/var/www/html # ls
CHANGELOG.txt       LICENSE             README.md           books               dir2cast.ini        dir2cast.php        docker-compose      docker-compose.yml  getID3              temp                test                tmp
/var/www/html # cd temp/
/var/www/html/temp # ls -a
.   ..
/var/www/html/temp # cd ..
/var/www/html # cd tmp
/var/www/html/tmp # ls -a
.   ..
/var/www/html/tmp #