Git Product home page Git Product logo

Comments (4)

aborilov avatar aborilov commented on July 18, 2024

The same problem here

from redmine.

yosifkit avatar yosifkit commented on July 18, 2024

The reason for using a fixed name rather than the value of that environment variable is for container restarts. The env contains the IP address of the mysql container; if that container restarts (docker stop/start) and gets a new IP, the variable won't get updated, but /etc/hosts does. We could instead use the MYSQL_NAME/POSTGRES_NAME and just pull off the other container's name after the last slash. Something like this?

-           if [ "$MYSQL_PORT_3306_TCP" ]; then
+           if [ "$MYSQL_NAME" ]; then
                adapter='mysql2'
-               host='mysql'
+               host="${MYSQL_NAME##*/}"

from redmine.

aborilov avatar aborilov commented on July 18, 2024

Of course we don't need container IP there, we need something like in WordPress:

if [ -n "$MYSQL_PORT_3306_TCP" ]; then
        if [ -z "$WORDPRESS_DB_HOST" ]; then
            WORDPRESS_DB_HOST='mysql'
........
set_config 'DB_HOST' "$WORDPRESS_DB_HOST"

from redmine.

jgracin avatar jgracin commented on July 18, 2024

Hi! Are there any plans for the new release containing the commit by brainsam? We need this to run redmine with a non-containerized Postgres.

from redmine.

Related Issues (20)

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.