这里先贴一段官方的指南

Deploy Miniflux on Google App Engine

Create a Postgresql instance via Google Cloud SQL, then create a user and a new database
Clone the repository and create a app.yaml file in the project root directory

runtime: go111
env_variables:
    CLOUDSQL_CONNECTION_NAME: INSTANCE_CONNECTION_NAME
    CLOUDSQL_USER: replace-me
    CLOUDSQL_PASSWORD: top-secret

    CREATE_ADMIN: 1
    ADMIN_USERNAME: foobar
    ADMIN_PASSWORD: test123
    RUN_MIGRATIONS: 1
    DATABASE_URL: "user=replace-me password=top-secret host=/cloudsql/INSTANCE_CONNECTION_NAME dbname=miniflux"

如上所示,使用Postgresql instance可以按照教程进行配置,但这个实例要花钱的。怎么办?

还有一个免费的f1-micro不是吗?安装一个Postgresql给App Engine用就好了。记得按照 https://miniflux.app/docs/installation.htmlDatabase Configuration 这一段来配置数据库。

指定自己的远程数据库配置该怎么写?

贴一下我的配置示例。另外,不要加引号,这个好像是个坑。

runtime: go111
env_variables:
    CREATE_ADMIN: 1
    ADMIN_USERNAME: foobar
    ADMIN_PASSWORD: test123
    RUN_MIGRATIONS: 1
    DATABASE_URL: user=your_dbuser_name password=your_dbpass dbname=your_dbname sslmode=disable host=1.1.1.1

如果想要连接已有数据库直接运行miniflux呢?

runtime: go111
env_variables:
    RUN_MIGRATIONS: 1
    DATABASE_URL: user=your_dbuser_name password=your_dbpass dbname=your_dbname sslmode=disable host=1.1.1.1

如果想要http自动跳转https呢?加入handlers

runtime: go111
handlers:
- url: /.*
    script: auto
    secure: always
    redirect_http_response_code: 301
env_variables:
    RUN_MIGRATIONS: 1
    DATABASE_URL: user=your_dbuser_name password=your_dbpass dbname=your_dbname sslmode=disable host=1.1.1.1

如果担心数据库连接安全,可以使用SSL加密。参照使用acme.sh为Postgresql添加SSL支持