/homepage

Personal homepage that automatically pulls in content from other sources

Primary LanguageTypeScriptGNU General Public License v3.0GPL-3.0

Homepage

This is the personal homepage of Lorenz Leitner (me).

Currently deployed at lolei.dev.1
1 I may take this down at some points because there is little point in paying $X/month for things realistically nobody visits that often.

Below is a summary of the website, a more detailed description can be found in the first blog post.

Features

Uses the GitHub and GitLab API to pull in content from other repositories (live), i.e. no redeployment of the website is needed. This is used mainly for posts in the blog section, and for items/repo statistics in the portfolio.
This content is cached in memory and only re-retrieved once a certain period of time is reached and a new request is made to the respective site-section, as to not overtax the APIs.

Environment Variables

The following environment variables must be defined:

EMAIL_ADDRESS
GITHUB_PAT
REFRESH_RATE_HOURS

They are defined in .env.local for next.js/local development.
The values of these variables (except for the email address) are never exposed on the client side.

Development

Local

yarn install
yarn dev

# Or
yarn install
yarn build
yarn start

Container

Build

podman build . -t ghcr.io/lolei/homepage

Pull

podman pull ghcr.io/lolei/homepage:<tag>

View all available image versions here.

Run

# Run
export $(xargs <.env.local)
podman run \
  -e EMAIL_ADDRESS=$EMAIL_ADDRESS \
  -e GITHUB_PAT=$GITHUB_PAT \
  -e REFRESH_RATE_HOURS=$REFRESH_RATE_HOURS \
  -p 3000:3000 \
  ghcr.io/lolei/homepage

# Or
podman run \
  --env-file ./.env.local \
  -p 3000:3000 \
  ghcr.io/lolei/homepage

(Docker et al. can also be used.)

CI

Multiple checks are run automatically on each push to master and on pull requests from non-fork sources. When a version tag is pushed via bash2version, a workflow is triggered to build and publish the container image automatically to the Github Container Registry. After that, an additional workflow is triggered that uses this image to deploy it automatically to the Kubernetes cluster.