Reputation: 1290
I successfully deployed my Rails application fireworks_app
with Dokku in a Ubuntu 18.04 LTS machine, and now I would like to add a logrotate file for my Rails logs. What is the path of my application and thus of my log files? There is a /home/dokku/fireworks_app
folder but this folder contains only the following items:
$ ls
CONTAINER.web.1 DOCKER_OPTIONS_RUN HEAD URLS cache hooks maintenance objects
DOCKER_OPTIONS_BUILD DOKKU_SCALE IP.web.1 VHOST config info nginx.conf refs
DOCKER_OPTIONS_DEPLOY ENV PORT.web.1 branches description letsencrypt nginx.conf.d
I suppose somewhere in the system there is a folder containing my application with the known Rails file structure, but I cannot find it.
Upvotes: 0
Views: 715
Reputation: 96
Inside your rails application you can do something like Rails.root
to get the path to the root directory of your project.
For instance, if the log files are in fireworks_app/lib/log/
you could do Rails.root.join('lib','log','log_file.log')
to get the path to that file.
Upvotes: 1