Question

How to set the root application directory?

Posted September 22, 2014 4.2k views

I have created my first droplet, but I don’t know how to set the root application directory?
I tried to create a folder for my app name in /home/dokku/app_name
Then, I did cd app_name and then git init
Then I added a remote repo:

git remote add dokku root@do.mydomain.com:app_name

But, when try to push I get error:

fatal: 'app_name' does not appear to be a git repository
fatal: The remote end hung up unexpectedly

How to configure this? How to set the root application directory?

1 comment

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

1 answer

You don’t have to create any directory on the host. Remove any folders or files you created.

When you run git push dokku <branch> dokku will automatically create the directories and files needed.

  • I know that pushing a repo content will create the folders and files, I always used in at heroku, but here I still need to map the remote repo to the app folder, which I still don’t know how to do it.

    When I try:

    git push dokku master
    I get:
    fatal: ‘app_name’ does not appear to be a git repository
    fatal: The remote end hung up unexpectedly

  • Try added the remote as dokku@do.mydomain.com:app_name and make sure to delete all files and folders you created, /home/dokku/app_name must be created by the dokku script.

  • Thanks, I found the answer, here

Submit an Answer