linuxserver / docker-snipe-it

Alpine/Nginx container for the Asset Management software Snipe-IT
GNU General Public License v3.0
123 stars 26 forks source link

[BUG] Error 500 after fresh installation (workaround) #68

Open toskium opened 3 months ago

toskium commented 3 months ago

Is there an existing issue for this?

Current Behavior

I just installed the latest version of snipe-it:

v6.4.0-ls274

using docker-compose (see docker-compose.yml). However when first trying to access the URL it redirects to https://snipeit.mydomain.tld/setup which results in an error 500 instead of the setup assistant.

Running php artisan migrate inside the snipeit container fixes the issue.

Maybe this can be fixed in the next version.

Expected Behavior

Setup assistant should start as expected.

Steps To Reproduce

  1. Install fresh copy of snipe-it
  2. visit app URL
  3. see error 500 instead of setup wizard

Environment

- OS: Debian 12
- Docker was installed sudo curl -sSL https://get.docker.com | sh

CPU architecture

arm64

Docker creation

services:

  snipeit:
    image: lscr.io/linuxserver/snipe-it:latest
    container_name: snipeit
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Berlin
      - APP_URL=https://snipeit.mydomain.tld
      - MYSQL_PORT_3306_TCP_ADDR=snipeit_db
      - MYSQL_PORT_3306_TCP_PORT=3306
      - MYSQL_DATABASE=snipeitdb
      - MYSQL_USER=snipeit
      - MYSQL_PASSWORD=password
    volumes:
      - ./snipeit/data:/config
    ports:
      - 8080:80
    networks:
      - proxy
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.snipeit.rule=Host(`snipeit.mydomain.tld`)"
      - "traefik.http.routers.snipeit.entrypoints=https"
      - "traefik.http.routers.snipeit.tls=true"
      - "traefik.http.services.snipeit.loadbalancer.server.port=80"
    restart: unless-stopped

  snipeit_db:
    image: lscr.io/linuxserver/mariadb:latest
    container_name: snipeit_db
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Berlin
      - MYSQL_ROOT_PASSWORD=password
      - MYSQL_DATABASE=snipeitdb
      - MYSQL_USER=snipeit
      - MYSQL_PASSWORD=password
    volumes:
      - ./mariadb/config:/config
    ports:
      - 3306:3306
    networks:
      - proxy
    restart: unless-stopped

networks:
  proxy:
    external: true

### Container logs
└~/docker ─ docker logs snipeit
[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] 02-default-location: skipped
[migrations] done
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support the app dev(s) visit:
Snipe-IT: https://snipeitapp.com/donate

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────

using keys found in /config/keys
[custom-init] No custom files found, skipping...
[ls.io-init] done.
github-actions[bot] commented 3 months ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

LinuxServer-CI commented 2 months ago

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

jennso commented 1 month ago

I have this same issue fresh install of version v7.0.9-ls287

LinuxServer-CI commented 3 weeks ago

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.