如何设置根应用程序目录? [英] How to set the root application directory?

查看:195
本文介绍了如何设置根应用程序目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了我的第一个液滴,但我不知道如何设置根应用程序目录?
我尝试在 / home / dokku / app_name
中为我的应用程序名称创建一个文件夹然后,我做了 cd app_name 然后 git init
然后我添加了一个远程回购:

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

但是,当试图推动我得到错误:

 致命:'app_name'似乎不是一个git存储库
致命:远程终端意外挂起

如何配置?如何设置根应用程序目录?

解决方案

如果您还没有:

(在服务器上)


  1. 以root身份登录到服务器。 cd〜(转到根目录dir)

  2. cd app_name

  3. git init --bare (它应该给你提示它初始化了一个git仓库)

(本地系统)


  1. cd app_name

  2. git init (它会给你提示它初始化了一个git仓库)
  3. git add 。(将当前目录中的所有文件分阶段提交)

  4. git commit

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

  6. git推送dokku master (第一次需要给出分支的名称,因为远程仓库没有任何分支。

希望这可以解决您的问题!


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?

解决方案

Follow the following steps if you haven't:

(on server)

  1. Login to server as root. cd ~ (Go to home dir of root)
  2. cd app_name
  3. git init --bare (It should give you message that it initialized a git repo)

(Local System)

  1. cd app_name
  2. git init (It should give you message that it initialized a git repo)
  3. git add . (to stage all files in current dir to commit)
  4. git commit
  5. git remote add dokku root@do.mydomain.com:app_name
  6. git push dokku master (first time you need to9 give the name of branch to push as remote repo does not have any branch of itself yet.

Hope this solves your prob!

这篇关于如何设置根应用程序目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆