Open H4ns906 opened 2 years ago
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
I am experiencing this issue as well. Using the solution @H4ns906 suggested works for me, I added the following to my compose file:
command: ["/bin/sh", "-c", "sleep 10 && exec /startup.sh"]
Debug mode
Describe the bug
This is not really a bug report but more like a "bug and how to fix it" type of report, I dont know if there are other ways to report such thing but here I go. It is my 1st time opening an issue, so my apologies if it doesn't meet the requirements of doing such thing.
I'm trying to test the deployment of snipe-it along with a mariadb database using docker, so it is all local. here is a preview of the compose.yaml I used along with .env files.
after using
docker-compose -f compose.yaml up
and waiting for the deployment of both containers, I can only access snipeit in my browser after stopping and restarting the snipeit container which is weird. The problem is with volume permissions; the /startup.sh, which is the shell script executed by dockerfile, should normally assign the requiered permissions to the docker user but since the default user declared by Dockerfile is root, there is another process that creates folders in the volume and the docker user cant access them.To resolve the issue, I logged into the container after everything is up and executed
chown -R docker:root /var/www/html/storage/framework/cache
which is command you can find in the statup.sh. In the Snipeit doc (not the docker part), it is mentionned that a similar command should be executed but I dont think that would resolve the problem since it doesnt assign the directory to the docker user. here is the reference:I'm a newbie but I think the default user should be docker to avoid such problems. please correct me if I'm wrong. Hope this issue helps someone with the same problem.
Reproduction steps
Expected behavior
Following the steps above, you should access snipeit from your browser using the APP_URL defined in the .env-snipe
Screenshots
No response
Snipe-IT Version
docker image version for snipeit: 6.0.5; and for mariadb: 10.7.4
Operating System
(managed by Docker, refer to dockerhub)
Web Server
Apache (it is all managed by the container)
PHP Version
(same thing here, it is managed by the container, refer to dockerhub)
Operating System
Ubuntu 22.04 LTS
Browser
opera
Version
No response
Device
No response
Operating System
No response
Browser
No response
Version
No response
Error messages
No response
Additional context
No response