Creating a new directory in Heroku

I am very new to Heroku and I just clicked the Django app on Heroku. Does anyone know how to create a log directory in the "/ app" section? Is / app the top folder of my application?

thanks

+4
source share
2 answers

To create a new directory, you can simply create it in your local directory (i.e. cd app; mkdir log then commit and click on Heroku.

Whether /app top directory or independent of your directory structure, this is usually the name of the Heroku application that is installed as the top directory. Although, if you are in your git repository that was used for your Heroku application, you can find the root directory:

 git rev-parse --show-toplevel 

which is a git command that tells the top level directory of this git directory.

0
source

Is the log directory in your .gitignore file? If /log is an unversioned directory, then the KZ response should help with Heroku; if something else is not happening with Heroku and the log directory in your repo.

Regarding committing an empty directory

You cannot pass empty directories to git, but you can add a .gitignore file to a directory that ignores all files except itself. This will be as close as possible to the version of the empty directory, as I am sure that you do not want to control the version of your log files.

Make sure the log directory is not in the main .gitignore file. Then in your log directory create a new .gitignore that contains the following:

 # Ignore everything in this directory * # Except this file !.gitignore 

You can check out Jamie Florn's answer here. How do I add an empty directory to the Git repository?

+2
source

Source: https://habr.com/ru/post/1442566/


All Articles