This module deploys privatebin as a serverless application on Google Cloud Platform.
The backend is deployed as using Google Cloud Run and the pastes are stored on Google Cloud Storage. Google Cloud Storage support is already on the master branch of PrivateBin, but it is not yet released. Currently the image eu.gcr.io/binx-io-public/privatebin/gcs:f9ccd67
is used.
This module will create the following resources:
- storage bucket named
privatebin-<google project name>
- service account named
privatebin
- a cloud run service named
privatebin
- a secret named
privatebin-configuration
To deploy privatebin in your Google project, add the following module to your terraform template:
module "privatebin" {
source = "git::https:/github.com/binxio/terraform-google-privatebin.git?ref=0.2.0"
providers = {
google = google
google-beta = google-beta
}
}
The application will be deployed in the project and region specified by the passed in providers. After terraform apply, the output will print the URL of your privatebin installation. Alternatively you can .
to build your own image of the privatebin application, type:
git clone [email protected]:PrivateBin/docker-nginx-fpm-alpine.git
cd docker-nginx-fpm-alpine
docker build --build-arg RELEASE=master --tag $YOUR_IMAGE --output type=registry,push=true .
Now you set the variable image
to $YOUR_IMAGE.
You can configure your own privatebin configuration file. Make sure that you set the storage class to GoogleCloudStorage
[model]
class = GoogleCloudStorage
and the bucket name to ${private_bucket_name}
:
[model_options]
bucket = "${privatebin_bucket_name}"