A utility for uploading folders to Google Cloud Storage. Run it simply with ./gcsup
and configure it with the following environment variables:
GCSUP_JWT_FILE_LOCATION
- the location of the JSON Web Token file for access to The Google Cloud Storage APIGCSUP_PROJECT_NAME
- the name of the Google Cloud project. The JSON Web Token should be for this projectGCSUP_BUCKET_NAME
- the name of the bucket inside the given projectGCSUP_LOCAL_FOLDER
- the name of the local folder to upload
When you run ./gcsup
, the folder at GCSUP_LOCAL_FOLDER
will be entirely uploaded to the given bucket in the given project. The bucket will have the exact same hierarchy as the local folder, and MIME types for each file will be inferred by the Go standard library's TypeByExtension
function, which guesses based on each file's extension.
gcsup
builds are automatically packages as the quay.io/arschles/gcsup Docker image, which simply places a gcsup
binary in /bin
.
Generate your site using the following command:
docker run --rm -v $PWD:/pwd -w /pwd quay.io/arschles/gcsup:0.0.1 hugo -v