juanluisbaptiste / docker-otrs

The unofficial Znuny/OTRS Ticketing System docker image
https://www.juanbaptiste.tech/category/otrs
GNU Lesser General Public License v3.0
173 stars 101 forks source link

Create different database name instead default (otrs) #36

Closed MrDog3 closed 6 years ago

MrDog3 commented 6 years ago

I was having trouble when creating database giving it a different name (otrs1 instead otrs). To create a different database name I needed to add thin line in otrs/function.sh:

(below line nº 177) add_config_value "Database" ${OTRS_DB_NAME}

I had this trouble in my project because I needed to create multiple OTRS containers and create different databases for each otrs service.

juanluisbaptiste commented 6 years ago

Why don't you just run two different OTRS instances ? this way you will have muliple OTRSs each one using its own database.

Also this pull request is broken, and for some reason it doesn't include your change...

MrDog3 commented 6 years ago

Good morning Juan, To clarify my situation, I'm using MariaDB in an external Cluster and, when I'm creating the otrs env files (one per otrs service), I need to differentiate databases, and the way you have it they all create the same database's name OTRS. To correct this problem I had, I needed to make these changes. Looking at your project, and checking the env strings supported by otrs environment files (eg OTRS_DB_NAME), I think it is usefull to have this variable on function.sh script (line 177: add_config_value "Database" ${OTRS_DB_NAME}) because otherwise it will always create the database with the same name (otrs), regardless of what we put on the environment file. Thanks for your fast reply. Best regards.

juanluisbaptiste commented 6 years ago

Ok, that makes sense, but still this PR is broken, it seems ton include the same branch commits instead of yours.

MrDog3 commented 6 years ago

Hello Juan, I did a new PR with proper procedure and now it should be working. Check it please: https://github.com/juanluisbaptiste/docker-otrs/pull/37 Sorry, because it's my first time making PRs in GitHub and I didn't made it correctly. Thanks and Best Regrads.

juanluisbaptiste commented 6 years ago

Looking at the README file, this is already supported, there's OTRS_DB_NAME already for that.