simplerisk / docker

SimpleRisk Docker Repository
https://www.simplerisk.com
Mozilla Public License 2.0
26 stars 20 forks source link

unable to start. Expects database to not exist #86

Closed kale1d0code closed 4 months ago

kale1d0code commented 4 months ago

when setting up simplerisk with mariadb simplerisk will crash with the message: Can't create database ''; database exists

mariadb container is responsible for creating the database simplerisk should populate database with tables

jsokol commented 4 months ago

It sounds like you're using the "simplerisk" docker, which does include the database creation. If you are creating the database via another method, or one already exists, then you should use the SimpleRisk Minimal image:

https://github.com/simplerisk/docker/tree/master/simplerisk-minimal

kale1d0code commented 4 months ago

I experienced this issue on the minimal variant simplerisk-minimal image

jsokol commented 4 months ago

We use the simplerisk-minimal image internally with no issues for both the database setup and hosting of the image. You just need to specify the SIMPLERISKDB* options when spinning up the container to tell it how to connect to the existing database.

SIMPLERISK_DB_HOSTNAME SIMPLERISK_DB_PORT SIMPLERISK_DB_USERNAME SIMPLERISK_DB_PASSWORD SIMPLERISK_DB_DATABASE

If you do not specify these values, it will assume that a "simplerisk" database i s already running on localhost with a user/pass of "simplerisk".