简体   繁体   English

如何与Django一起使用Dokku?

[英]How use Dokku with django?

I try use dokku for my web projects - deployment become cool. 我尝试将dokku用于我的Web项目-部署变得很酷。 But I can't find information about two things. 但是我找不到有关两件事的信息。

  1. Can I autocreate database from dokku-util ? 我可以从dokku-util自动创建数据库吗? How? 怎么样?
  2. How and where store media files without using AWS ? 不使用AWS的方式和位置存储媒体文件? I want use only my vps'. 我只想使用我的VPS。

PS Or may be you see good materials about full workflow for dokku ? PS还是您可能会看到有关dokku完整工作流程的好材料?

  1. You can add plugins to dokku. 您可以将插件添加到dokku。 Connect to your VPS, go to the /var/lib/dokku/plugins folder and then you can 'git clone' various plugins from github. 连接到您的VPS,转到/ var / lib / dokku / plugins文件夹,然后您可以从github中“ git clone”各种插件。 There are a list of plugins on the dokku site that will create mysql, postgresql, redis, and other databases. 在dokku网站上有一系列插件,这些插件将创建mysql,postgresql,redis和其他数据库。

While the plugins work great, I prefer to run a second VPS that just hosts databases. 尽管插件运行良好,但我更喜欢运行仅托管数据库的第二个VPS。

  1. There isn't really a good way of serving static files directly from django--even when it's under docker. 直接从django提供静态文件的方法真的不是一种好方法,即使它在docker下也是如此。 There is an app called dj-static that will help, but the author appears to be slow to update it for newer django releases. 有一个名为dj-static的应用程序会有所帮助,但是对于较新的Django版本,作者似乎更新较慢。 ( https://github.com/kennethreitz/dj-static ) https://github.com/kennethreitz/dj-static

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM