snipe / snipe-it

A free open source IT asset/license management system
https://snipeitapp.com
GNU Affero General Public License v3.0
10.4k stars 3.06k forks source link

Failed to load image after upgrade SnipeIT docker version v4.9.5 to v5.0.9 #8822

Closed bvivi57 closed 3 years ago

bvivi57 commented 3 years ago

Expected Behavior (or desired behavior if a feature request)

Update my version of snipeIT deployed as a container and keep access to the images associated with my accessories.


Actual Behavior

Everything seems to work correctly except the access to the images. When I click on an accessory I get the following error "Failed to laod image: http://127.0.0.1:80/uploads/accessories/accessory-xxxxxxxx.jpg"


Please confirm you have done the following before posting your bug report:


Provide answers to these questions:


my actions

1) change tag on my docker-compose file for snipe/snipe-it:v5.0.9 2) restart my docker-compose (snipeIT+MariaDB) 3) access to shell on snipeIT docker context 4) run this command

5 ) restart my docker-compose (snipeIT+MariaDB)


My Docker-compose file

`version: '3.4'

services:

snipeit-db: container_name: snipe-db-${ENV} image: mysql:5.6 env_file:

volumes: dbstorage: name: snipesql-vol-${ENV} snipeitapp: name: snipeitapp-vol-${ENV} networks: traefik_share: external: true internal: name: snipeit-${ENV} external: false `


My env file

`# Mysql Parameters MYSQL_PORT_3306_TCP_ADDR=snipe-db-uat MYSQL_ROOT_PASSWORD=mypassword MYSQL_DATABASE=snipeit MYSQL_USER=snipeit MYSQL_PASSWORD=mypassword MYSQL_PORT_3306_TCP_PORT=3306 DB_CHARSET=utf8mb4 DB_COLLATION=utf8mb4_unicode_ci

SMTP Parameter

MAIL_DRIVER=smtp MAIL_HOST=smtp.mydomain.com MAIL_PORT=25 MAIL_ENCRYPTION=null MAIL_FROM_ADDR=it-admin@mydomain.com MAIL_FROM_NAME='ITAM-UAT' MAIL_REPLYTO_ADDR=it-admin@mydomain.com MAIL_REPLYTO_NAME='Snipe-IT-UAT' MAIL_BACKUP_NOTIFICATION_ADDRESS=it-admin@mydomain.com

Snipe-IT Settings

APP_ENV=production APP_DEBUG=false APP_KEY=base64:VEW+4js8YxpF8rgSSkAPzXUYMt43eT5iHHzqwaBjDHk= APP_TIMEZONE='Europe/Paris' APP_LOCALE=en APP_URL=http://127.0.0.1:80 MAX_RESULTS=1000 `


Additional information

I can upload an image. When I enter in the context of the container, I can see my image in "/var/lib/snipeit/data/uploads/accessories" (I also see my other images) I have the following rights: -rw-r--r-- 1 docker root I tried in chmod 777, it doesn't change anything. I don't have any error in the logs.

welcome[bot] commented 3 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.

bvivi57 commented 3 years ago

I find my problem: "APP_URL=http://127.0.0.1:80" I juste replace with "APP_URL=http://myurl:80" It's good now !! Sorry for this error

snipe commented 3 years ago

It happens :) glad you’re sorted