Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

infra: add set up for blog #11981

Merged
merged 3 commits into from
May 21, 2024
Merged

infra: add set up for blog #11981

merged 3 commits into from
May 21, 2024

Conversation

DavidKorczynski
Copy link
Collaborator

Adds a blog set up that will make it easy to publish new posts.

You can test this locally by running the build_blog.sh script from the directory of the script. You'll need to have hugo for this, which you can do in the same way as the Dockerfile:

RUN mkdir -p hugo-bin && \
    cd hugo-bin && \
    wget https://github.com/gohugoio/hugo/releases/download/v0.126.1/hugo_extended_0.126.1_linux-amd64.tar.gz && \
    tar -xzf hugo_extended_0.126.1_linux-amd64.tar.gz

ENV PATH="${PATH}:/hugo-bin/"

@DavidKorczynski
Copy link
Collaborator Author

I'm not sure if we want to use gunicorn? python3 -m http.server seemed like an easy solution in this case, am not sure if there are any drawbacks.

@DavidKorczynski
Copy link
Collaborator Author

Screenshot 2024-05-21 000454

@DavidKorczynski
Copy link
Collaborator Author

Screenshot 2024-05-21 000534

Signed-off-by: David Korczynski <david@adalogics.com>
Signed-off-by: David Korczynski <david@adalogics.com>
@oliverchang
Copy link
Collaborator

I'm not sure if we want to use gunicorn? python3 -m http.server seemed like an easy solution in this case, am not sure if there are any drawbacks.

Seems like overkill for just local rendering. We can just use http.server for now.

Copy link
Collaborator

@oliverchang oliverchang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

COPY build_blog.sh /build_blog.sh
RUN /build_blog.sh

CMD exec python3 -m http.server 8011 -d /oss-fuzz-blog/page/public
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For our infra, we probably want to build a simple Cloud Build integration that just dumps the static site to a GCS bucket instead. We can do this later.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep sounds good, would you be able to do this? /oss-fuzz-blog/page/public holds the static website content.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, we can handle this!

infra/build/blog/build_blog.sh Outdated Show resolved Hide resolved
Signed-off-by: David Korczynski <david@adalogics.com>
@oliverchang
Copy link
Collaborator

/gcbrun skip

@oliverchang oliverchang merged commit 97a0c5a into master May 21, 2024
19 checks passed
@oliverchang oliverchang deleted the blog-init branch May 21, 2024 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants