https://github.com/patheard/wordpress-frontend-proxy
Typescript app that acts as a frontend for a WordPress site
https://github.com/patheard/wordpress-frontend-proxy
bun terraform wordpress
Last synced: 3 months ago
JSON representation
Typescript app that acts as a frontend for a WordPress site
- Host: GitHub
- URL: https://github.com/patheard/wordpress-frontend-proxy
- Owner: patheard
- License: mit
- Created: 2025-02-19T20:13:58.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-04T19:40:50.000Z (over 1 year ago)
- Last Synced: 2025-08-11T16:10:57.279Z (10 months ago)
- Topics: bun, terraform, wordpress
- Language: TypeScript
- Homepage:
- Size: 104 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WordPress frontend proxy :arrows_counterclockwise:
A small app that uses the WordPress API to load content and serve a site. The pages are rendered using Handlebars.
Also includes the Terraform to run this as a Lambda function behind a CloudFront distribution.
## Running locally
```sh
# Install bun or use the devcontainer
# https://bun.sh/docs/installation
cd app
cp .env.example .env # and set your values
bun install
bun start
```
## Terraform
You will need to build a Docker image to run, which is currently exected to be an `arm64` image.
```sh
docker build \
--tag wordpress-frontend \
--file ./app/Dockerfile \
--platform linux/arm64 ./app
```
You can do it as `amd64` as well if you update the `terraform/lambda.tf` resource's [architectures](https://github.com/patheard/wordpress-frontend/blob/dfa9dfc6d26b62396fdb5f00b8c2e1dd4d615c59/terraform/lambda.tf#L7).
```sh
cd terraform
terraform init
terraform apply
```
:warning: The above will fail on first run since the Docker image will not be in the new Elastic Container Registry (ECR). Push your Docker image up and re-run the apply to fix.