user2913139
user2913139

Reputation: 627

Rundeck from docker: no logs?

Running rundeck from docker (default backend), but noticed there are no logs. This documentation seems not complete / not valid for docker deployment: https://docs.rundeck.com/docs/administration/maintenance/logs.html

All the logs inside docker:/home/rundeck/server/logs have 0 size.

How to review the logs when running as a docker ?

Thanks,

Upvotes: 1

Views: 737

Answers (1)

MegaDrive68k
MegaDrive68k

Reputation: 4380

The execution logs are stored at the /home/rundeck/var/logs/rundeck path, so, a good idea is to mount it as a volume (to see them in your local filesystem), take a look at this docker-compose example:

version: '3'
services:
    rundeck:
        image: rundeck/rundeck:4.2.1
        environment:
            RUNDECK_GRAILS_URL: http://localhost:4440
            RUNDECK_DATABASE_DRIVER: org.mariadb.jdbc.Driver
            RUNDECK_DATABASE_USERNAME: rundeck
            RUNDECK_DATABASE_PASSWORD: rundeck
            RUNDECK_DATABASE_URL: jdbc:mariadb://mysql/rundeck?autoReconnect=true&useSSL=false&allowPublicKeyRetrieval=true 
            RUNDECK_LOGGING_STRATEGY: FILE
        volumes:
          - ./data/logs/:/home/rundeck/var/logs/rundeck/
        ports:
          - 4440:4440
        tty: true
    mysql:
        image: mysql:8
        expose:
          - 3306
        environment:
          - MYSQL_ROOT_PASSWORD=root
          - MYSQL_DATABASE=rundeck
          - MYSQL_USER=rundeck
          - MYSQL_PASSWORD=rundeck

The service.log is available in the docker logs command, to see it just do docker logs <container_id> -f.

Upvotes: 2

Related Questions