Skip to content
This repository has been archived by the owner on Jun 21, 2022. It is now read-only.

Improve website security and performance #582

Open
scottnuma opened this issue Oct 14, 2020 · 0 comments
Open

Improve website security and performance #582

scottnuma opened this issue Oct 14, 2020 · 0 comments

Comments

@scottnuma
Copy link
Contributor

scottnuma commented Oct 14, 2020

Problem

  • Currently jekyll serve serves the website to the internet. However jekyll serve is intended for local development rather than serving production. This leads to some disadvantages.
    • jekyll has had critical security issues in the past and its multiple uses lead to larger than necessary surface area to secure. jekyll dependencies regularly raise security warnings in GitHub
    • jekyll is not designed for the purpose of serving static files in production --> jekyll serve isn't as efficient as could be

Proposed solution

  • utilize jekyll only for building the website and introduce nginx for only serving the website
  • isolate the two pieces when serving the website using a multistage docker build
  • Familiarize PiE staff with Docker

Possible dev path

  • Starting from scratch with an empty Dockerfile, build up to the final thing in 3 parts
  • validate its working between each part

Part 0

Part 1

Part 2

  • Setup a multi-stage docker build - relevant article
  • Insert / build an arbitrary text file in stage 1 of the docker build
  • Copy the text file from stage 1 of the docker build to stage 2, and serve the file via Nginx

Part 3

  • In your multi-stage docker build's stage 1, build the website based off of pioneers/website's current Dockerfile
  • Copy just the built website to the stage 2
  • Serve the built website with Nginx
  • relevant example
@scottnuma scottnuma assigned scottnuma and unassigned scottnuma Apr 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant