InvoiceShelf / docker

InvoiceShelf Docker Image public repository
https://hub.docker.com/r/invoiceshelf/invoiceshelf
14 stars 5 forks source link

Docker-compose Setup broken for application container #3

Closed ireznik closed 4 months ago

ireznik commented 9 months ago

I followed the documentation by creating a copy of my own docker-compose.yaml file like the docs mention. Howeever when I try to start the setup I will encounter a loop for the invoiceshelf app container retrying to check & fix permissions in a loop like the following: image

I also tried to rebuild manually the docker images locally and rerun it. However this was not possible for me. However, I found a solution at least to start the application server by manually running the following by running the application server as a stand-alone container:

docker run -d \                                                                                                                                                       
--name=invoiceshelf22 \
-v /host_path/invoiceshelf/conf:/conf \
-v /host_path/invoiceshelf/uploads:/uploads \
-v /host_path/invoiceshelf/sym:/sym \
-e PUID=1000 \
-e PGID=1000 \
-e PHP_TZ=UTC \
-e TIMEZONE=UTC \
-e DB_CONNECTION=mysql \
-e DB_HOST=invoiceshelf_db \
-e DB_PORT=3306 \
-e DB_DATABASE=invoiceshelf \
-e DB_USERNAME=invoiceshelf \
-e DB_PASSWORD=invoiceshelf \
-p 90:80 \
--net invoiceshelf_invoiceshelf \
--link invoiceshelf_db \
invoiceshelf/invoiceshelf

For the database I simply started only the database container from the compose setup to verify a working solution. What I noticed:

I did not find the exact location of this issue, but I assume it is somewhere while running the inject.sh or entrypoint.sh scripts.

For reference here is the discord thread: https://discord.com/channels/1200813332551192606/1200907372210696354/1207261262992384030

Found a workaround with v1.1.0: the env variabe SKIP_PERMISSIONS_CHECKS expects the value yes instead of a boolean: `

sebarnd commented 9 months ago

The Container trys to change the permissions in the folder just mounted to /data. Do you run docker as a non-root user? Does that user have write access to the folder mounted to /data.

ireznik commented 9 months ago

The Container trys to change the permissions in the folder just mounted to /data. Do you run docker as a non-root user? Does that user have write access to the folder mounted to /data.

I run docker as root user. I made sure that the permissions are set correctly for the mounted volume and the containing directory. Also tried to use a bind mount without any success.

ireznik commented 8 months ago

FYI: I just tried out to run the setup with version 1.0.0 for the invoiceshelf application and it started without any issues for me

gdarko commented 8 months ago

FYI: I just tried out to run the setup with version 1.0.0 for the invoiceshelf application and it started without any issues for me

Hey @ireznik - Do you mean the docker image 1.0.0 or the application 1.0.0?

Thanks.

ireznik commented 8 months ago

Hey @ireznik - Do you mean the docker image 1.0.0 or the application 1.0.0?

Thanks.

Sorry for the confusion. I meant the docker image for invoiceshelf with version 1.0.0

ireznik commented 8 months ago

Update: I once again checked the entrypoint.sh script and found the issue why the flag SKIP_PERMISSIONS_CHECKS did not work. It seems that I missed the part where it expects the value yes instead of a boolean. When setting it to yes, I can skip the permission checks and also startup successfully the setup with the latest image without issues

gdarko commented 4 months ago

The docker images were updated recently. To upgrade to the latest version follow the guide:

https://github.com/InvoiceShelf/docker?tab=readme-ov-file#compose-upgrade