Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The basic example redirects to http://127.0.0.1:4440/ #4

Closed
fungiboletus opened this issue Oct 31, 2018 · 4 comments
Closed

The basic example redirects to http://127.0.0.1:4440/ #4

fungiboletus opened this issue Oct 31, 2018 · 4 comments

Comments

@fungiboletus
Copy link

Hei,

The basic example does redirect quite a few times to http://127.0.0.1:4440. Which is fine, unless you test it on a random local virtualbox VM or on a random cloud VM.

I believe adding the RUNDECK_GRAILS_URL setting would not make the example much more complex.

@filviu
Copy link

filviu commented Jul 31, 2019

I added RUNDECK_GRAILS_URL to .env before doing docker-compose up but it still redirects to 127.0.0.1

@rafaiovlabs
Copy link

Also it seems that from the code these images are built with localhost burned, from a docker-lib addition, any idea how to overwrite this sets ? .

@kevinadhiguna
Copy link
Contributor

I ran to this issue when using docker-compose.yml here.

To solve the problem, I added RUNDECK_GRAILS_URL: ${RUNDECK_GRAILS_URL:-localhost:4440} in environment section of docker-compose.yml. This worked but I wanted to add environment variable to handle the URL, so it looked like this :
RUNDECK_GRAILS_URL: ${RUNDECK_GRAILS_URL:-localhost:4440}

The whole docker-compose.yml is :

version: '3'

services:
    rundeck:
        image: rundeck/rundeck:SNAPSHOT
        # links:
        #   - mysql
        depends_on:
          - mysql
        environment:
            RUNDECK_DATABASE_DRIVER: org.mariadb.jdbc.Driver
            RUNDECK_DATABASE_USERNAME: ${RUNDECK_DATABASE_USERNAME:-rundeck}
            RUNDECK_DATABASE_PASSWORD: ${RUNDECK_DATABASE_PASSWORD:-rundeck}
            RUNDECK_DATABASE_URL: ${RUNDECK_DATABASE_URL:-jdbc:mysql://mysql/rundeck?autoReconnect=true&useSSL=false}
            # Add 'RUNDECK_GRAILS_URL' to avoid host changing to localhost (see more : https://github.com/rundeck/rundeck/issues/671)
            # 'RUNDECK_GRAILS_URL' can be remote IP address, such as 43.133.23.165 or hostname, like https://mywebsite.com
            RUNDECK_GRAILS_URL: ${RUNDECK_GRAILS_URL:-localhost:4440}
        # volumes:
        #   - ${RUNDECK_LICENSE_FILE:-/dev/null}:/home/rundeck/etc/rundeckpro-license.key
        ports:
          - 4440:4440
    mysql:
        image: mysql:5.7
        # expose:
        #   - 3306
        ports:
          - 3306:3306
        environment:
          MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-root}
          MYSQL_DATABASE: ${MYSQL_DATABASE:-rundeck}
          MYSQL_USER: ${MYSQL_USER:-rundeck}
          MYSQL_PASSWORD: ${MYSQL_PASSWORD:-rundeck}
        volumes:
          - dbdata:/var/lib/mysql

volumes:
    dbdata:

Also, this is the .env file that includes environment variables and thier values :

RUNDECK_DATABASE_USERNAME=rundeck
RUNDECK_DATABASE_PASSWORD=rundeck
RUNDECK_DATABASE_URL=jdbc:mysql://mysql/rundeck?autoReconnect=true&useSSL=false
RUNDECK_GRAILS_URL=https://mywebsite.com
MYSQL_ROOT_PASSWORD=root
MYSQL_DATABASE=rundeck
MYSQL_USER=rundeck
MYSQL_PASSWORD=rundeck

Feel free to change the value of RUNDECK_GRAILS_URL in .env.

You can have a look here to check them all, including how to run the docker-compose and its setup :

kevinadhiguna added a commit to kevinadhiguna/docker-zoo that referenced this issue Dec 25, 2021
Added RUNDECK_GRAILS_URL to fix rundeck/rundeck#671 and rundeck#4 on development powered by docker-compose.
kevinadhiguna added a commit to kevinadhiguna/docker-zoo that referenced this issue Dec 25, 2021
Added RUNDECK_GRAILS_URL to fix rundeck/rundeck#671 and rundeck#4 on development powered by docker-compose.
@DaiZack
Copy link

DaiZack commented Apr 28, 2022

This works for me

version: '3'

services:
rundeck:
image: rundeck/rundeck:SNAPSHOT
links:
- mysql
environment:
EXTERNAL_SERVER_URL: http://10.8.0.3:4440
RUNDECK_GRAILS_URL: http://10.8.0.3:4440
RUNDECK_SERVER_ADDRESS: 0.0.0.0
RUNDECK_DATABASE_DRIVER: org.mariadb.jdbc.Driver
RUNDECK_DATABASE_USERNAME: rundeck
RUNDECK_DATABASE_PASSWORD: rundeck
RUNDECK_DATABASE_URL: jdbc:mysql://mysql/rundeck?autoReconnect=true&useSSL=false
volumes:
- ${RUNDECK_LICENSE_FILE:-/dev/null}:/home/rundeck/etc/rundeckpro-license.key
ports:
- 4440:4440
mysql:
image: mysql:5.7
expose:
- 3306
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=rundeck
- MYSQL_USER=rundeck
- MYSQL_PASSWORD=rundeck
volumes:
- dbdata:/var/lib/mysql

volumes:
dbdata:

@fdevans fdevans closed this as completed May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants