Jekyll
Jekyll is a simple, blog-aware, static site generator for personal, project, or organization sites.
Deploy with Nixpacks
Nixpacks needs a few prerequisites in your source code to deploy your Jekyll application. More info here.
Deploy with Dockerfile
If you want simplicity, you can use a Dockerfile to deploy your Jekyll application.
Prerequisites
- Set
Ports Exposesfield to80. - Create a
Dockerfilein the root of your project with the following content:
FROM ruby:3.1.1 AS builderRUN apt-get update -qq && apt-get install -y build-essential nodejsWORKDIR /srv/jekyllCOPY Gemfile Gemfile.lock ./RUN bundle installCOPY . .RUN chown 1000:1000 -R /srv/jekyllRUN bundle exec jekyll build -d /srv/jekyll/_site
FROM nginx:alpineCOPY --from=builder /srv/jekyll/_site /usr/share/nginx/htmlEXPOSE 80CMD ["nginx", "-g", "daemon off;"]- Make sure you have a
GemfileandGemfile.lockin the root of your project. - Set the buildpack to
Dockerfile.