docker compose define user/pass

34 views
Skip to first unread message

aristos....@gmail.com

unread,
Nov 19, 2024, 7:25:54 AM11/19/24
to rundeck-discuss
This is the docker-compose.yml to create a rundeck instance on docker.

services:
  rundeck:
    image: rundeck/rundeck:SNAPSHOT
    container_name: rundeck
    hostname: rundeck
    restart: unless-stopped
    environment:
      - PUID=1001
      - PGID=1001
      - TZ=Europe/Nicosia
      - RUNDECK_SERVER_ADDRESS=0.0.0.0
      - RUNDECK_GRAILS_URL=http://192.168.1.20:4440
    ports:
      - 4440:4440
    volumes:
      - rundeck:/home/rundeck
      - rundeck:/home/rundeck/var/logs
      - rundeck:/home/rundeck/server/data

volumes:
  rundeck:

Is there a variable, or any way, to define the username/password for the web login?

Thanks

rac...@rundeck.com

unread,
Nov 19, 2024, 7:44:46 AM11/19/24
to rundeck-discuss

Hi,

You need to “mount” the realm.properties file with the custom users/passwords, please check this example. The realm.properties file is the default place to add users and roles, more info here.

Regards.

aristos....@gmail.com

unread,
Nov 20, 2024, 11:48:08 PM11/20/24
to rundeck-discuss
eventually I did it like this.

  rundeck:
    image: rundeck/rundeck:SNAPSHOT
    container_name: rundeck
    hostname: rundeck
    restart: unless-stopped
    environment:
      - PUID=1001
      - PGID=1001
      - RUNDECK_SERVER_ADDRESS=0.0.0.0
      - RUNDECK_GRAILS_URL=http://192.168.1.20:4440
    ports:
      - 4440:4440
    volumes:
      - rundeck:/home/rundeck
      - rundeck:/home/rundeck/var/logs
      - rundeck:/home/rundeck/server/data
    entrypoint: >
      sh -c "
      rm -f /home/rundeck/server/config/realm.properties &&
      echo 'admin:password_here,user,admin' > /home/rundeck/server/config/realm.properties &&
      echo 'user:user,user' >> /home/rundeck/server/config/realm.properties &&
      exec /tini -- docker-lib/entry.sh"

it seems to be working.

Reply all
Reply to author
Forward
0 new messages