Code Monkey home page Code Monkey logo

docker-snipe-it's Introduction

linuxserver.io

Blog Discord Discourse Fleet GitHub Open Collective

The LinuxServer.io team brings you another container release featuring:

  • regular and timely application updates
  • easy user mappings (PGID, PUID)
  • custom base image with s6 overlay
  • weekly base OS updates with common layers across the entire LinuxServer.io ecosystem to minimise space usage, down time and bandwidth
  • regular security updates

Find us at:

  • Blog - all the things you can do with our containers including How-To guides, opinions and much more!
  • Discord - realtime support / chat with the community and the team.
  • Discourse - post on our community forum.
  • Fleet - an online web interface which displays all of our maintained images.
  • GitHub - view the source for all of our repositories.
  • Open Collective - please consider helping us by either donating or contributing to our budget

Scarf.io pulls GitHub Stars GitHub Release GitHub Package Repository GitLab Container Registry Quay.io Docker Pulls Docker Stars Jenkins Build LSIO CI

Snipe-it makes asset management easy. It was built by people solving real-world IT and asset management problems, and a solid UX has always been a top priority. Straightforward design and bulk actions mean getting things done faster.

snipe-it

Supported Architectures

We utilise the docker manifest for multi-platform awareness. More information is available from docker here and our announcement here.

Simply pulling lscr.io/linuxserver/snipe-it:latest should retrieve the correct image for your arch, but you can also pull specific arch images via tags.

The architectures supported by this image are:

Architecture Available Tag
x86-64 amd64-<version tag>
arm64 arm64v8-<version tag>
armhf

Application Setup

Access the webui at <your-ip>:8080, for more information check out Snipe-it.

This container requires a MySQL or MariaDB server to connect to, we recommend ours

Usage

To help you get started creating a container from this image you can either use docker-compose or the docker cli.

docker-compose (recommended, click here for more info)

---
services:
  snipe-it:
    image: lscr.io/linuxserver/snipe-it:latest
    container_name: snipe-it
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      - APP_KEY=
      - APP_URL=http://localhost:8080
      - MYSQL_PORT_3306_TCP_ADDR=
      - MYSQL_PORT_3306_TCP_PORT=
      - MYSQL_DATABASE=
      - MYSQL_USER=
      - MYSQL_PASSWORD=
      - APP_DEBUG=false #optional
      - APP_ENV=production #optional
      - APP_FORCE_TLS=false #optional
      - APP_LOCALE= #optional
      - MAIL_PORT_587_TCP_ADDR= #optional
      - MAIL_PORT_587_TCP_PORT= #optional
      - MAIL_ENV_FROM_ADDR= #optional
      - MAIL_ENV_FROM_NAME= #optional
      - MAIL_ENV_ENCRYPTION= #optional
      - MAIL_ENV_USERNAME= #optional
      - MAIL_ENV_PASSWORD= #optional
    volumes:
      - /path/to/snipe-it/data:/config
    ports:
      - 8080:80
    restart: unless-stopped
docker run -d \
  --name=snipe-it \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Etc/UTC \
  -e APP_KEY= \
  -e APP_URL=http://localhost:8080 \
  -e MYSQL_PORT_3306_TCP_ADDR= \
  -e MYSQL_PORT_3306_TCP_PORT= \
  -e MYSQL_DATABASE= \
  -e MYSQL_USER= \
  -e MYSQL_PASSWORD= \
  -e APP_DEBUG=false `#optional` \
  -e APP_ENV=production `#optional` \
  -e APP_FORCE_TLS=false `#optional` \
  -e APP_LOCALE= `#optional` \
  -e MAIL_PORT_587_TCP_ADDR= `#optional` \
  -e MAIL_PORT_587_TCP_PORT= `#optional` \
  -e MAIL_ENV_FROM_ADDR= `#optional` \
  -e MAIL_ENV_FROM_NAME= `#optional` \
  -e MAIL_ENV_ENCRYPTION= `#optional` \
  -e MAIL_ENV_USERNAME= `#optional` \
  -e MAIL_ENV_PASSWORD= `#optional` \
  -p 8080:80 \
  -v /path/to/snipe-it/data:/config \
  --restart unless-stopped \
  lscr.io/linuxserver/snipe-it:latest

Parameters

Containers are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate <external>:<internal> respectively. For example, -p 8080:80 would expose port 80 from inside the container to be accessible from the host's IP on port 8080 outside the container.

Parameter Function
-p 80 Snipe-IT Web UI
-e PUID=1000 for UserID - see below for explanation
-e PGID=1000 for GroupID - see below for explanation
-e TZ=Etc/UTC specify a timezone to use, see this list.
-e APP_KEY= App key used for encrypting stored data. Generate with docker exec snipe-it php /app/www/artisan key:generate --show.
-e APP_URL=http://localhost:8080 Hostname or IP and port if applicable, be sure to define https/http
-e MYSQL_PORT_3306_TCP_ADDR= Mysql hostname or IP to use
-e MYSQL_PORT_3306_TCP_PORT= Mysql port to use
-e MYSQL_DATABASE= Mysql database to use
-e MYSQL_USER= Mysql user to use
-e MYSQL_PASSWORD= Mysql password to use
-e APP_DEBUG=false Set to true to see debugging output in the web UI.
-e APP_ENV=production Default is production but can use testing or develop.
-e APP_FORCE_TLS=false Set to true if running behind a reverse proxy
-e APP_LOCALE= Default is en-US. Set to a language from this list.
-e MAIL_PORT_587_TCP_ADDR= SMTP mail server ip or hostname.
-e MAIL_PORT_587_TCP_PORT= SMTP mail server port.
-e MAIL_ENV_FROM_ADDR= The email address mail should be replied to and listed when sent.
-e MAIL_ENV_FROM_NAME= The name listed on email sent from the default account on the system.
-e MAIL_ENV_ENCRYPTION= Mail encryption to use e.g. tls.
-e MAIL_ENV_USERNAME= SMTP server login username.
-e MAIL_ENV_PASSWORD= SMTP server login password.
-v /config Contains your config files and data storage for Snipe-IT

Environment variables from files (Docker secrets)

You can set any environment variable from a file by using a special prepend FILE__.

As an example:

-e FILE__MYVAR=/run/secrets/mysecretvariable

Will set the environment variable MYVAR based on the contents of the /run/secrets/mysecretvariable file.

Umask for running applications

For all of our images we provide the ability to override the default umask settings for services started within the containers using the optional -e UMASK=022 setting. Keep in mind umask is not chmod it subtracts from permissions based on it's value it does not add. Please read up here before asking for support.

User / Group Identifiers

When using volumes (-v flags), permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user PUID and group PGID.

Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.

In this instance PUID=1000 and PGID=1000, to find yours use id your_user as below:

id your_user

Example output:

uid=1000(your_user) gid=1000(your_user) groups=1000(your_user)

Docker Mods

Docker Mods Docker Universal Mods

We publish various Docker Mods to enable additional functionality within the containers. The list of Mods available for this image (if any) as well as universal mods that can be applied to any one of our images can be accessed via the dynamic badges above.

Support Info

  • Shell access whilst the container is running:

    docker exec -it snipe-it /bin/bash
  • To monitor the logs of the container in realtime:

    docker logs -f snipe-it
  • Container version number:

    docker inspect -f '{{ index .Config.Labels "build_version" }}' snipe-it
  • Image version number:

    docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/snipe-it:latest

Updating Info

Most of our images are static, versioned, and require an image update and container recreation to update the app inside. With some exceptions (noted in the relevant readme.md), we do not recommend or support updating apps inside the container. Please consult the Application Setup section above to see if it is recommended for the image.

Below are the instructions for updating containers:

Via Docker Compose

  • Update images:

    • All images:

      docker-compose pull
    • Single image:

      docker-compose pull snipe-it
  • Update containers:

    • All containers:

      docker-compose up -d
    • Single container:

      docker-compose up -d snipe-it
  • You can also remove the old dangling images:

    docker image prune

Via Docker Run

  • Update the image:

    docker pull lscr.io/linuxserver/snipe-it:latest
  • Stop the running container:

    docker stop snipe-it
  • Delete the container:

    docker rm snipe-it
  • Recreate a new container with the same docker run parameters as instructed above (if mapped correctly to a host folder, your /config folder and settings will be preserved)

  • You can also remove the old dangling images:

    docker image prune

Image Update Notifications - Diun (Docker Image Update Notifier)

tip: We recommend Diun for update notifications. Other tools that automatically update containers unattended are not recommended or supported.

Building locally

If you want to make local modifications to these images for development purposes or just to customize the logic:

git clone https://github.com/linuxserver/docker-snipe-it.git
cd docker-snipe-it
docker build \
  --no-cache \
  --pull \
  -t lscr.io/linuxserver/snipe-it:latest .

The ARM variants can be built on x86_64 hardware using multiarch/qemu-user-static

docker run --rm --privileged multiarch/qemu-user-static:register --reset

Once registered you can define the dockerfile to use with -f Dockerfile.aarch64.

Versions

  • 17.06.24: - Rebase to Alpine 3.20. Existing users should update their nginx confs to avoid http2 deprecation warnings.
  • 06.03.24: - Existing users should update: site-confs/default.conf - Cleanup default site conf.
  • 17.02.24: - Add php81-exif.
  • 03.07.23: - Deprecate armhf. As announced here
  • 13.04.23: - Move ssl.conf include to default.conf.
  • 13.04.23: - Add php81-pecl-redis for redis support.
  • 28.12.22: - Rebase to Alpine 3.17, migrate to s6v3.
  • 20.08.22: - Rebasing to alpine 3.15 with php8. Restructure nginx configs (see changes announcement).
  • 14.05.22: - Add php7-sodium for v6.
  • 12.04.22: - Don't build development elements.
  • 02.03.22: - Rework init logic, do not show default compose.
  • 29.06.21: - Rebasing to alpine 3.14.
  • 30.04.21: - Rebasing to alpine 3.13, add artisan migrate on spinup.
  • 01.06.20: - Rebasing to alpine 3.12.
  • 19.12.19: - Rebasing to alpine 3.11.
  • 28.06.19: - Rebasing to alpine 3.10.
  • 10.04.19: - Add php deps for V4.7.0, ensure framework directories are available at build time.
  • 10.04.19: - Fix permissions for new bootstrap cache directory.
  • 23.03.19: - Switching to new Base images, shift to arm32v7 tag.
  • 22.02.19: - Rebasing to alpine 3.9.
  • 31.10.18: - Rebasing to alpine 3.8
  • 05.08.18: - Migration to live build server.
  • 13.06.18: - Initial Release.

docker-snipe-it's People

Contributors

aptalca avatar axilleas avatar chbmb avatar dominikborkowski avatar drizuid avatar linuxserver-ci avatar nemchik avatar sparklyballs avatar thelamer avatar thespad avatar tobbenb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-snipe-it's Issues

SMTP Errors

Expected Behavior

Test email should send successfully.

Current Behavior

Fails with "Error: undefined."

If I enable the debug flag for Snipe-IT I can see an error saying:
"LOG.error: Swift_TransportException: Expected response code 250 but got code "501", with message "501 5.5.2 my.hostname:8080: Helo command rejected: Invalid name"

Steps to Reproduce

Configure SMTP email via environment variables.
Start container.
Click 'Test Email' on setup.

However, leaving all the environment variables the same but switching to the official snipe/snipe-it image makes it work, so issue would appear to be with this image. Thanks.

ENV vars dont used by app

linuxserver.io


Expected Behavior

ENV vars should work

Current Behavior

I can check inside container that the envs get set inside container correctly
but on the setup page i see that he try to connect to a standard value:
Access denied for user 'snipe'@'172.17.0.1'
i set another user and another ip adress. i checked the .env file inside container too and all looks right

Steps to Reproduce

start docker compose as in readme:

    snipeit:
        image: linuxserver/snipe-it:latest
        container_name: snipe-it
        restart: always
        depends_on:
            - mariadbsnipe
        volumes:
            - /mnt/user/appdata/snipe-it:/config
        environment:
            - NGINX_APP_URL=192.168.178.26:8084
            - MYSQL_PORT_3306_TCP_ADDR=192.168.178.26
            - MYSQL_PORT_3306_TCP_PORT=3126
            - MYSQL_DATABASE=snipe
            - MYSQL_USER=testuser
            - MYSQL_PASSWORD=testpassword5698
            - PGID=1000
            - PUID=1000
        ports:
            - "8084:80"

Environment

OS: Unraid
CPU architecture: x86_64
How docker service was installed:

Command used to create docker container (run/create/compose/screenshot)

see above

Docker logs

         | |  ___   _    __

         | | / __| | |  /  \

         | | \__ \ | | | () |

         |_| |___/ |_|  \__/



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

-------------------------------------


[cont-init.d] 10-adduser: exited 0.

[cont-init.d] 20-config: executing... 

[cont-init.d] 20-config: exited 0.

[cont-init.d] 30-keygen: executing... 

generating self-signed keys in /config/keys, you can replace these with your own keys if required

Generating a RSA private key

...............+++++

........................+++++

writing new private key to '/config/keys/cert.key'

-----

[cont-init.d] 30-keygen: exited 0.

[cont-init.d] 40-config: executing... 

Generating SnipeIT app key for first run

App Key set to base64:wtrsE6CuOlNSzEfPYUlSSB0X//lCTumqryqDQP5lNco= you can modify the file to update /config/SNIPE_IT_APP_KEY.txt

[cont-init.d] 40-config: exited 0.

[cont-init.d] 90-custom-folders: executing... 

[cont-init.d] 90-custom-folders: exited 0.

[cont-init.d] 99-custom-files: executing... 

[custom-init] no custom files found exiting...

[cont-init.d] 99-custom-files: exited 0.

[cont-init.d] done.

[services.d] starting services

[services.d] done.

[cont-finish.d] executing container finish scripts...

[cont-finish.d] done.

[s6-finish] waiting for services.

[s6-finish] sending all processes the TERM signal.

[s6-finish] sending all processes the KILL signal and exiting.

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.

[s6-init] ensuring user provided files have correct perms...exited 0.

[fix-attrs.d] applying ownership & permissions fixes...

[fix-attrs.d] done.

[cont-init.d] executing container initialization scripts...

[cont-init.d] 01-envfile: executing... 

[cont-init.d] 01-envfile: exited 0.

[cont-init.d] 10-adduser: executing... 

usermod: no changes


-------------------------------------

          _         ()

         | |  ___   _    __

         | | / __| | |  /  \

         | | \__ \ | | | () |

         |_| |___/ |_|  \__/



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

-------------------------------------


[cont-init.d] 10-adduser: exited 0.

[cont-init.d] 20-config: executing... 

[cont-init.d] 20-config: exited 0.

[cont-init.d] 30-keygen: executing... 

using keys found in /config/keys

[cont-init.d] 30-keygen: exited 0.

[cont-init.d] 40-config: executing... 

[cont-init.d] 40-config: exited 0.

[cont-init.d] 90-custom-folders: executing... 

[cont-init.d] 90-custom-folders: exited 0.

[cont-init.d] 99-custom-files: executing... 

[custom-init] no custom files found exiting...

[cont-init.d] 99-custom-files: exited 0.

[cont-init.d] done.

[services.d] starting services

[services.d] done.

'Dashboard' navigation menu not active

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

'Dashboard' navigation menu not active #12571

The 'Dashboard' link on the left side navigation menu breaks/deactivates when page is small.
-normally 'Dashboard' or all other links are active when hovering over with cursor. This is not the case for the 'Dashboard' link on the left navigation menu.

Reproduction steps

  1. Login, and maximize the home page.
  • noticed how hovering over the 'Dashboard' navigation menu on the left. The cursors change and you are able to click on the 'Dashboard' menu link itself.
  1. Now, restore down / unmaximize the page and resize it to something smaller.
  • notice how the cursor is no longer activated by hovering over the 'Dashboard' navigation menu and you are no longer able to click on the 'Dashboard' link itself.

small
large

Expected Behavior

The 'Dashboard' navigation menu link works no matter the page size.
-reported/fixed in the official repository.

Steps To Reproduce

  1. Login, and maximize the home page.

-notice how hovering over the 'Dashboard' navigation menu on the left. The cursors change and you are able to click on the 'Dashboard' menu link itself.

  1. Now, restore down / unmaximize the page and resize it to something smaller.

-notice how the cursor is no longer activated by hovering over the 'Dashboard' navigation menu and you are no longer able to click on the 'Dashboard' link itself.

Environment

Linux 5.19.17-Unraid x86_64

CPU architecture

x86-64

Docker creation

The command finished successfully!

Container logs

[ls.io-init] done.

Snipe-IT Pre-Flight FAILED (APP_URL error)

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I am getting the following error when I navigate to http://localhost:8080/setup

" Uh oh! Snipe-IT thinks your URL is http://localhost:8080/setup, but your real URL is http://localhost/setup Please update your APP_URL settings in your .env file"

image

I am using the same ports and environmental variables in the linuxserver.io documentation:

ports:
  - 8080:80
 environment
  - APP_URL=http://localhost:8080

This is for testing purposes and will be changed later however I cannot get past this warning. If I make the changes to the following (which I assume are wrong) in the compose file:

APP_URL=http://localhost:8080/setup

I get routed to this URL:

http://localhost:8080/setup/setup

and when I go back to dashboard this is what it looks like:

image

I have seen multiple other issues with this same or similar problem opened up in the past and the solution has either been "please just wait" or to just mark the issue "resolved" without any resolution.

I am curious if this is just user error, if maybe there is something wrong in the documentation or if this is a real bug and needs to be fixed.

If there is a workaround, there is nothing clearly stated in the documentation that I am aware of.

If I do go ahead and click on "Next: Create Database Tables" then I am greeted with a 500 error

image

Expected Behavior

IM not entirely sure what the expected behavior is since I have never used snipe-it before nor hae I gotten this to work successfully in the past as of yet however I assume it would give me a pass instead of an error

Steps To Reproduce

I used the config provided below, with docker compose, and I get the error as I described.

Environment

- OS: Rocky Linux 9
- How docker service was installed: 

sudo dnf update -y
sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo dnf install docker-ce docker-ce-cli containerd.io
sudo systemctl start docker
sudo systemctl enable docker

CPU architecture

x86-64

Docker creation

---
services:
  snipe-it:
    image: lscr.io/linuxserver/snipe-it:latest
    container_name: snipe-it
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      - APP_URL=http://localhost:8080
      - MYSQL_PORT_3306_TCP_ADDR=${DB_ADDR}
      - MYSQL_PORT_3306_TCP_PORT=${DB_PORT}
      - MYSQL_DATABASE=${DB_DATABASE}
      - MYSQL_USER=${DB_USER}
      - MYSQL_PASSWORD=${DB_PASSWD}
    volumes:
      - ${DIR_CONFIG}:/config
    ports:
      - 8080:80
    restart: unless-stopped
    depends_on:
      - mariadb

  mariadb:
    image: lscr.io/linuxserver/mariadb:latest
    container_name: snipe-it_db
    environment:
      - PUID=1000
      - PGID=1000
      - MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWD}
      - MYSQL_DATABASE=${DB_DATABASE}
      - MYSQL_USER=${DB_USER}
      - MYSQL_PASSWORD=${DB_PASSWD}
    volumes:
      - ${DIR_DB}:/config
    ports:
      - ${PORT_3306}:3306
    restart: unless-stopped

Container logs

───────────────────────────────────────

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

   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.

[migrations] started
[migrations] no migrations found
───────────────────────────────────────

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

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

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

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

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

Setting Up Initial Databases
Installing MariaDB/MySQL system tables in '/config/databases' ...
2024-05-23  5:13:50 1 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1017: Can't find file: './mysql/' (errno: 2 "No such file or directory")
OK

To start mariadbd at boot time you have to copy
support-files/mariadb.service to the right place for your system


PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
To do so, start the server, then issue the following command:

'/usr/bin/mariadb-secure-installation'

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the MariaDB Knowledgebase at https://mariadb.com/kb

You can start the MariaDB daemon with:
cd '/usr' ; /usr/bin/mariadb-safe --datadir='/config/databases'

You can test the MariaDB daemon with mysql-test-run.pl
cd '/usr/mysql-test' ; perl mariadb-test-run.pl

Please report any problems at https://mariadb.org/jira

The latest information about MariaDB is available at https://mariadb.org/.

Consider joining MariaDB's strong and vibrant community:
https://mariadb.org/get-involved/

2024-05-23  5:15:16 0 [Note] Starting MariaDB 10.11.6-MariaDB-log source revision fecd78b83785d5ae96f2c6ff340375be803cd299 as process 194
2024-05-23  5:15:16 0 [Note] InnoDB: Compressed tables use zlib 1.3.1
2024-05-23  5:15:16 0 [Note] InnoDB: Number of transaction pools: 1
2024-05-23  5:15:16 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2024-05-23  5:15:16 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
2024-05-23  5:15:16 0 [Note] InnoDB: Using Linux native AIO
2024-05-23  5:15:16 0 [Note] InnoDB: Initializing buffer pool, total size = 256.000MiB, chunk size = 4.000MiB
2024-05-23  5:15:16 0 [Note] InnoDB: Completed initialization of buffer pool
2024-05-23  5:15:16 0 [Note] InnoDB: File system buffers for log disabled (block size=512 bytes)
2024-05-23  5:15:16 0 [Note] InnoDB: End of log at LSN=46878
2024-05-23  5:15:16 0 [Note] InnoDB: 128 rollback segments are active.
2024-05-23  5:15:16 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
2024-05-23  5:15:16 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
2024-05-23  5:15:16 0 [Note] InnoDB: log sequence number 46878; transaction id 14
2024-05-23  5:15:16 0 [Note] InnoDB: Loading buffer pool(s) from /config/databases/ib_buffer_pool
2024-05-23  5:15:16 0 [Note] Plugin 'FEEDBACK' is disabled.
2024-05-23  5:15:16 0 [Note] InnoDB: Buffer pool(s) load completed at 240523  5:15:16
2024-05-23  5:15:16 0 [Note] Server socket created on IP: '0.0.0.0'.
2024-05-23  5:15:16 0 [Note] Server socket created on IP: '::'.
2024-05-23  5:15:16 0 [Note] mariadbd: ready for connections.
Version: '10.11.6-MariaDB-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Alpine Linux
2024-05-23  5:15:18 0 [Note] mariadbd (initiated by: root[root] @ localhost []): Normal shutdown
2024-05-23  5:15:18 0 [Note] InnoDB: FTS optimize thread exiting.
2024-05-23  5:15:18 0 [Note] InnoDB: Starting shutdown...
2024-05-23  5:15:18 0 [Note] InnoDB: Dumping buffer pool(s) to /config/databases/ib_buffer_pool
2024-05-23  5:15:18 0 [Note] InnoDB: Buffer pool(s) dump completed at 240523  5:15:18
2024-05-23  5:15:18 0 [Note] InnoDB: Removed temporary tablespace data file: "./ibtmp1"
2024-05-23  5:15:18 0 [Note] InnoDB: Shutdown completed; log sequence number 46878; transaction id 16
2024-05-23  5:15:18 0 [Note] mariadbd: Shutdown complete

Database Setup Completed
[custom-init] No custom files found, skipping...
240523 05:15:19 mysqld_safe Logging to '/config/databases/cb08fae56b5c.err'.
240523 05:15:19 mysqld_safe Starting mariadbd daemon with databases from /config/databases
Connection to localhost (::1) 3306 port [tcp/mysql] succeeded!
[ls.io-init] done.

[Redirection to /setup] snipe-it behind traefik

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Hello everyone,

After spending some hours trying to deploy snipe it behind traefik in a k8s cluster, I have detected that from time to time im getting redirected to the setup page when navigating between the different places in the web ui, i have set up an ingress route which is a k8s crd provisioned by traefik, I have other services like grafana running in the same cluster and with a similar ingress route and dont have any problem at all,

Probably I'm missing something, is there any recommended middleware for snipe it or any environment variable that disallows /setup ?

Kind regards

Fran

Expected Behavior

When accessing snipeit.redacted.com the access should be nominal same as with navigating through the web ui

Steps To Reproduce

  1. Deploy a kubernetes cluster on prem
  2. Deploy metallb
  3. Deploy traefik
  4. Deploy openebs
  5. Deploy snipe-it with the helm chart
  6. Edit the deployment to use the linux server image
  7. Try to access the web ui after a nominal installation

Environment

- OS:Ubuntu 22.04
- How docker service was installed:Firstly it was deployed with a helm chart using the default snipe-it image, then edited the service to use the linuxserver image

CPU architecture

x86-64

Docker creation

helm install snipeit t3n/snipeit --set config.snipeit.key="redacted" --set config.mysql.externalDatabase.pass="redacted" --set config.snipeit.url="https://snipeit.redacted" --set ingress.enabled="false" --set mysql.mysqlPassword="redacted" --set mysql.persistence.storageClass="openebs-jiva-csi-sc" --set mysql.persistence.size="20Gi" --set persistence.existingClaim="snipeit-pvc"

kubectl edit deployment snipeit 

Changed the container image for linuxserver

Container logs

the logs just point out the app key

environment variable FILE__MYSQL_PASSWORD not setting MYSQL_PASSWORD

linuxserver.io

the environment variable MYSQL_PASSWORD is not set with the contents of the file found at the path set in FILE__MYSQL_PASSWORD


Expected Behavior

secret for mysql database password to be loaded into environment variable MYSQL_PASSWORD and to be able to proceed with installation.

Current Behavior

application does not start

Steps to Reproduce

  1. create a file with database password as contents on docker host.
  2. mount file in snipe-it container and set environment variable FILE__MYSQL_PASSWORD to the file path in container
  3. create database and user for snipe-it and set password for user to be the same as the contents of the file created prior
  4. navigate to <APP_URL>/setup

Environment

OS: Centos 7
CPU architecture: x86_64
How docker service was installed: yum - official repo

Command used to create docker container (run/create/compose/screenshot)

Docker logs

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.

[s6-init] ensuring user provided files have correct perms...exited 0.

[fix-attrs.d] applying ownership & permissions fixes...

[fix-attrs.d] done.

[cont-init.d] executing container initialization scripts...

[cont-init.d] 01-envfile: executing...

[env-init] MYSQL_PASSWORD set from FILE__MYSQL_PASSWORD

[cont-init.d] 01-envfile: exited 0.

[cont-init.d] 10-adduser: executing...

usermod: no changes


      _         ()

     | |  ___   _    __

     | | / __| | |  /  \ 

     | | \__ \ | | | () |

     |_| |___/ |_|  \__/

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: 911

User gid: 911


[cont-init.d] 10-adduser: exited 0.

[cont-init.d] 20-config: executing...

[cont-init.d] 20-config: exited 0.

[cont-init.d] 30-keygen: executing...

using keys found in /config/keys

[cont-init.d] 30-keygen: exited 0.

[cont-init.d] 40-config: executing...

[cont-init.d] 40-config: exited 0.

[cont-init.d] 90-custom-folders: executing...

[cont-init.d] 90-custom-folders: exited 0.

[cont-init.d] 99-custom-files: executing...

[custom-init] no custom files found exiting...

[cont-init.d] 99-custom-files: exited 0.

[cont-init.d] done.

[services.d] starting services

README typo(?)

linuxserver.io


README reads:

    environment:
      - PUID=1000
      - PGID=1000
      - APP_URL=http://localhost:8080
      - MYSQL_PORT_3306_TCP_ADDR=<mysql host>
      - MYSQL_PORT_3306_TCP_PORT=<mysql port>
      - MYSQL_DATABASE=<mysql database>
      - MYSQL_USER=<mysql pass>
      - MYSQL_PASSWORD=changeme

It should likely read something like:

    environment:
      - PUID=1000
      - PGID=1000
      - APP_URL=http://localhost:8080
      - MYSQL_PORT_3306_TCP_ADDR=<mysql host>
      - MYSQL_PORT_3306_TCP_PORT=<mysql port>
      - MYSQL_DATABASE=<mysql database>
      - MYSQL_USER=<mysql user>
      - MYSQL_PASSWORD=<mysql pass>

Outlook Email Server 501 invalid domain

linuxserver.io


Expected Behavior

Email should sent without issue and return 250 code to complete email process

Current Behavior

Email server is returning error code 501 with message "501 5.5.4 Invalid domain name [BL1PR13CA0360.namprd13.prod.outlook.com]

Steps to Reproduce

  1. use any outlook email for the default settings

Environment

**OS:Raspbian v11 lite
**CPU architecture:arm32
How docker service was installed:
from the official docker repo

Command used to create docker container (run/create/compose/screenshot)

version: "3"
services:
mysql:
image: linuxserver/mariadb
container_name: Snipe_mysql
restart: unless-stopped
volumes:
- /homw/admin/appdata/snipeit/mysql:/config
environment:
- PUID=1000
- PGID=1000
- TZ=America/New_York
- MYSQL_ROOT_PASSWORD=
- MYSQL_USER=
- MYSQL_PASSWORD=
- MYSQL_DATABASE=snipe
snipeit:
image: linuxserver/snipe-it:latest
container_name: Snipe_it
restart: unless-stopped
depends_on:
- mysql
volumes:
- /home/admin/appdata/snipeit:/config
environment:
- APP_DEBUG=true
- APP_TIMEZONE=America/New_York
- APP_URL=
- NGINX_APP_URL=
- MYSQL_PORT_3306_TCP_ADDR=mysql
- MYSQL_PORT_3306_TCP_PORT=3306
- MYSQL_DATABASE=snipe
- MYSQL_USER=
- MYSQL_PASSWORD=
- PGID=1000
- PUID=1000

Email settings

  - MAIL_DRIVER=smtp
  - MAIL_PORT_587_TCP_ADDR=smtp-mail.outlook.com
  - MAIL_PORT_587_TCP_PORT=587
  - [email protected]
  - MAIL_ENV_PASSWORD=example
  - MAIL_ENV_ENCRYPTION=TLS
  - [email protected]
  - MAIL_ENV_FROM_NAME=Snipe-IT

ports:
  - "3001:80"

Docker logs

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing...
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 02-tamper-check: executing...
[cont-init.d] 02-tamper-check: exited 0.
[cont-init.d] 10-adduser: executing...


      _         ()
     | |  ___   _    __
     | | / __| | |  /  \
     | | \__ \ | | | () |
     |_| |___/ |_|  \__/

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

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 20-config: executing...
[cont-init.d] 20-config: exited 0.
[cont-init.d] 30-keygen: executing...
using keys found in /config/keys
[cont-init.d] 30-keygen: exited 0.
[cont-init.d] 40-config: executing...
[cont-init.d] 40-config: exited 0.
[cont-init.d] 90-custom-folders: executing...
[cont-init.d] 90-custom-folders: exited 0.
[cont-init.d] 99-custom-files: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-files: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.

App run in debug:
Expected response code 250 but got code "501", with message "501 5.5.4 Invalid domain name [BL1PR13CA0360.namprd13.prod.outlook.com]
"
/var/www/html/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php#459

running docker-compose up -d on Raspberry Pi(Armhf) is resulting in an error

Hello there,

I am trying to install snipe-it on a Raspberry Pi 2B+. The architecture is armhf. I used the provided docker-compose template and set up the passwords and volumes correctly:

version: "3"
services:
  mysql:
    image: mysql:5
    container_name: snipe_mysql
    restart: always
    volumes:
      - ./snipe-it_mysql_config:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=******************
      - MYSQL_USER=snipe
      - MYSQL_PASSWORD=******************
      - MYSQL_DATABASE=snipe
  snipeit:
    image: linuxserver/snipe-it:latest
    container_name: snipe-it
    restart: always
    depends_on:
      - mysql
    volumes:
      - ./snipe-it_config:/config
    environment:
      - APP_URL=192.168.1.100:8080
      - MYSQL_PORT_3306_TCP_ADDR=mysql
      - MYSQL_PORT_3306_TCP_PORT=3306
      - MYSQL_DATABASE=snipe
      - MYSQL_USER=snipe
      - MYSQL_PASSWORD=******************
      - PGID=1000
      - PUID=1000
    ports:
      - "8080:80"

On running the 'docker-compose up -d' command to start the container, the following is the output.

Pulling mysql (mysql:5)...
5: Pulling from library/mysql
ERROR: no matching manifest for unknown in the manifest list entries

I then looked at your repositories and saw there was no mysql image, so i changed the docker-compose.yml to the following and the installation actually went through. The application did not start though, I got a 'Something went wrong' message.

Modified docker-compose.yml:

version: "3"
services:
  mariadb:
    image: linuxserver/mariadb
    container_name: snipe_mariadb
    restart: always
    volumes:
      - ./mariadb_config:/var/lib/mysql
    environment:
      - PUID=1000
      - GUID=1000
      - TZ=Europe/Berlin
      - MYSQL_ROOT_PASSWORD=******************
      - MYSQL_USER=snipe
      - MYSQL_PASSWORD=******************
      - MYSQL_DATABASE=snipe
    ports:
      - 3306:3306
  snipeit:
    image: linuxserver/snipe-it:latest
    container_name: snipe-it
    restart: always
    depends_on:
      - mariadb
    volumes:
      - ./snipe-it_config:/config
    environment:
      - APP_URL=192.168.1.100:8080
      - MYSQL_PORT_3306_TCP_ADDR=mysql
      - MYSQL_PORT_3306_TCP_PORT=3306
      - MYSQL_DATABASE=snipe
      - MYSQL_USER=snipe
      - MYSQL_PASSWORD=******************
      - PGID=1000
      - PUID=1000
    ports:
      - "8080:80"

Host OS: Raspbian Stretch Lite, released on 2019-04-08
Command: docker-compose up -d

Thank you for your time!

[BUG] Unable to use SnipeIT buttons due to erroneous URL behaviour

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Running the Latest image of Snipe-IT
Container is behind a containerised NGINX reverse proxy
When trying to edit an existing asset, or People account, the URL being presented is in the format https://snipe.domain.com/snipe.domain.com/hardware/XX/edit

When the environment varaible APP_URL is set, the URL instead becomes snipe.domain.com:80/hardware/XX/edit

Expected Behavior

When trying to edit an existing asset, or People account, the URL being presented is in the format https://snipe.domain.com/hardware/XX/edit

Steps To Reproduce

Create a new Snipe IT and MariaDB set of containers using the Linuxserver.io images via docker compose
Set the APP_URL environment variable.
Add a reverse proxy to the containers.
Add a new asset or license or other object.
Attempt to edit the object.
Note the URL of the edit/checkin/etc buttons is incorrect.

Environment

- OS: Ubuntu 22.04
- How docker service was installed: via apt package.

CPU architecture

arm64

Docker creation

snipe-it:
    image: linuxserver/snipe-it:latest
    container_name: snipe-it
    restart: always
    depends_on:
      - mariadb
    links:
      - mariadb
    volumes:
      - ./snipe:/config
    environment:
      - APP_URL=snipe.domain.com:80
      - MYSQL_PORT_3306_TCP_ADDR=172.28.6.10
      - MYSQL_PORT_3306_TCP_PORT=3306
      - MYSQL_DATABASE=
      - MYSQL_USER=
      - MYSQL_PASSWORD=
      - PGID=1000
      - PUID=1000
      - TZ=Australia/Perth
      - APP_TRUSTED_PROXIES=172.28.6.254
    ports:
      - 8086:80
    networks:
      network:
            ipv4_address: 172.28.6.53

Container logs

██╗     ███████╗██╗ ██████╗ 
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝ 
   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
Nothing to migrate.
**** The following active confs have different version dates than the samples that are shipped. ****
**** This may be due to user customization or an update to the samples. ****
**** You should compare the following files to the samples in the same folder and update them. ****
**** Use the link at the top of the file to view the changelog. ****
┌────────────┬────────────┬────────────────────────────────────────────────────────────────────────┐
│  old date  │  new date  │ path                                                                   │
├────────────┼────────────┼────────────────────────────────────────────────────────────────────────┤
│            │ 2023-04-13 │ /config/nginx/site-confs/default.conf                                  │
│ 2021-06-15 │ 2023-04-13 │ /config/nginx/nginx.conf                                               │
└────────────┴────────────┴────────────────────────────────────────────────────────────────────────┘
**** The following site-confs have extensions other than .conf ****
**** This may be due to user customization. ****
**** You should review the files and rename them to use the .conf extension or remove them. ****
**** nginx.conf will only include site-confs with the .conf extension. ****
/config/nginx/site-confs/default
[custom-init] No custom files found, skipping...
[ls.io-init] done.

[BUG] Uh oh! Snipe-IT thinks your URL is http://xxx:8080, but your real URL is http://xxx/setup

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Set up page gives an invalid URL message:
Uh oh! Snipe-IT thinks your URL is http://10.10.0.99:8080, but your real URL is http://10.10.0.99/setup Please update your APP_URL settings in your .env file

Here are my docker run parameters:

docker run -d \
  --name=snipe-it \
  --link mariadb:mysql \
  -e PUID=10xx \
  -e PGID=1xx \
  -e MYSQL_PORT_3306_TCP_ADDR=10.10.0.99 \
  -e MYSQL_PORT_3306_TCP_PORT=3306 \
  -e MYSQL_DATABASE=snipeit \
  -e MYSQL_USER=snipeit \
  -e MYSQL_PASSWORD=mypassword \
  -e APP_ENV=production \
  -e APP_DEBUG=false \
  -e APP_KEY=base64:xxxxxxxxx= \
  -e APP_URL=http://10.10.0.99:8080 \
  -e APP_LOCALE=en \
  -p 8080:80 \
  -v /volume1/docker/snipeit:/config \
  --restart unless-stopped \
  lscr.io/linuxserver/snipe-it:latest

The same parameters work OK with the official Snipe-it docker container.

There was another bug filed last week but it was closed for not following your required templates: #56

I am making an effort to follow the templates. The previous issue was on a Windows environment as opposed to Synology.

Expected Behavior

setup page should show a valid URL

Steps To Reproduce

  1. Running docker on a Synology NAS
  2. Running the above docker run command from ssh
  3. Browse to the docker set up page specified in the APP_URL
  4. Get the following error:
    snipeit

Environment

- OS:Synology
- How docker service was installed: Synology officil docker package

CPU architecture

x86-64

Docker creation

docker run -d \
  --name=snipe-it \
  --link mariadb:mysql \
  -e PUID=10xx \
  -e PGID=1xx \
  -e MYSQL_PORT_3306_TCP_ADDR=10.10.0.99 \
  -e MYSQL_PORT_3306_TCP_PORT=3306 \
  -e MYSQL_DATABASE=snipeit \
  -e MYSQL_USER=snipeit \
  -e MYSQL_PASSWORD=mypassword \
  -e APP_ENV=production \
  -e APP_DEBUG=false \
  -e APP_KEY=base64:xxxxxxxxx= \
  -e APP_URL=http://10.10.0.99:8080 \
  -e APP_LOCALE=en \
  -p 8080:80 \
  -v /volume1/docker/snipeit:/config \
  --restart unless-stopped \
  lscr.io/linuxserver/snipe-it:latest

Container logs

snipe-it
date	stream	content
2023-04-07T03:24:18.250164235Z	stdout	[ls.io-init] done.
2023-04-07T03:24:18.176451133Z	stdout	[custom-init] No custom files found, skipping...
2023-04-07T03:24:18.057660672Z	stdout	App Key set to base64:/xxxxxxxxxxxxxxxx you can modify the file to update /config/SNIPE_IT_APP_KEY.txt
2023-04-07T03:24:15.008855189Z	stdout	Generating SnipeIT app key for first run
2023-04-07T03:24:14.910546936Z	stderr	-----
2023-04-07T03:24:14.898230059Z	stderr	..+.....+...+...+.......+........+....+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*....+...+..+...+...+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*...+....+......+..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2023-04-07T03:24:14.798053519Z	stderr	.......+...+..+......+...+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*........+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*.......+......+.+...+.........+..+...+..........+..+.+..............+....+..+............+.+.....+....+......+..+....+...+..+....+....................+.+...+.....+..........+...+....................+....+...........+..........+..+..........+..+.+.........+.....+.+..+.......+........+...+...+.+...+...............+..+...+..................+...+.+.........+.........+..+.+........+......+....+.........+...+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2023-04-07T03:24:14.328303902Z	stdout	generating self-signed keys in /config/keys, you can replace these with your own keys if required
2023-04-07T03:24:14.306813626Z	stdout	Setting worker_processes to 4
2023-04-07T03:24:14.302042888Z	stdout	Setting resolver to  10.10.0.100
2023-04-07T03:24:14.165493798Z	stdout	
2023-04-07T03:24:14.165449839Z	stdout	───────────────────────────────────────
2023-04-07T03:24:14.165408910Z	stdout	User GID:    100
2023-04-07T03:24:14.165356136Z	stdout	User UID:    1043
2023-04-07T03:24:14.165212898Z	stdout	
2023-04-07T03:24:14.161724541Z	stdout	───────────────────────────────────────
2023-04-07T03:24:14.161681331Z	stdout	GID/UID
2023-04-07T03:24:14.161640343Z	stdout	───────────────────────────────────────
2023-04-07T03:24:14.161600877Z	stdout	
2023-04-07T03:24:14.161557904Z	stdout	https://www.linuxserver.io/donate/
2023-04-07T03:24:14.161514768Z	stdout	To support LSIO projects visit:
2023-04-07T03:24:14.161472693Z	stdout	
2023-04-07T03:24:14.161267299Z	stdout	Snipe-IT: https://snipeitapp.com/donate
2023-04-07T03:24:14.160557277Z	stdout	To support the app dev(s) visit:
2023-04-07T03:24:14.160520355Z	stdout	
2023-04-07T03:24:14.160474573Z	stdout	───────────────────────────────────────
2023-04-07T03:24:14.160424693Z	stdout	   Brought to you by linuxserver.io
2023-04-07T03:24:14.160388613Z	stdout	
2023-04-07T03:24:14.160345660Z	stdout	      ╚══════╝╚══════╝╚═╝ ╚═════╝ 
2023-04-07T03:24:14.160301093Z	stdout	      ███████╗███████║██║╚██████╔╝
2023-04-07T03:24:14.160259243Z	stdout	      ██║     ╚════██║██║██║   ██║
2023-04-07T03:24:14.160215807Z	stdout	      ██║     ███████╗██║██║   ██║
2023-04-07T03:24:14.160169930Z	stdout	      ██║     ██╔════╝██║██╔═══██╗
2023-04-07T03:24:14.160102653Z	stdout	      ██╗     ███████╗██╗ ██████╗ 
2023-04-07T03:24:14.160040004Z	stdout	
2023-04-07T03:24:14.159531598Z	stdout	───────────────────────────────────────
2023-04-07T03:24:12.900117032Z	stdout	[migrations] done
2023-04-07T03:24:12.899967161Z	stdout	[migrations] 02-default-location: succeeded
2023-04-07T03:24:12.899512029Z	stderr	grep: /config/nginx/site-confs/default.conf: No such file or directory
2023-04-07T03:24:12.891011752Z	stdout	[migrations] 02-default-location: executing...
2023-04-07T03:24:12.887722265Z	stdout	[migrations] 01-nginx-site-confs-default: succeeded
2023-04-07T03:24:12.857721098Z	stdout	[migrations] 01-nginx-site-confs-default: executing...
2023-04-07T03:24:12.852735025Z	stdout	[migrations] started

500 SERVER ERROR snipe-it:v7.0.9-ls287 when on https

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I should get the setup page for snipe-it instead I get a error 500 SERVER ERROR when running on https behind a reverse proxy, even after setup done in http

Expected Behavior

the snipe-it setup page should load to start the app setup

Steps To Reproduce

  1. Install docker on rocky 8
  2. create a folder
  3. create docker compose for snipe-it including madiadb
  4. start the containers and navigate to https://

If I don't use the reverse proxy and load the application exposing port 80 and change my app url from https to http I get the setup screen and it works, then I do all the setup and if then after the setup I enable https I get the 500
SERVER ERROR error again

Environment

- OS:rocky linux 8.9
- How docker service was installed: via docker repo rpm package

CPU architecture

x86-64

Docker creation

nginx reverse proxy
---
services:
  nginx-proxy:
    image: 'jc21/nginx-proxy-manager:2.11.3'
    container_name: nginx-proxy
    ports:
      - '80:80'
      - '443:443'
      - '81:81'
    environment:
      DB_MYSQL_HOST: "mariadb"
      DB_MYSQL_PORT: 3306
      DB_MYSQL_USER: "npm"
      DB_MYSQL_PASSWORD: "npm"
      DB_MYSQL_NAME: "npm"
      DISABLE_IPV6: 'true'
    volumes:
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt
    depends_on:
      - mariadb
    networks:
      - frontend
    restart: unless-stopped

  mariadb:
    image: 'jc21/mariadb-aria:10.11.5'
    container_name: nginx-proxy-database
    environment:
      MYSQL_ROOT_PASSWORD: 'npm'
      MYSQL_DATABASE: 'npm'
      MYSQL_USER: 'npm'
      MYSQL_PASSWORD: 'npm'
      MARIADB_AUTO_UPGRADE: '1'
    volumes:
      - ./mysql:/var/lib/mysql
    networks:
      - frontend
    restart: unless-stopped

networks:
   frontend:
     driver: bridge


snipe-it
---
services:
  snipe-it:
    image: lscr.io/linuxserver/snipe-it:v7.0.9-ls287
    container_name: snipe-it
    environment:
      - PUID=1000
      - PGID=1000
      - APP_KEY=
      - TZ=America/Toronto
      - APP_URL=https://snipe.mydomain.com
      - APP_FORCE_TLS=true
      - MYSQL_PORT_3306_TCP_ADDR=mariadb
      - MYSQL_PORT_3306_TCP_PORT=3306
      - MYSQL_DATABASE=snipe
      - MYSQL_USER=admin
      - MYSQL_PASSWORD=TDLoJZdzDQM9
    volumes:
      - ./config:/config
    networks:
      - nginx-proxy_frontend
      - backend
    restart: unless-stopped

  mariadb:
    image: lscr.io/linuxserver/mariadb:10.11.8-r0-ls149
    container_name: mariadb
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Toronto
      - MYSQL_ROOT_PASSWORD=TDLoJZdzDQM9
      - MYSQL_DATABASE=snipe
      - MYSQL_USER=admin
      - MYSQL_PASSWORD=TDLoJZdzDQM9
    volumes:
      - ./dbconfig:/config
    networks:
      - backend
    restart: unless-stopped

networks:
      nginx-proxy_frontend:
         external: true
      backend:
         driver: bridge

Container logs

snipe-it  | [migrations] started
snipe-it  | [migrations] 01-nginx-site-confs-default: executing...
snipe-it  | [migrations] 01-nginx-site-confs-default: succeeded
snipe-it  | [migrations] 02-default-location: executing...
snipe-it  | [migrations] 02-default-location: succeeded
snipe-it  | [migrations] done
snipe-it  | ───────────────────────────────────────
snipe-it  |
snipe-it  |       ██╗     ███████╗██╗ ██████╗
snipe-it  |       ██║     ██╔════╝██║██╔═══██╗
snipe-it  |       ██║     ███████╗██║██║   ██║
snipe-it  |       ██║     ╚════██║██║██║   ██║
snipe-it  |       ███████╗███████║██║╚██████╔╝
snipe-it  |       ╚══════╝╚══════╝╚═╝ ╚═════╝
snipe-it  |
snipe-it  |    Brought to you by linuxserver.io
snipe-it  | ───────────────────────────────────────
snipe-it  |
snipe-it  | To support the app dev(s) visit:
snipe-it  | Snipe-IT: https://snipeitapp.com/donate
snipe-it  |
snipe-it  | To support LSIO projects visit:
snipe-it  | https://www.linuxserver.io/donate/
snipe-it  |
snipe-it  | ───────────────────────────────────────
snipe-it  | GID/UID
snipe-it  | ───────────────────────────────────────
snipe-it  |
snipe-it  | User UID:    1000
snipe-it  | User GID:    1000
snipe-it  | ───────────────────────────────────────
snipe-it  | Linuxserver.io version: v7.0.9-ls287
snipe-it  | Build-date: 2024-07-11T18:53:37+00:00
snipe-it  | ───────────────────────────────────────
snipe-it  |
snipe-it  | Setting resolver to  127.0.0.11
snipe-it  | Setting worker_processes to 4
snipe-it  | generating self-signed keys in /config/keys, you can replace these with your own keys if required
snipe-it  | ...+...+..+.+...+............+++++++++++++++++++++++++++++++++++++++*...+...............+++++++++++++++++++++++++++++++++++++++*..+...............+...+............+.....+....+.........+......+......+..+.+..+....+........+......+.+......+..+...+.........+.+........+.+.....+....+.........+...+..+.+.........+.....+.+.....+.........+...+...+.+.....+.+...+.................+.........+...+......+.+.........+..+...+......+...+...............+.......+........+...+..................+......+......+............................+..+...+......+.+...+..+.......+..+...+..........+....................+......+.+.....+.+.....+...+....+...+..+............+....+.....+......+....+..+....+...+.....+.+...............+...........+.+...+.....+.+........+.+..+.......+..+...+...+....+...+...........+.........+...+.........+.........+.+...+.....+......+....+............+...........+...+.......+............+...+...............+..+...+.........+......+....+...+........+.......+.....+.+......+........+......+.+...+........+...+..........+..+...+....+..+.+...+.................+..........+..+...+.............+..............+......+.......+..+..........+...........+......+..........+...+....................+......+....+.....+.+.....+......+....+..+...+.......+.....+....+.....++++++
snipe-it  | ..+...........+......+...+++++++++++++++++++++++++++++++++++++++*.+...+............+..+.+......+...+++++++++++++++++++++++++++++++++++++++*.......+...+...........+...+...+....+......+.........+...+......+......+.....+......++++++
snipe-it  | -----
snipe-it  | Generating SnipeIT app key for first run
snipe-it  | App Key set to base64:zzrHFk2URxa0PYQB3VbyIR86fcHspDaN62Y5Muga8ag= you can set the APP_KEY environment variable to provide a persistent key.
snipe-it  | [custom-init] No custom files found, skipping...
snipe-it  | [ls.io-init] done.
snipe-it  |
snipe-it  |    INFO  No scheduled commands are ready to run.
snipe-it  |
snipe-it  |
snipe-it  |   2024-07-16 05:45:01 Running ['artisan' auth:clear-resets] ....... 187ms FAIL
snipe-it  |'/usr/bin/php83' 'artisan' auth:clear-resets > '/dev/null' 2>&1
snipe-it  |
snipe-it  |
snipe-it  |    INFO  No scheduled commands are ready to run.
snipe-it  |
snipe-it  |
snipe-it  |    INFO  No scheduled commands are ready to run.
snipe-it  |
snipe-it  |
snipe-it  |    INFO  No scheduled commands are ready to run.
snipe-it  |
snipe-it  |
snipe-it  |    INFO  No scheduled commands are ready to run.
snipe-it  |
mariadb   | [migrations] started
mariadb   | [migrations] no migrations found
mariadb   | ───────────────────────────────────────
mariadb   |
mariadb   |       ██╗     ███████╗██╗ ██████╗
mariadb   |       ██║     ██╔════╝██║██╔═══██╗
mariadb   |       ██║     ███████╗██║██║   ██║
mariadb   |       ██║     ╚════██║██║██║   ██║
mariadb   |       ███████╗███████║██║╚██████╔╝
mariadb   |       ╚══════╝╚══════╝╚═╝ ╚═════╝
mariadb   |
mariadb   |    Brought to you by linuxserver.io
mariadb   | ───────────────────────────────────────
mariadb   |
mariadb   | To support LSIO projects visit:
mariadb   | https://www.linuxserver.io/donate/
mariadb   |
mariadb   | ───────────────────────────────────────
mariadb   | GID/UID
mariadb   | ───────────────────────────────────────
mariadb   |
mariadb   | User UID:    1000
mariadb   | User GID:    1000
mariadb   | ───────────────────────────────────────
mariadb   | Linuxserver.io version: 10.11.8-r0-ls149
mariadb   | Build-date: 2024-07-10T10:49:07+00:00
mariadb   | ───────────────────────────────────────
mariadb   |
mariadb   | Setting Up Initial Databases
mariadb   | Installing MariaDB/MySQL system tables in '/config/databases' ...
mariadb   | 2024-07-16  5:43:38 0 [Warning] You need to use --log-bin to make --expire-logs-days or --binlog-expire-logs-seconds work.
mariadb   | OK
mariadb   |
mariadb   | To start mariadbd at boot time you have to copy
mariadb   | support-files/mariadb.service to the right place for your system
mariadb   |
mariadb   |
mariadb   | PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
mariadb   | To do so, start the server, then issue the following command:
mariadb   |
mariadb   | '/usr/bin/mariadb-secure-installation'
mariadb   |
mariadb   | which will also give you the option of removing the test
mariadb   | databases and anonymous user created by default.  This is
mariadb   | strongly recommended for production servers.
mariadb   |
mariadb   | See the MariaDB Knowledgebase at https://mariadb.com/kb
mariadb   |
mariadb   | You can start the MariaDB daemon with:
mariadb   | cd '/usr' ; /usr/bin/mariadbd-safe --datadir='/config/databases'
mariadb   |
mariadb   | You can test the MariaDB daemon with mysql-test-run.pl
mariadb   | cd '/usr/mysql-test' ; perl mariadb-test-run.pl
mariadb   |
mariadb   | Please report any problems at https://mariadb.org/jira
mariadb   |
mariadb   | The latest information about MariaDB is available at https://mariadb.org/.
mariadb   |
mariadb   | Consider joining MariaDB's strong and vibrant community:
mariadb   | https://mariadb.org/get-involved/
mariadb   |
mariadb   | 2024-07-16  5:43:40 0 [Note] Starting MariaDB 10.11.8-MariaDB-log source revision 3a069644682e336e445039e48baae9693f9a08ee as process 186
mariadb   | 2024-07-16  5:43:40 0 [Note] InnoDB: Compressed tables use zlib 1.3.1
mariadb   | 2024-07-16  5:43:40 0 [Note] InnoDB: Number of transaction pools: 1
mariadb   | 2024-07-16  5:43:40 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
mariadb   | 2024-07-16  5:43:40 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
mariadb   | 2024-07-16  5:43:40 0 [Note] InnoDB: Using Linux native AIO
mariadb   | 2024-07-16  5:43:40 0 [Note] InnoDB: Initializing buffer pool, total size = 256.000MiB, chunk size = 4.000MiB
mariadb   | 2024-07-16  5:43:40 0 [Note] InnoDB: Completed initialization of buffer pool
mariadb   | 2024-07-16  5:43:40 0 [Note] InnoDB: File system buffers for log disabled (block size=512 bytes)
mariadb   | 2024-07-16  5:43:40 0 [Note] InnoDB: End of log at LSN=46980
mariadb   | 2024-07-16  5:43:40 0 [Note] InnoDB: 128 rollback segments are active.
mariadb   | 2024-07-16  5:43:40 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
mariadb   | 2024-07-16  5:43:40 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
mariadb   | 2024-07-16  5:43:40 0 [Note] InnoDB: log sequence number 46980; transaction id 14
mariadb   | 2024-07-16  5:43:40 0 [Note] Plugin 'FEEDBACK' is disabled.
mariadb   | 2024-07-16  5:43:40 0 [Note] InnoDB: Loading buffer pool(s) from /config/databases/ib_buffer_pool
mariadb   | 2024-07-16  5:43:40 0 [Note] InnoDB: Buffer pool(s) load completed at 240716  5:43:40
mariadb   | 2024-07-16  5:43:40 0 [Note] Server socket created on IP: '0.0.0.0'.
mariadb   | 2024-07-16  5:43:40 0 [Note] Server socket created on IP: '::'.
mariadb   | 2024-07-16  5:43:40 0 [Note] mariadbd: ready for connections.
mariadb   | Version: '10.11.8-MariaDB-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Alpine Linux
mariadb   | 2024-07-16  5:43:42 0 [Note] mariadbd (initiated by: root[root] @ localhost []): Normal shutdown
mariadb   | 2024-07-16  5:43:42 0 [Note] InnoDB: FTS optimize thread exiting.
mariadb   | 2024-07-16  5:43:42 0 [Note] InnoDB: Starting shutdown...
mariadb   | 2024-07-16  5:43:42 0 [Note] InnoDB: Dumping buffer pool(s) to /config/databases/ib_buffer_pool
mariadb   | 2024-07-16  5:43:42 0 [Note] InnoDB: Buffer pool(s) dump completed at 240716  5:43:42
mariadb   | 2024-07-16  5:43:42 0 [Note] InnoDB: Removed temporary tablespace data file: "./ibtmp1"
mariadb   | 2024-07-16  5:43:42 0 [Note] InnoDB: Shutdown completed; log sequence number 46980; transaction id 16
mariadb   | 2024-07-16  5:43:42 0 [Note] mariadbd: Shutdown complete
mariadb   |
mariadb   | Database Setup Completed
mariadb   | [custom-init] No custom files found, skipping...
mariadb   | 240716 05:43:43 mysqld_safe Logging to '/config/databases/f5559a448367.err'.
mariadb   | 240716 05:43:43 mysqld_safe Starting mariadbd daemon with databases from /config/databases
mariadb   | Connection to localhost (::1) 3306 port [tcp/mysql] succeeded!
mariadb   | [ls.io-init] done.

Server Error 500 after fresh install

linuxserver.io

Server error 500 after fresh docker-compose install


Current Behavior

-- Server error 500. Both App container and SQL container runs as expected and provides a IP

Steps to Reproduce

  1. Launched stack via Portainer and docker compose
  2. Connected to container via NGINX proxy manager

Environment

OS:
-- Ubuntu Server
CPU architecture:
-- arm64
How docker service was installed:
-- Via Portainer

Command used to create docker container (run/create/compose/screenshot)

version: "3"
services:
mysql:
image: lscr.io/linuxserver/mariadb:latest
container_name: snipe_mysql
restart: unless-stopped
volumes:
- /home/ubuntu/DockerCompose/snipe/data:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=(My password)
- MYSQL_USER=snipe
- MYSQL_PASSWORD=(My password)
- MYSQL_DATABASE=snipe
snipeit:
image: lscr.io/linuxserver/snipe-it:latest
container_name: snipe-it
restart: unless-stopped
depends_on:
- mysql
volumes:
- /home/ubuntu/DockerCompose/snipe/config:/config
environment:
- APP_URL=https://inventory.venncubed.com
- MAIL_PORT_587_TCP_ADDR=smtp.office365.com
- MAIL_PORT_587_TCP_PORT=587
- MAIL_ENV_FROM_ADDR=(my domain email)
- MAIL_ENV_FROM_NAME=Snipe
- MAIL_ENV_ENCRYPTION=tls
- MAIL_ENV_USERNAME=(my domain email)
- MAIL_ENV_PASSWORD=(My password)
- MYSQL_PORT_3306_TCP_ADDR=mysql
- MYSQL_PORT_3306_TCP_PORT=3306
- MYSQL_DATABASE=snipe
- MYSQL_USER=snipe
- MYSQL_PASSWORD=(My password)
- PGID=1000
- PUID=1000
- TZ=ZA
ports:
- "8084:80"
- "8083:443"

Docker logs


      _         ()
     | |  ___   _    __
     | | / __| | |  /  \
     | | \__ \ | | | () |
     |_| |___/ |_|  \__/

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

cont-init: info: /etc/cont-init.d/10-adduser exited 0
cont-init: info: running /etc/cont-init.d/20-config
cont-init: info: /etc/cont-init.d/20-config exited 0
cont-init: info: running /etc/cont-init.d/30-keygen
using keys found in /config/keys
cont-init: info: /etc/cont-init.d/30-keygen exited 0
cont-init: info: running /etc/cont-init.d/40-config
cont-init: info: /etc/cont-init.d/40-config exited 0
cont-init: info: running /etc/cont-init.d/99-custom-files
[custom-init] No custom files found, skipping...
cont-init: info: /etc/cont-init.d/99-custom-files exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-mods: starting
s6-rc: info: service init-mods successfully started
s6-rc: info: service init-mods-package-install: starting
s6-rc: info: service init-mods-package-install successfully started
s6-rc: info: service init-mods-end: starting
s6-rc: info: service init-mods-end successfully started
s6-rc: info: service init-services: starting
s6-rc: info: service init-services successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun cron (no readiness notification)
services-up: info: copying legacy longrun nginx (no readiness notification)
services-up: info: copying legacy longrun php-fpm (no readiness notification)
s6-rc: info: service legacy-services successfully started
s6-rc: info: service 99-ci-service-check: starting
[ls.io-init] done.
s6-rc: info: service 99-ci-service-check successfully started

Hardcoded "localhost" a href source in qr- / barcodes

Hi,

I'm on the latest release as of now which would be Version v5.1.8 - build 6148 (master) and unfortunately I'm encountering errors with the rendering of certain images - especially asset qr-codes:

image

It seems to me that there are hardcoded references to localhost any many URLs.

Would that be fixable? Anything I can do about it?

Tahnk you very much!

certificate file location/name wrong in the documentation

I am trying to deploy snipeit (along with mariadb, letsencrypt and watchtower) using ansible. Everything worked fine until the ssl certificate.

Expected Behavior

letsencrypt certificate should work (wildcard certificate, working on other apps).

Current Behavior

snipeit doesn load and in the logs there is this error message:
nginx: [emerg] SSL_CTX_use_PrivateKey("/config/keys/cert.key") failed (SSL: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch)

Steps to Reproduce

In the documentation we have the location of the certificate files:
/config/keys/cert.crt /config/keys/key.crt

But using these, I get the error above.

They should be:
/config/keys/cert.crt /config/keys/cert.key

Using these files, everything works just fine.

Add scheduler crontab entry into the docker image

Desired Behavior

Add artisan scheduler crontab entry into /etc/crontabs
Altering: https://snipe-it.readme.io/docs/configuring-alerts-backups

/etc/crontabs/snipeit should contain:
* * * * * abc /usr/bin/php /var/www/html/artisan schedule:run >> /dev/null 2>&1

Add these also - or the backup conditionally:
/path/to/php artisan snipeit:backup
/path/to/php artisan backup:clean
/path/to/php artisan snipeit:expiring-alerts
/path/to/php artisan snipeit:inventory-alerts
/path/to/php artisan snipeit:expected-checkin
/path/to/php artisan snipeit:user-inventory
/path/to/php artisan snipeit:upcoming-audits

Current Behavior

Now crontab file have to be mounted if you want to alerting, but it should be default on laravel based applications.

[BUG] APP_LOCALE default should be en-US instead of en

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

With the APP_LOCALE being set to en, the laravel logs will repeatedly spit out:
production.WARNING: APP_LOCALE in .env is set to en and should be updated to be en-US
As the warning indicates, I assume this only happens when in production mode.
Propose the default be set to en-US and the readme be updated to reflect this.
Thanks!

Expected Behavior

en being the default ENV setting for APP_LOCALE, no errors in logs (storage/logs/laravel.log)

Steps To Reproduce

  1. Leave APP_LOCALE set as default "en"
  2. Start container
  3. browse laravel logs under storage/logs/laravel.log

Environment

- OS: unRAID
- How docker service was installed: Community Apps

CPU architecture

x86-64

Docker creation

unRAID

Container logs

The container log does not show this error.

Device images lost after update

linuxserver.io


Expected Behavior

Device images should be displayed when viewing dashboard

Current Behavior

No images rendered, only the name of devices.
When I click on the device image link I get the following message: "Failed to load image" followed by the location of the image

Steps to Reproduce

  1. Updated to V5.4.1 build 6746 (g3e22dce11)
  2. Click on device image name (What used to render as an image)

Environment

OS:Docker on ubuntu LTS
CPU architecture: x86_64
How docker service was installed: Docker install script

Command used to create docker container (run/create/compose/screenshot)

  mysql:
    image: linuxserver/mariadb
    container_name: snipe_mysql
    restart: always
    volumes:
      - ./snipe_it/mysql/config:/config
    environment:
      TZ: 'America/Los_Angeles'
      PUID: 1000
      PGID: 1000
      MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
      MYSQL_USER: snipe
      MYSQL_PASSWORD: ${MYSQL_PASSWORD}
      MYSQL_DATABASE: snipe
    networks:
      - app_net
  snipeit:
    image: linuxserver/snipe-it
    container_name: snipe-it
    restart: always
    depends_on:
      - mysql
    volumes:
      - ./snipe_it/config:/config
    environment:
      APP_URL: 192.168.1.214:8080
      MYSQL_PORT_3306_TCP_ADDR: mysql
      MYSQL_PORT_3306_TCP_PORT: 3306
      MYSQL_DATABASE: snipe
      MYSQL_USER: snipe
      MYSQL_PASSWORD: ${MYSQL_PASSWORD}
      PGID: 1000
      PUID: 1000
    networks:
      - app_net

Screen Shot 2022-03-12 at 9 08 41 PM

not work env setting 'NGINX_APP_URL', 'APP_TIMEZONE', APP_LOCALE'

linuxserver.io


Expected Behavior

work env setting 'NGINX_APP_URL', 'APP_TIMEZONE', APP_LOCALE'

Current Behavior

not work env setting 'NGINX_APP_URL', 'APP_TIMEZONE', APP_LOCALE'
(ex) all link connect localhost

Steps to Reproduce

  1. (in container) vi /var/www/html/.env
  2. #APP_URL=127.0.0.1 -> APP_URL=${NGINX_APP_URL}
  3. #APP_TIMEZONE=US/Pacific -> APP_TIMEZONE=${APP_TIMEZONE}
  4. #APP_LOCALE=en -> APP_LOCALE=${APP_LOCALE}

Environment

OS: centos 8 stream
CPU architecture: x86_64
How docker service was installed:

test information (kubernetes)
Image: linuxserver/snipe-it:latest
Image ID: docker-pullable://linuxserver/snipe-it@sha256:8d2d2f0afca8573997ed777f897127dad49e66f2b8bf046b2a6ef8f37c09012b
Port: 80/TCP
Host Port: 0/TCP
State: Running
Started: Wed, 23 Feb 2022 12:23:27 +0900

Command used to create docker container (run/create/compose/screenshot)

Docker logs

[BUG] Uh oh! Snipe-IT thinks your URL is http://localhost:8080, but your real URL is http://localhost/setup Please update your APP_URL settings in your .env file

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

My file docker-compose i have set APP_URL=http://localhost:8080. When go to http://localhost:8080/setup show Error: "Uh oh! Snipe-IT thinks your URL is http://localhost:8080, but your real URL is http://localhost/setup Please update your APP_URL settings in your .env file"
image

Expected Behavior

No response

Steps To Reproduce

I'm running docker in Windows 10

Environment

- OS: Windows 10
- How docker service was installed:

CPU architecture

x86-64

Docker creation

version: '3'
networks:
    snipeit-network:
        driver: bridge

services:
    snipe-it:
        networks:
            - snipeit-network
        image: lscr.io/linuxserver/snipe-it:latest
        container_name: snipe-it
        environment:
          - PUID=1000
          - PGID=1000
          - TZ=Etc/UTC
          - APP_URL=http://localhost:8080
          - MYSQL_PORT_3306_TCP_ADDR=mysql
          - MYSQL_PORT_3306_TCP_PORT=3306
          - MYSQL_DATABASE=snipeit
          - MYSQL_USER=snipeit
          - MYSQL_PASSWORD=ppp@123
        volumes:
          - /path/to/data:/config
        ports:
          - 8080:80
        restart: unless-stopped
        
    mysql:
        networks:
            - snipeit-network
        image: mysql
        container_name: mysql
        command: --default-authentication-plugin=mysql_native_password
        restart: always
        volumes:
            - G:/database/:/var/lib/mysql
        environment:
            MYSQL_ROOT_PASSWORD: ppp@123
            MYSQL_DATABASE: snipeit
            MYSQL_USER: snipeit
            MYSQL_PASSWORD: ppp@123

Container logs

No

Severe data corruption (noticed due to failing backups)

linuxserver.io


Expected Behavior

Update: it started with a failed backup when running the usual php /var/www/html/artisan snipeit:backup. It worked fine for a couple weeks with a daily backup and suddenly it stopped working, apparently due to database corruption (see below).

Current Behavior

A MySQL error is shown and no backup is created. The same error is shown for queries when accessing some columns in the action_date table. I also observe couple of NULL entries in working queries, which are probably related to the database corruption.

Backup failed because The dump process failed with exitcode 2 : Misuse of shell builtins : mysqldump: Couldn't execute 'SELECT /*!40001 SQL_NO_
CACHE */ `id`, `user_id`, `action_type`, `target_id`, `target_type`, `location_id`, `note`, `filename`, `item_type`, `item_id`, `expected_check
in`, `accepted_id`, `created_at`, `updated_at`, `deleted_at`, `thread_id`, `company_id`, `accept_signature`, `log_meta`, `action_date` FROM `ac
tion_logs`': Lost connection to MySQL server during query (2013)

Steps to Reproduce

  1. Connect to the running container
  2. Run php /var/www/html/artisan snipeit:backup

Environment

OS: Debian Buster
CPU architecture: arm64
How docker service was installed:
Official Docker repository

Command used to create docker container (run/create/compose/screenshot)

docker stack deploy ... (running in the swarm)

Running linuxserver/snipe-it:5.3.6 and linuxserver/mariadb:10.5.12

version: "3.2"
services:
  mysql:
    image: linuxserver/mariadb:10.5.12
    networks:
      - snipe-it
    volumes:
      - data:/config
    deploy:
      replicas: 1
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Berlin
      - MYSQL_ROOT_PASSWORD=xxx
      - MYSQL_USER=snipe
      - MYSQL_PASSWORD=xxx
      - MYSQL_DATABASE=snipe
      - DB_HOST=mysql

  snipeit:
    image: linuxserver/snipe-it:5.3.6
    networks:
      - snipe-it
    depends_on:
      - mysql
    volumes:
      - data:/config
    deploy:
    deploy:
      mode: replicated
      replicas: 1
      endpoint_mode: dnsrr
    environment:
      - APP_TRUSTED_PROXIES=x.x.x.x
      - APP_URL=http://...
      - DB_HOST=mysql
      - MYSQL_PORT_3306_TCP_ADDR=mysql
      - MYSQL_PORT_3306_TCP_PORT=3306
      - MYSQL_DATABASE=snipe
      - MYSQL_USER=snipe
      - MYSQL_PASSWORD=xxx
      - PGID=1000
      - PUID=1000

networks:
  snipe-it:
    external: true

volumes:
 data:
   driver: local
   driver_opts:
     type: "nfs4"
     o: addr=x.x.x.x,nolock,soft,rw
     device: ":/export/nfsshare/ecap-inventory"

Docker logs

Nothing in the logs:

MySQL

ecap-inventory_mysql.1.tfc2xozzssvf@pi1080    | [cont-init.d] 10-adduser: exited 0.
ecap-inventory_mysql.1.tfc2xozzssvf@pi1080    | [cont-init.d] 30-config: executing...
ecap-inventory_mysql.1.tfc2xozzssvf@pi1080    | [cont-init.d] 30-config: exited 0.
ecap-inventory_mysql.1.tfc2xozzssvf@pi1080    | [cont-init.d] 40-initialise-db: executing...
ecap-inventory_mysql.1.tfc2xozzssvf@pi1080    | [cont-init.d] 40-initialise-db: exited 0.
ecap-inventory_mysql.1.tfc2xozzssvf@pi1080    | [cont-init.d] 90-custom-folders: executing...
ecap-inventory_mysql.1.tfc2xozzssvf@pi1080    | [cont-init.d] 90-custom-folders: exited 0.
ecap-inventory_mysql.1.tfc2xozzssvf@pi1080    | [cont-init.d] 99-custom-files: executing...
ecap-inventory_mysql.1.tfc2xozzssvf@pi1080    | [custom-init] no custom files found exiting...
ecap-inventory_mysql.1.tfc2xozzssvf@pi1080    | [cont-init.d] 99-custom-files: exited 0.
ecap-inventory_mysql.1.tfc2xozzssvf@pi1080    | [cont-init.d] done.
ecap-inventory_mysql.1.tfc2xozzssvf@pi1080    | [services.d] starting services
ecap-inventory_mysql.1.tfc2xozzssvf@pi1080    | [services.d] done.
ecap-inventory_mysql.1.tfc2xozzssvf@pi1080    | 220210 17:06:46 mysqld_safe Logging to '/config/databases/762c45c8cad2.err'.
ecap-inventory_mysql.1.tfc2xozzssvf@pi1080    | 220210 17:06:46 mysqld_safe Starting mariadbd daemon with databases from /config/databases

Snipe-IT

ecap-inventory_snipeit.1.zl2u6kuf11jy@pi1080    | [cont-init.d] 10-adduser: exited 0.
ecap-inventory_snipeit.1.zl2u6kuf11jy@pi1080    | [cont-init.d] 20-config: executing...
ecap-inventory_snipeit.1.zl2u6kuf11jy@pi1080    | [cont-init.d] 20-config: exited 0.
ecap-inventory_snipeit.1.zl2u6kuf11jy@pi1080    | [cont-init.d] 30-keygen: executing...
ecap-inventory_snipeit.1.zl2u6kuf11jy@pi1080    | using keys found in /config/keys
ecap-inventory_snipeit.1.zl2u6kuf11jy@pi1080    | [cont-init.d] 30-keygen: exited 0.
ecap-inventory_snipeit.1.zl2u6kuf11jy@pi1080    | [cont-init.d] 40-config: executing...
ecap-inventory_snipeit.1.zl2u6kuf11jy@pi1080    | Nothing to migrate.
ecap-inventory_snipeit.1.zl2u6kuf11jy@pi1080    | [cont-init.d] 40-config: exited 0.
ecap-inventory_snipeit.1.zl2u6kuf11jy@pi1080    | [cont-init.d] 90-custom-folders: executing...
ecap-inventory_snipeit.1.zl2u6kuf11jy@pi1080    | [cont-init.d] 90-custom-folders: exited 0.
ecap-inventory_snipeit.1.zl2u6kuf11jy@pi1080    | [cont-init.d] 99-custom-files: executing...
ecap-inventory_snipeit.1.zl2u6kuf11jy@pi1080    | [custom-init] no custom files found exiting...
ecap-inventory_snipeit.1.zl2u6kuf11jy@pi1080    | [cont-init.d] 99-custom-files: exited 0.
ecap-inventory_snipeit.1.zl2u6kuf11jy@pi1080    | [cont-init.d] done.
ecap-inventory_snipeit.1.zl2u6kuf11jy@pi1080    | [services.d] starting services
ecap-inventory_snipeit.1.zl2u6kuf11jy@pi1080    | [services.d] done.

[BUG] Accepted Assets PDF - Images not found

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Running your Docker Image, and noticed that while testing the EULA process the downloaded PDF image is showing "Image not found.. even though the image is loading fine on the web side and can be clicked and viewed. I also saw this was reported on the official docker repo here. snipe/snipe-it#12434 but unsure if it was fixed on this version of it or not.

Expected Behavior

The EULA pdf should have the header image and signature image embedded in it properly without showing an error saying image not found.

Steps To Reproduce

  1. Checkout an asset
  2. User accepts and signs it
  3. Download EULA pdf from the asset/history page

Environment

- OS: DietPi v9.6
- How docker service was installed: portainer.io 2.19.5 on Raspberry Pi 4 running DietPi running Docker
Snipe-IT: v7.0.9-ls288

CPU architecture

arm64

Docker creation

version: "3.9"
services:
  db:
    image: mariadb:11.3-jammy
    container_name: SNIPE-IT-DB
    security_opt:
      - no-new-privileges:true
    hostname: db
    volumes:
      - /volume1/docker/snipeit/db:/var/lib/mysql:rw
    environment:
      - MYSQL_ROOT_PASSWORD=snipe
      - MYSQL_USER=snipe
      - MYSQL_PASSWORD=snipe
      - MYSQL_DATABASE=snipe
      - TZ=Europe/Bucharest
    restart: on-failure:5
      
  snipeit:
    image: lscr.io/linuxserver/snipe-it:latest
    container_name: SNIPE-IT
    restart: on-failure:5
    healthcheck:
      test: curl -f http://localhost:80/ || exit 1
    depends_on:
      - db
    volumes:
      - /snipe-vol:/var/lib/snipeit:rw
      - /volume1/docker/snipeit/db:/var/lib/mysql:rw
    environment:
      - TZ=Europe/Bucharest
      - APP_URL=https://inventory.montagemarketinggroup.com
      - NGINX_APP_URL=https://inventory.montagemarketinggroup.com
      - APP_KEY=
      - APP_FORCE_TLS=true
      - MYSQL_PORT_3306_TCP_ADDR=db
      - MYSQL_PORT_3306_TCP_PORT=3306
      - MYSQL_DATABASE=
      - MYSQL_USER=
      - MYSQL_PASSWORD=
      - PUID=1026
      - PGID=100
      - MAIL_PORT_587_TCP_ADDR=
      - MAIL_PORT_587_TCP_PORT=465
      - MAIL_ENV_FROM_ADDR=
      - MAIL_ENV_FROM_NAME=
      - MAIL_ENV_ENCRYPTION=TLS
      - MAIL_ENV_USERNAME=
      - MAIL_ENV_PASSWORD=
    ports:
      - 443:80

Container logs

INFO  No scheduled commands are ready to run.  
   INFO  No scheduled commands are ready to run.  
   INFO  No scheduled commands are ready to run.  
   INFO  No scheduled commands are ready to run.  
   INFO  No scheduled commands are ready to run.  
   INFO  No scheduled commands are ready to run.  
   INFO  No scheduled commands are ready to run.  
   INFO  No scheduled commands are ready to run.  
   INFO  No scheduled commands are ready to run.  
   INFO  No scheduled commands are ready to run.  
   INFO  No scheduled commands are ready to run.  
  2024-07-25 06:45:02 Running ['artisan' auth:clear-resets] ..... 1,799ms DONE
  ⇂ '/usr/bin/php83' 'artisan' auth:clear-resets > '/dev/null' 2>&1  
   INFO  No scheduled commands are ready to run.  
   INFO  No scheduled commands are ready to run.  
   INFO  No scheduled commands are ready to run.  
   INFO  No scheduled commands are ready to run.  
   INFO  No scheduled commands are ready to run.  
   INFO  No scheduled commands are ready to run.  
   INFO  No scheduled commands are ready to run.  
   INFO  No scheduled commands are ready to run.  
   INFO  No scheduled commands are ready to run.  
   INFO  No scheduled commands are ready to run.  
   INFO  No scheduled commands are ready to run.  
   INFO  No scheduled commands are ready to run.  
   INFO  No scheduled commands are ready to run.  
   INFO  No scheduled commands are ready to run.  
  2024-07-25 07:00:02 Running ['artisan' auth:clear-resets] ..... 1,793ms DONE
  ⇂ '/usr/bin/php83' 'artisan' auth:clear-resets > '/dev/null' 2>&1  
   INFO  No scheduled commands are ready to run.  
   INFO  No scheduled commands are ready to run.  
   INFO  No scheduled commands are ready to run.  
   INFO  No scheduled commands are ready to run.  
   INFO  No scheduled commands are ready to run.  
   INFO  No scheduled commands are ready to run.

Feature Request: HTTP redirect

linuxserver.io


Desired Behavior

Environment variable for if https is enabled, then setup http to redirect.

Current Behavior

With key/cert in place & both HTTP/HTTPS ports set with docker, both services respond. HTTP does not redirect to HTTPS

Alternatives Considered

  • Configure nginx myself.
  • Put a https redirect in front of the snipe-it container.

Using docker compose example entry on arm64 fails on database container creation

linuxserver.io

When installing this (these) image(s) on ubuntu/arm64 using the docker-compose example from https://hub.docker.com/r/linuxserver/snipe-it the following error occur:

Pulling MySQL (MySQL:5)...
5: Pulling from library/mysql
ERROR: no matching manifest for linux/arm64/v8 in the manifest list entries

I found replacing image: mysql:5 in the docker compose file with linuxserver/mariadb fixes the problem.


Expected Behavior

Database should be installed correctly, and the entire installation should run.

Current Behavior

An error occurs.

Environment

OS: ubuntu 20.10
CPU architecture: arm64

500 Server Error on "Create Database Tables" Step of Setup

linuxserver.io


Expected Behavior

Current Behavior

On step 2 of the Setup, the web page throws 500 | Server Error.
Back on Step 1, it says connection to the db was good.
This issue was replicated by Spad in the discord.

Steps to Reproduce

  1. Create docker-compose.yml from example in the docs
  2. docker-compose up -d
  3. Go to the ip:port which forwards to setup prompt
  4. Click "Next: Create Database Tables"

Environment

OS: Ubuntu 20.04 virtualized in Hyper-V
CPU architecture: x86_64
How docker service was installed: apt

Command used to create docker container (run/create/compose/screenshot)

docker-compose up -d

services:
  mysql:
    image: mysql:5
    container_name: snipe_mysql
    restart: always
    volumes:
      - ./mysql:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=-------------------
      - MYSQL_USER=snipeit
      - MYSQL_PASSWORD=-----------------------
      - MYSQL_DATABASE=snipeit
  snipeit:
    image: linuxserver/snipe-it:latest
    container_name: snipe-it
    restart: always
    depends_on:
      - mysql
    volumes:
      - ./config:/config
    environment:
      - APP_URL=----------------------------
      - MYSQL_PORT_3306_TCP_ADDR=mysql
      - MYSQL_PORT_3306_TCP_PORT=3306
      - MYSQL_DATABASE=snipeit
      - MYSQL_USER=snipeit
      - MYSQL_PASSWORD=-------------------
      - PGID=1000
      - PUID=1000
    ports:
      - "8082:443"
      - "8080:80"

Docker logs

There are no docker logs or errors when this behavior happens.

[BUG] Error 500 after fresh installation (workaround)

Is there an existing issue for this?

  • I have searched the existing issues

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.

[BUG] Snipe-IT can't use Redis.

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Configured env file with Redis settings.

REDIS_HOST=redis-name
REDIS_PORT=port-number
REDIS_PASSWORD=my-password
CACHE_DRIVER=redis

Snipe-IT larvel log displays the following error: Please make sure the PHP Redis extension is installed and enabled. in /app/www/vendor/laravel/framework/src/Illuminate/Redis/Connectors/PhpRedisConnector.php

Expected Behavior

Snipe should be able to use Redis with V6 or newer, but the Dockerfile is missing "php81-redis" package.

Steps To Reproduce

  • Latest docker
  • Latest image pull (v6.10)
  • env Redis settings:
REDIS_HOST=redis-name
REDIS_PORT=port-number
REDIS_PASSWORD=my-pass
CACHE_DRIVER=redis

Environment

- OS: Fedora 37 and latest Docker version.
- How docker service was installed: docker stack deploy -c /path/to/docker-compose.yml swarm-dev

CPU architecture

x86-64

Docker creation

######### SNIPE-IT #########
  snipe-cache:
    image: redis:alpine
    networks:
      - net
    user: uid:gid
    volumes:
      - /path/to/snipe:/data
      - /etc/localtime:/etc/localtime:ro
    environment:
      TZ: "my/tz"
    command: redis-server --save 60 1 --loglevel warning --requirepass my-pass
    deploy:
      mode: replicated
      replicas: 1
      restart_policy:
        condition: on-failure
        delay: 5s
        max_attempts: 3
        window: 20s
      resources:
        limits:
          memory: 1gb
  snipe:
    image: linuxserver/snipe-it:latest
    networks:
      - net
    volumes:
      - /path/to/config:/config
      - /etc/localtime:/etc/localtime:ro
    environment:
      PUID: uid
      PGID: gid
      TZ: "my/tz"
    env_file:
      - /path/to/snipe-env
    depends_on:
      - snipe-cache
    deploy:
      mode: replicated
      replicas: 1
      restart_policy:
        condition: on-failure
        delay: 5s
        max_attempts: 3
        window: 20s
      resources:
        limits:
          memory: 1gb

Container logs

[email protected]    | [migrations] started
[email protected]    | [migrations] 01-nginx-site-confs-default: skipped
[email protected]    | [migrations] 02-default-location: skipped
[email protected]    | [migrations] done
[email protected]    | ───────────────────────────────────────
[email protected]    |
[email protected]    |       ██╗     ███████╗██╗ ██████╗
[email protected]    |       ██║     ██╔════╝██║██╔═══██╗
[email protected]    |       ██║     ███████╗██║██║   ██║
[email protected]    |       ██║     ╚════██║██║██║   ██║
[email protected]    |       ███████╗███████║██║╚██████╔╝
[email protected]    |       ╚══════╝╚══════╝╚═╝ ╚═════╝
[email protected]    |
[email protected]    |    Brought to you by linuxserver.io
[email protected]    | ───────────────────────────────────────
[email protected]    |
[email protected]    | To support the app dev(s) visit:
[email protected]    | Snipe-IT: https://snipeitapp.com/donate
[email protected]    |
[email protected]    | To support LSIO projects visit:
[email protected]    | https://www.linuxserver.io/donate/
[email protected]    |
[email protected]    | ───────────────────────────────────────
[email protected]    | GID/UID
[email protected]    | ───────────────────────────────────────
[email protected]    |
[email protected]    | User UID:    removed
[email protected]    | User GID:    removed
[email protected]    | ───────────────────────────────────────
[email protected]    |
[email protected]    | using keys found in /config/keys
[email protected]    |
[email protected]    |    Illuminate\Database\QueryException
[email protected]    |
[email protected]    |   SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for mariadb failed: Name does not resolve (SQL: select * from information_schema.tables where table_schema = snipe and table_name = migrations and table_type = 'BASE TABLE')
[email protected]    |
[email protected]    |   at /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:712
[email protected]    |     708▕         // If an exception occurs when attempting to run a query, we'll format the error
[email protected]    |     709▕         // message to include the bindings with SQL, which will make this exception a
[email protected]    |     710▕         // lot more helpful to the developer instead of just the database's errors.
[email protected]    |     711▕         catch (Exception $e) {
[email protected]    |   ➜ 712▕             throw new QueryException(
[email protected]    |     713▕                 $query, $this->prepareBindings($bindings), $e
[email protected]    |     714▕             );
[email protected]    |     715▕         }
[email protected]    |     716▕     }
[email protected]    |
[email protected]    |       +33 vendor frames
[email protected]    |   34  /app/www/artisan:35
[email protected]    |       Illuminate\Foundation\Console\Kernel::handle()
[email protected]    | **** The following active confs have different version dates than the samples that are shipped. ****
[email protected]    | **** This may be due to user customization or an update to the samples. ****
[email protected]    | **** You should compare the following files to the samples in the same folder and update them. ****
[email protected]    | **** Use the link at the top of the file to view the changelog. ****
[email protected]    | ┌────────────┬────────────┬────────────────────────────────────────────────────────────────────────┐
[email protected]    | │  old date  │  new date  │ path                                                                   │
[email protected]    | ├────────────┼────────────┼────────────────────────────────────────────────────────────────────────┤
[email protected]    | │            │ 2022-08-20 │ /config/nginx/site-confs/default.conf                                  │
[email protected]    | │ 2021-10-24 │ 2022-08-16 │ /config/nginx/nginx.conf                                               │
[email protected]    | └────────────┴────────────┴────────────────────────────────────────────────────────────────────────┘
[email protected]    | [custom-init] No custom files found, skipping...
[email protected]    | [ls.io-init] done.

Gateway timeout 504 on setting up Database

I run my system with docker-compose on ubuntu with the following compose file:

version: "3"
services:
  mysql:
    image: linuxserver/mariadb
    container_name: snipe_mysql
    restart: always
    volumes:
      - ./mysqldata:/config
    environment:
      - PUID=1000
      - PGID=100
      - TZ=Europe/Berlin
      - MYSQL_ROOT_PASSWORD=snipe
      - MYSQL_USER=snipe
      - MYSQL_PASSWORD=snipe
      - MYSQL_DATABASE=snipe
  snipeit:
    image: linuxserver/snipe-it:latest
    container_name: snipe-it
    restart: always
    depends_on:
      - mysql
    volumes:
      - ./snipeitconfig:/config
    environment:
      - NGINX_APP_URL=server-name:8081
      - MYSQL_PORT_3306_TCP_ADDR=mysql
      - MYSQL_PORT_3306_TCP_PORT=3306
      - MYSQL_DATABASE=snipe
      - MYSQL_USER=snipe
      - MYSQL_PASSWORD=snipe
      - PGID=100
      - PUID=1000
    ports:
      - "8081:80"

However when i go through the setup i get a 504 Error at http://stabl-trocken:8081/setup/migrate?

I already checked that the UID and the GID are the one of the user im running docker from. the two folders are created when the docker container is started.

I do have another mariadb container running on the same machine. I tried to place them in different networks but I haven't been able to figure out if that is even the issue. The setup shows a working connection to the database.

[BUG] Can't use at all. UI never loads on first run.

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I 've configured the container with a db per the instructions, both maria and this container come up as expected but no webui no matter what. i eventually get a 504 timeout.

Expected Behavior

Preflight

Steps To Reproduce

Follow the documentation to create a snipe-it container with a lsio maria container as the database.
add a APP_URL with a proto according to the relevant issue in this repo.
Webui times out at that url.

Environment

- OS:Ubuntu 22.04
- How docker service was installed:
docker.io through apt

CPU architecture

x86-64

Docker creation

mariadb:
    image: lscr.io/linuxserver/mariadb:latest
    container_name: mariadb
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      - MYSQL_ROOT_PASSWORD=ROOT_ACCESS_PASSWORD
      - MYSQL_DATABASE=SNIPEIT #optional
      - MYSQL_USER=SNIPEIT #optional
      - MYSQL_PASSWORD=SNIPEIT #optional
    volumes:
      - ./mariadb:/config
    ports:
      - 3306:3306
    restart: unless-stopped

  snipe-it:
    image: lscr.io/linuxserver/snipe-it:latest
    container_name: snipe-it
    depends_on:
      - mariadb
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      - APP_URL=http://192.168.1.170:8080
      - MYSQL_PORT_3306_TCP_ADDR=3306
      - MYSQL_PORT_3306_TCP_PORT=3306
      - MYSQL_DATABASE=SNIPEIT
      - MYSQL_USER=SNIPEIT
      - MYSQL_PASSWORD=SNIPEIT
    volumes:
      - ./snipe-it:/config
    ports:
      - 8080:80
    restart: unless-stopped

Container logs

snipe-it:
using keys found in /config/keys
[custom-init] No custom files found, skipping...
[ls.io-init] done.
maria:
2023-07-08  2:49:40 0 [Note] Starting MariaDB 10.11.4-MariaDB-log source revision 4e2b93dffef2414a11ca5edc8d215f57ee5010e5 as process 183
2023-07-08  2:49:40 0 [Note] Using unique option prefix 'myisam_recover' is error-prone and can break in the future. Please use the full name 'myisam-recover-options' instead.
2023-07-08  2:49:40 0 [Note] InnoDB: Compressed tables use zlib 1.2.13
2023-07-08  2:49:40 0 [Note] InnoDB: Number of transaction pools: 1
2023-07-08  2:49:40 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2023-07-08  2:49:40 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
2023-07-08  2:49:40 0 [Note] InnoDB: Using Linux native AIO
2023-07-08  2:49:40 0 [Note] InnoDB: Initializing buffer pool, total size = 256.000MiB, chunk size = 4.000MiB
2023-07-08  2:49:40 0 [Note] InnoDB: Completed initialization of buffer pool
2023-07-08  2:49:40 0 [Note] InnoDB: File system buffers for log disabled (block size=512 bytes)
2023-07-08  2:49:40 0 [Note] InnoDB: 128 rollback segments are active.
2023-07-08  2:49:40 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
2023-07-08  2:49:40 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
2023-07-08  2:49:40 0 [Note] InnoDB: log sequence number 45452; transaction id 14
2023-07-08  2:49:40 0 [Note] Plugin 'FEEDBACK' is disabled.
2023-07-08  2:49:40 0 [Note] InnoDB: Loading buffer pool(s) from /config/databases/ib_buffer_pool
2023-07-08  2:49:40 0 [Note] InnoDB: Buffer pool(s) load completed at 230708  2:49:40
2023-07-08  2:49:40 0 [Note] Server socket created on IP: '0.0.0.0'.
2023-07-08  2:49:40 0 [Note] Server socket created on IP: '::'.
2023-07-08  2:49:40 0 [Note] mariadbd: ready for connections.
Version: '10.11.4-MariaDB-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Alpine Linux
2023-07-08  2:49:42 0 [Note] mariadbd (initiated by: root[root] @ localhost []): Normal shutdown
2023-07-08  2:49:42 0 [Note] InnoDB: FTS optimize thread exiting.
2023-07-08  2:49:42 0 [Note] InnoDB: Starting shutdown...
2023-07-08  2:49:42 0 [Note] InnoDB: Dumping buffer pool(s) to /config/databases/ib_buffer_pool
2023-07-08  2:49:42 0 [Note] InnoDB: Buffer pool(s) dump completed at 230708  2:49:42
2023-07-08  2:49:42 0 [Note] InnoDB: Removed temporary tablespace data file: "./ibtmp1"
2023-07-08  2:49:42 0 [Note] InnoDB: Shutdown completed; log sequence number 46702; transaction id 16
2023-07-08  2:49:42 0 [Note] mariadbd: Shutdown complete

Database Setup Completed
[custom-init] No custom files found, skipping...
230708 02:49:43 mysqld_safe Logging to '/config/databases/924b87e05648.err'.
230708 02:49:43 mysqld_safe Starting mariadbd daemon with databases from /config/databases
[ls.io-init] done.

stuff, lol

linuxserver.io

Thanks, team linuxserver.io

stuff i've seen so far

  • stylistic changes (tabs, spaces etc)
  • don't make folders or links etc to /config in the Dockerfile
  • the loop for making the folders in the init file would be better served with
    mkdir -p /blah/{folder1,folder2,folder2} etc.........
  • symlinks are the bastard son of a pestilent donkey, linking internal to volume mounts, if you must use them i can't see why you wouldn't just link the storage folder to the volume mount with one of the evil things, rather than multiple symlinks like that.
  • need to give docker and core group admin status to the repo

Readme typo for suggested PHP values

linuxserver.io


Expected Behavior

upload_max_filesize = 16M
post_max_size = 16M
There is a typo in the PHP customization settings, current set upload limit to 16 bytes, resulting in all uploads silently failing.

Current Behavior

upload_max_filesize = 16
post_max_size = 16M

Steps to Reproduce

Environment

All

Command used to create docker container (run/create/compose/screenshot)

Docker logs

[BUG] Error 500 at first setup

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

After setting up everything using the docker run commands for mariadb and snipe-it i am presented with the normal snipe-it pre-flight page
image
But after clicking next, i get this
image

Expected Behavior

The process should continue the pre-flight

Steps To Reproduce

  1. Docker run mariadb container as shown in the documentation
  2. Docker run snipe-it container as shown in the documentation
  3. Clicking next

Environment

- OS: Windows
- How docker service was installed: Docker Desktop

CPU architecture

x86-64

Docker creation

docker run -d `
  --name=mariadb `
  --hostname=mariadb `
  --network=testNetwork `
  -e PUID=1000 `
  -e PGID=1000 `
  -e TZ=Europe/Berlin `
  -e MYSQL_ROOT_PASSWORD=root-password `
  -e MYSQL_DATABASE=SnipeIT-database `
  -e MYSQL_USER=snipeit-user `
  -e MYSQL_PASSWORD=snipe-it-password `
  -p 3306:3306 `
  -v C:\Users\USERNAME\Docker_Mountpoint\MariaDB:/config `
  --restart unless-stopped `
  lscr.io/linuxserver/mariadb:latest

docker run -d `
  --name=snipe-it `
  --hostname=snipe-it `
  --network=testNetwork `
  -e PUID=1000 `
  -e PGID=1000 `
  -e TZ=Europe/Berlin `
  -e APP_URL=https://test.local `
  -e MYSQL_PORT_3306_TCP_ADDR=mariadb `
  -e MYSQL_PORT_3306_TCP_PORT=3306 `
  -e MYSQL_DATABASE=SnipeIT-database `
  -e MYSQL_USER=snipeit-user `
  -e MYSQL_PASSWORD=snipe-it-password `
  -p 443:443 `
  -v C:\Users\USERNAME\Docker_Mountpoint\SnipeIT:/config `
  --restart unless-stopped `
  lscr.io/linuxserver/snipe-it:latest

Container logs

2023-02-27 16:10:32 [migrations] started
2023-02-27 16:10:32 [migrations] 01-nginx-site-confs-default: executing...
2023-02-27 16:10:32 [migrations] 01-nginx-site-confs-default: succeeded
2023-02-27 16:10:32 [migrations] 02-default-location: executing...
2023-02-27 16:10:32 [migrations] 02-default-location: succeeded
2023-02-27 16:10:32 [migrations] done
2023-02-27 16:10:32 
2023-02-27 16:10:32 -------------------------------------
2023-02-27 16:10:32           _         ()
2023-02-27 16:10:32          | |  ___   _    __
2023-02-27 16:10:32          | | / __| | |  /  \
2023-02-27 16:10:32          | | \__ \ | | | () |
2023-02-27 16:10:32          |_| |___/ |_|  \__/
2023-02-27 16:10:32 
2023-02-27 16:10:32 
2023-02-27 16:10:32 Brought to you by linuxserver.io
2023-02-27 16:10:32 -------------------------------------
2023-02-27 16:10:32 
2023-02-27 16:10:32 To support the app dev(s) visit:
2023-02-27 16:10:32 Snipe-IT: https://snipeitapp.com/donate
2023-02-27 16:10:32 
2023-02-27 16:10:32 To support LSIO projects visit:
2023-02-27 16:10:32 https://www.linuxserver.io/donate/
2023-02-27 16:10:32 -------------------------------------
2023-02-27 16:10:32 GID/UID
2023-02-27 16:10:32 -------------------------------------
2023-02-27 16:10:32 
2023-02-27 16:10:32 User uid:    1000
2023-02-27 16:10:32 User gid:    1000
2023-02-27 16:10:32 -------------------------------------
2023-02-27 16:10:32 
2023-02-27 16:10:32 Setting resolver to  127.0.0.11
2023-02-27 16:10:32 Setting worker_processes to 8
2023-02-27 16:10:32 generating self-signed keys in /config/keys, you can replace these with your own keys if required
2023-02-27 16:10:33 Generating SnipeIT app key for first run
2023-02-27 16:10:33 App Key set to base64:APPKEY you can modify the file to update /config/SNIPE_IT_APP_KEY.txt
2023-02-27 16:10:33 [custom-init] No custom files found, skipping...
2023-02-27 16:10:33 [ls.io-init] done.
2023-02-27 16:10:32 grep: /config/nginx/site-confs/default.conf: No such file or directory
2023-02-27 16:10:32 .+.+...+...............+..+.+..............+....+......+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*.+...............+.+...+......+.....+......+..........+.....+....+...+..+...+......+.+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*...+.....+.+........+.........+......+.......+........+....+.....+...............+...+..........+..+......+.+...+.....+......+.+.....+...+...+....+...+...........+..........+.....+......+.+...+..+.......+..+....+.....+.+..................+..+.+...+.....+.+.....+.....................+..........+...+...........+..........+.........+.....+.+........+...+....+...+...+..+.............+..+......+...............+.+......+............+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2023-02-27 16:10:32 .........+.....+...+.+..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*.+.+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*.+............+.........+............+....+...+...+..+......+.+........+..........+...+..+...+.............+..+...+.......+...+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2023-02-27 16:10:32 -----

Traefik configuration for Snipe-IT

Desired Behavior

Config example of traefik label or documentation what else to change for traefik reverse proxy to work.

Current Behavior

As I tried almost every combination I can't make it work with traefik.
Instead of myserver:3051 I want snipeit.mydomain.com but getting either 404 or Gateway errors.

Uploads Not Working

linuxserver.io

Uploading either branding or assets images does not function correctly. While the upload seems to complete, ie. I can see the asset in the file system of the container, the asset is not correctly applied to the web interface. The same issue occurs when uploading images to a specific asset.


Expected Behavior

Uploading asset or branding images should be reflected in the web interface and/or the specific asset page.

Current Behavior

When uploading branding images, no change to branding occurs.

When uploading asset images, broken image box appears.

Steps to Reproduce

  1. Create new Snipe application using standard docker-compose supplied
  2. Upload either branding or asset image

Environment

OS: Ubuntu Server 20.04.1 LTS
CPU architecture: x86_64/arm32/arm64
How docker service was installed:

Container is run via the compose file supplied on the docker hub page. Bind mounts are used for volumes, PID and GUID are both set 1000

Command used to create docker container (run/create/compose/screenshot)

https://imgur.com/TJk2wW4

version: "3"
services:
  mysql:
    image: mysql:5
    container_name: snipe_mysql
    restart: always
    volumes:
      - ./config/mysql:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=********
      - MYSQL_USER=snipe
      - MYSQL_PASSWORD=*******
      - MYSQL_DATABASE=snipe
  snipeit:
    image: linuxserver/snipe-it:latest
    container_name: snipe-it
    restart: always
    depends_on:
      - mysql
    volumes:
      - ./config/snipe:/config
    environment:
      - APP_URL=snipe.********.com
      - MYSQL_PORT_3306_TCP_ADDR=mysql
      - MYSQL_PORT_3306_TCP_PORT=3306
      - MYSQL_DATABASE=snipe
      - MYSQL_USER=snipe
      - MYSQL_PASSWORD=*******
      - PGID=1000
      - PUID=1000
      - APP_TIMEZONE=America/New_York
      - MAIL_PORT_587_TCP_ADDR=email-smtp.us-east-1.amazonaws.com
      - MAIL_PORT_587_TCP_PORT=587
      - MAIL_ENV_FROM_ADDR=inventory@********.com
      - MAIL_ENV_FROM_NAME=*******
      - MAIL_ENV_ENCRYPTION=tls
      - MAIL_ENV_USERNAME=*******
      - MAIL_ENV_PASSWORD=********
      # - UMASK=022 (have tried with both UMASK set and not set.
    ports:
      - "80:80"
      - "443:443"

Docker logs

N/A

Logs do not show any changes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.