DEV Community

Cover image for Online-CV With Google-Cloud Run
πŸš€ Vu Dao πŸš€
πŸš€ Vu Dao πŸš€

Posted on

Online-CV With Google-Cloud Run

Inherit from the post pelican-resume with AWS EC2 this post shows how to create online-cv with gcloud-run


1. Generate resume front-end output

docker run -v $PWD:/site vorakl/alpine-pelican pelican /site/content -o /site/output -s /site/
$ docker run -v $PWD:/site vorakl/alpine-pelican pelican /site/content -o /site/output -s /site/
WARNING: Feeds generated without SITEURL set properly may not be valid
WARNING: No valid files found in content for the active readers:
  | BaseReader (static)
  | HTMLReader (htm, html)
  | MarkdownReader (md, markdown, mkd, mdown)
  | RstReader (rst)
Done: Processed 0 articles, 0 drafts, 0 pages, 0 hidden pages and 0 draft pages in 0.09 seconds.
Enter fullscreen mode Exit fullscreen mode

2. Create nginx Dockerfile to create backend CV

# nginx state for serving content
FROM nginx:alpine
# Set working directory to nginx asset directory
WORKDIR /usr/share/nginx/html
# Remove default nginx static assets
RUN rm -rf ./*
COPY output .
# Containers run nginx with global directives and daemon off
ENTRYPOINT ["nginx", "-g", "daemon off;"]
Enter fullscreen mode Exit fullscreen mode

3. Create cloud build yaml file

General Steps Of the build set

  • Build image
  • Push image to gcloud registry
  • gcloud deploy
- name: ''
  args: [ 'build', '-t', '$PROJECT_ID/myresume', '.' ]
- name: ''
  args: ['push', '$PROJECT_ID/myresume']
- name: ''
  - 'run'
  - 'deploy'
  - 'cloudrunservice'
  - '--image'
  - '$PROJECT_ID/myresume'
  - '--region'
  - 'asia-southeast1'
  - '--platform' 
  - 'managed'
  - '--allow-unauthenticated'  
- '$PROJECT_ID/myresume'
Enter fullscreen mode Exit fullscreen mode

4. Build and Deploy

Get familiar with gcloud-build and gcloud-run through

Remember to add permission to the cloud build

Alt Text

gcloud builds submit --config cloudbuild.yaml
Enter fullscreen mode Exit fullscreen mode


Alt Text

Alt Text


Step #2: Service [cloudrunservice] revision [cloudrunservice-00002-fin] has been deployed and is serving 100 percent of traffic.
Step #2: Service URL:
Enter fullscreen mode Exit fullscreen mode

Alt Text

Top comments (0)