docker & conf

This commit is contained in:
Christoph J. Scherr 2024-04-10 10:49:16 +02:00
parent 7a7818b579
commit 4a6a22363e
4 changed files with 72 additions and 22 deletions

13
Dockerfile Normal file
View File

@ -0,0 +1,13 @@
# syntax=docker/dockerfile:1
FROM ruby:3.2
WORKDIR /app
COPY Gemfile /app/Gemfile
COPY Gemfile.lock /app/Gemfile.lock
# Add a script to be executed every time the container starts.
COPY entrypoint.sh /usr/bin/
RUN chmod +x /usr/bin/entrypoint.sh
ENTRYPOINT ["entrypoint.sh"]
EXPOSE 4000
# Configure the main process to run when running the image

View File

@ -9,12 +9,12 @@ theme: jekyll-theme-chirpy
lang: en
# Change to your timezone https://kevinnovak.github.io/Time-Zone-Picker
timezone: Asia/Shanghai
timezone: Europe/Berlin
# jekyll-seo-tag settings https://github.com/jekyll/jekyll-seo-tag/blob/master/docs/usage.md
# ↓ --------------------------
title: Chirpy # the main title
title: cscherr.de - Blog # the main title
tagline: A text-focused Jekyll theme # it will display as the sub-title
@ -23,37 +23,52 @@ description: >- # used by seo meta and the atom feed
# Fill in the protocol & hostname for your site.
# e.g. 'https://username.github.io', note that it does not end with a '/'.
url: ""
url: "https://www.cscherr.de"
github:
username: github_username # change to your github username
username: PlexSheep # change to your github username
twitter:
username: twitter_username # change to your twitter username
# twitter:
# username: twitter_username # change to your twitter username
social:
# Change to your full name.
# It will be displayed as the default author of the posts and the copyright owner in the Footer
name: your_full_name
email: example@domain.com # change to your email address
name: Christoph J. Scherr
email: contacct@cscherr.de # change to your email address
links:
# The first element serves as the copyright owner's link
- https://twitter.com/username # change to your twitter homepage
- https://github.com/username # change to your github homepage
# Uncomment below to add more social links
# - https://www.facebook.com/username
# - https://www.linkedin.com/in/username
- infosec.exchange/@plexsheep
- https://github.com/PlexSheep
google_site_verification: # fill in to your verification string
# Site Verification Settings
# webmaster_verifications:
# google: # fill in your Google verification code
# bing: # fill in your Bing verification code
# alexa: # fill in your Alexa verification code
# yandex: # fill in your Yandex verification code
# baidu: # fill in your Baidu verification code
# facebook: # fill in your Facebook verification code
# ↑ --------------------------
# The end of `jekyll-seo-tag` settings
google_analytics:
id: # fill in your Google Analytics ID
# Web Analytics Settings
# analytics:
# google:
# id: # fill in your Google Analytics ID
# goatcounter:
# id: # fill in your GoatCounter ID
# umami:
# id: # fill in your Umami ID
# domain: # fill in your Umami domain
# matomo:
# id: # fill in your Matomo ID
# domain: # fill in your Matomo domain
goatcounter:
id: # fill in your Goatcounter ID
# Pageviews settings
pageviews:
provider: # now only supports 'goatcounter'
# Prefer color scheme setting.
#
@ -73,10 +88,10 @@ theme_mode: # [light | dark]
# will be added to all image (site avatar & posts' images) paths starting with '/'
#
# e.g. 'https://cdn.com'
img_cdn: "https://chirpy-img.netlify.app"
img_cdn:
# the avatar on sidebar, support local or CORS resources
avatar: "/commons/avatar.jpg"
avatar:
# The URL of the site-wide social preview image used in SEO `og:image` meta tag.
# It can be overridden by a customized `page.image` in front matter.
@ -86,8 +101,9 @@ social_preview_image: # string, local or CORS resources
toc: true
comments:
active: # The global switch for posts comments, e.g., 'disqus'. Keep it empty means disable
# The active options are as follows:
# Global switch for the post comment system. Keeping it empty means disabled.
provider: # [disqus | utterances | giscus]
# The provider options are as follows:
disqus:
shortname: # fill with the Disqus shortname. https://help.disqus.com/en/articles/1717111-what-s-a-shortname
# utterances settings https://utteranc.es/
@ -101,6 +117,7 @@ comments:
category:
category_id:
mapping: # optional, default to 'pathname'
strict: # optional, default to '0'
input_position: # optional, default to 'bottom'
lang: # optional, default to the value of `site.lang`
reactions_enabled: # optional, default to the value of `1`

8
docker-compose.yml Normal file
View File

@ -0,0 +1,8 @@
services:
jekyll:
build: .
volumes:
- .:/app
ports:
- "4000:4000"
container_name: jekyll

12
entrypoint.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
set -e
# Remove a potentially pre-existing server.pid for Rails.
rm -f /app/tmp/pids/server.pid
gem update --system
bundle install
git config --global --add safe.directory /app
bundle exec jekyll serve --livereload --host 0.0.0.0 -o http://localhost:4000 --port 4000
# Then exec the container's main process (what's set as CMD in the Dockerfile).
exec "$@"