Skip to content

Setup Local Development Environment Using Nginx #423

Description

@seansica

As a developer, I want to closely emulate our production GitHub Pages environment for our Pelican-based static web application in a local development setting. This would help us to catch and fix issues before pushing to GitHub Pages, therefore increasing our development efficiency and reducing potential errors in our production environment.

Currently, we're using Pelican's built-in server for local development, which is based on the Python simple HTTP server implementation. However, GitHub Pages uses a more complex system, fronting all web traffic with load balancers, and using an Nginx-based "frontend routing tier" to route requests to the appropriate file server. This disparity between local and production environments could potentially lead to overlooked issues during development.

To address this, we want to introduce Nginx into our local development environment. Our goal is to create a configuration within a Visual Studio Code devcontainer that runs an Ubuntu system with access to Nginx. This will allow us to serve our static site locally using Nginx, mimicking the behavior of GitHub Pages more closely than the current Python-based server.

The devcontainer should include scripts to help developers quickly build the web application and start the Nginx server. We also need to provide documentation to guide developers through the process of setting up and using this new development environment.

With these changes, we can provide a local development environment that behaves more similarly to our production environment, improving our ability to catch potential issues before they reach production.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions