【问题标题】:How to configure GCP App Engine app.yaml for PrivateBin?如何为 PrivateBin 配置 GCP App Engine app.yaml?
【发布时间】:2019-03-19 17:44:15
【问题描述】:

我想从 GCP App Engine 托管 PrivateBin,但我不知道如何配置 app.yaml 文件。如果有人以前这样做过,我将不胜感激。 :)

我尝试了两种选择,但都没有奏效:

runtime: php55
api_version: 1
threadsafe: yes

handlers:

- url: /.*
  script: index.php

&

runtime: php55
api_version: 1

handlers:

- url: /(.*.(ico$|jpg$|png$|gif$|htm$|html$|css$|js$|xml$))
  static_files: \1
  upload: (.*.(ico$|jpg$|png$|gif$|htm$|html$|css$|js$|xml$))
  application_readable: true

- url: /(.+)
  script: \1

- url: /
  script: index.php

【问题讨论】:

  • 看来您可以将其与容器一起部署到 GCP 中。使用 PrivateBin docker 容器镜像,效果很好!

标签: google-app-engine google-cloud-platform app.yaml


【解决方案1】:

您打算如何存储您的数据?

https://github.com/PrivateBin/PrivateBin/blob/master/INSTALL.md#using-a-database-instead-of-flat-files

看起来私人 bin 默认使用文件系统,这在 GAE 标准上不起作用。您可以在 GAE flex 中执行此操作,但您正在读取和写入的目录需要是已挂载的 Google Cloud Storage Bucket 或其他东西才能使数据持久化(并且可用于多个实例)https://cloud.google.com/storage/docs/gcs-fuse

更好的方法似乎是将 privatebin 配置为使用 SQL db,即 Google Cloud SQL:

https://cloud.google.com/sql/docs/

https://cloud.google.com/php/getting-started/using-cloud-sql-with-mysql

【讨论】:

    猜你喜欢
    • 2022-01-24
    • 2019-12-25
    • 2014-10-10
    • 2020-12-28
    • 2020-12-19
    • 1970-01-01
    • 2013-10-06
    • 2020-07-10
    • 2019-04-30
    相关资源
    最近更新 更多