【问题标题】:Create Azure web site with Django and postgresql使用 Django 和 postgresql 创建 Azure 网站
【发布时间】:2015-12-30 20:42:55
【问题描述】:

我有 django + postgresql 网站。

我想将它们发布到 Azure 网站。

如何在 azure 网站中同步 db 或创建 postgresql 数据库?

如果可以的话,我需要在设置文件中写什么?

DATABASES = {
        'default': {
            'ENGINE': 'django.db.backends.postgresql_psycopg2',
            'NAME': 'xxx',
            'USER': 'xxx',
            'PASSWORD': 'xxx',
            'HOST': 'xxx',
            #'PORT': 'xxx',
        }
    }

【问题讨论】:

  • Azure 应用服务中没有内置 postgre。您必须将您的应用程序指向远程数据库。

标签: django postgresql azure azure-web-app-service


【解决方案1】:

您可以将应用发布到 Azure 应用服务(Web 应用,以前的网站,位于应用服务中)。但是,您将无法在那里安装 postgres。相反,您需要将其安装到 VM(或使用第 3 方 postgresql 主机)。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-12-30
    • 2017-08-27
    • 2021-05-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-05-03
    • 2023-01-04
    相关资源
    最近更新 更多