linuxserver / docker-snipe-it

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

environment variable FILE__MYSQL_PASSWORD not setting MYSQL_PASSWORD #27

Closed kale1d0code closed 2 years ago

kale1d0code commented 2 years ago

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 /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

github-actions[bot] commented 2 years ago

Thanks for opening your first issue here! Be sure to follow the bug or feature issue templates!