Skip to content

DC00/meme-compiler-cloud-functions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Meme Compiler Cloud Functions

Contains cloud functions for downloading, normalizing, and concatenating video files.

Use Cloud Functions if everything you need is provided in a language's standard library. Use Cloud Run if you need external dependencies installed outside of what is provided by Cloud Functions.

Cloud Run contract - use port 8080. Dockerfiles should be multi-staged. I did not sys admin enough to create non-root users at the end of a Dockerfile stage, but should do that in the future.

Admin Setup

Steps needed to configure publishing to Google Artifact Registry. Guided link here.

  • Create new registry
  • gcloud auth login
  • Configure gcloud: gcloud auth configure-docker us-east4-docker.pkg.dev

Development

Basic structure will follow the Google tutorial. More examples here.

Sample function structure:

my-package/
    Dockerfile
    go.mod
    main.go

Build the container

docker build -t mcf-download .

Tag the container

docker tag \
    <local-container-name> \
    <region>-docker.pkg.dev/<project-name>/<artifact-registry-name>/<image-name>:tag

Example:

docker tag \
    mcf-download \
    us-east4-docker.pkg.dev/meme-compiler/mc-artifacts/mcf-download:1.0.0

Push the image

docker push \
    us-east4-docker.pkg.dev/meme-compiler/mc-artifacts/mcf-download:1.0.0

Pull the image

docker pull \
    us-east4-docker.pkg.dev/meme-compiler/mc-artifacts/mcf-download:1.0.0

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published