https://github.com/sdavids/sdavids.de-homepage
Sebastian Davids Homepage
https://github.com/sdavids/sdavids.de-homepage
Last synced: 3 months ago
JSON representation
Sebastian Davids Homepage
- Host: GitHub
- URL: https://github.com/sdavids/sdavids.de-homepage
- Owner: sdavids
- Created: 2022-01-20T13:49:14.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2026-03-07T19:30:03.000Z (5 months ago)
- Last Synced: 2026-03-08T00:54:49.743Z (5 months ago)
- Language: Shell
- Homepage: https://sdavids.de
- Size: 3.68 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- License: LICENSES/Apache-2.0.txt
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
// SPDX-FileCopyrightText: © 2022 Sebastian Davids
// SPDX-License-Identifier: Apache-2.0
= sdavids.de Homepage
Sebastian Davids
// Metadata:
:description: Sebastian Davids' Homepage
// Settings:
:sectnums:
:sectanchors:
:sectlinks:
:toc: macro
:toclevels: 3
:toc-placement!:
:hide-uri-scheme:
:source-highlighter: rouge
:rouge-style: github
// Refs:
:docker-install-url: https://docs.docker.com/install/
:hadolint-install-url: https://github.com/hadolint/hadolint?tab=readme-ov-file#install
:pnpm-install-url: https://pnpm.io/installation
:easyrsa-install-url: https://easy-rsa.readthedocs.io/en/latest/#obtaining-and-using-easy-rsa
:gh-actions-url: https://github.com/sdavids/sdavids.de-homepage/actions
ifdef::env-browser[:outfilesuffix: .adoc]
ifdef::env-github[]
:outfilesuffix: .adoc
:important-caption: :heavy_exclamation_mark:
:note-caption: :information_source:
endif::[]
toc::[]
== Development
[,console]
----
$ cd hp
$ pnpm install
----
[#dev-server]
=== Development Server
==== Shell 1--Tailwind CSS CLI build process
[,console]
----
$ cd hp
$ pnpm run dev:css
----
==== Shell 2 - Browsersync process
[,console]
----
$ cd hp
$ pnpm run dev
----
=> http://localhost:3000[http://localhost:3000]
=== Local Build
[,console]
----
$ cd hp
$ pnpm run build
----
=> `hp/dist`
=== Format Source Code
[,console]
----
$ cd hp
$ pnpm run format
----
=== Lint Source Code
[,console]
----
$ cd hp
$ pnpm run lint
----
=== Run Unit Tests
[,console]
----
$ cd hp
$ pnpm run test
----
=== Run End-to-End Unit Tests
[NOTE]
====
Ensure Playwright has been <>.
====
==== Running in Headless Mode
Start a <>; in a new shell:
[,console]
----
$ cd hp
$ pnpm run playwright
----
==== Running in Headless Mode With Tracing
Start a <>; in a new shell:
[,console]
----
$ cd hp
$ pnpm run playwright:trace
----
==== Running in UI Mode
Start a <>; in a new shell:
[,console]
----
$ cd hp
$ pnpm run playwright:ui
----
== Deployment
=== Local Deployment
==== Create CA and Certificate
[,console]
----
$ cd hp
$ pnpm run cert:ca:create
$ pnpm run cert:create
----
[IMPORTANT]
====
Ensure that you have modified your <> settings to include `httpd.internal`.
====
==== Create Base Docker Image
[,console]
----
$ cd httpd
$ scripts/docker_build.sh
----
==== Build And Start Apache HTTPD
[,console]
----
$ cd hp
$ pnpm run docker:httpd:start:with-build
----
=> https://httpd.internal:8443[https://httpd.internal:8443]
==== Start Apache HTTPD Without a Build
[,console]
----
$ cd hp
$ pnpm run docker:httpd:start
----
=> https://httpd.internal:8443[https://httpd.internal:8443]
==== Stop Apache HTTPD
[,console]
----
$ cd hp
$ pnpm run docker:httpd:stop
----
=== Deployment to sdavids.de
Deployed website:: https://sdavids.de.
GitHub Action Workflow:: link:.github/workflows/ci.yaml[]
GitHub Action Runs:: {gh-actions-url}
== Development Environment Setup
[IMPORTANT]
====
After initializing this repository, you need to configure the https://git-scm.com/docs/git-config#Documentation/git-config.txt-blameignoreRevsFile[ignore-revs-file]:
[,console]
----
$ git config set blame.ignoreRevsFile .git-blame-ignore-revs
----
====
=== Installation
[#dns]
==== DNS
Add `httpd.internal` to your `/etc/hosts`:
./etc/hosts
[,text]
----
127.0.0.1 localhost httpd.internal
::1 localhost httpd.internal
----
[NOTE]
====
If you want to change this entry, you need to also change:
.httpd/httpd.conf
[,text]
----
ServerName httpd.internal:80
----
.httpd/httpd-ssl.conf
[,text]
----
ServerName httpd.internal:443
----
.hp/scripts/docker_httpd_start.sh
[,shell]
----
readonly host_name='httpd.internal'
----
.hp/package.json
[,json]
----
…
"scripts": {
…
"cert:copy": "scripts/copy_ca_based_cert.sh certs httpd.internal",
"cert:create": "scripts/create_ca_based_cert.sh certs 30 httpd.internal",
"cert:delete": "scripts/delete_ca_based_cert.sh certs httpd.internal",
"cert:renew": "scripts/renew_ca_based_cert.sh certs 30 httpd.internal",
"cert:verify": "scripts/verify_ca_based_cert.sh certs 30 httpd.internal",
…
},
…
----
====
==== Docker
Install {docker-install-url}[Docker].
==== pnpm
Install {pnpm-install-url}[pnpm].
==== Certificates
===== New Certificate
[,console]
----
$ cd hp
$ pnpm run cert:ca:create
$ pnpm run cert:create
----
===== Existing Certificate
[,console]
----
$ cd hp
$ pnpm run cert:copy
----
==== jq
===== Linux
[,console]
----
$ sudo apt-get install jq
----
===== Mac
[,console]
----
$ brew install jq
----
==== brotli
===== Linux
[,console]
----
$ sudo apt-get install brotli
----
===== Mac
[,console]
----
$ brew install brotli
----
==== zstd
===== Linux
[,console]
----
$ sudo apt-get install zstd
----
===== Mac
[,console]
----
$ brew install zstd
----
==== shellcheck
===== Linux
[,console]
----
$ sudo apt-get install shellcheck
----
===== Mac
[,console]
----
$ brew install shellcheck
----
==== shfmt
===== Linux
[,console]
----
$ sudo apt-get install shfmt
----
===== Mac
[,console]
----
$ brew install shfmt
----
==== yamllint
===== Linux
[,console]
----
$ sudo apt-get install yamllint
----
===== Mac
[,console]
----
$ brew install yamllint
----
==== hadolint
===== Linux
Install {hadolint-install-url}[hadolint].
===== Mac
[,console]
----
$ brew install hadolint
----
==== gpg
===== Linux
[,console]
----
$ sudo apt-get install gpg
----
===== Mac
Install https://gpgtools.org[GPG Suite].
==== easyrsa
[IMPORTANT]
====
Ensure that you install version `3.1.7` and not `3.2.x`!
====
===== Linux
Install {easyrsa-install-url}[easyrsa].
===== Mac
[WARNING]
====
Unfortunately, homebrew provides `easy-rsa` version `3.2.x` .
====
[,console]
----
$ curl -L https://github.com/OpenVPN/easy-rsa/releases/download/v3.1.7/EasyRSA-3.1.7.tgz -o ~/Downloads/easy-rsa.tgz
$ tar -xzf ~/Downloads/easy-rsa.tgz -C ~/.local/share
$ mv ~/.local/share/EasyRSA-3.1.7 ~/.local/share/easyrsa
$ ln -s ~/.local/share/easyrsa/easyrsa ~/.local/bin/easyrsa
$ rm ~/Downloads/easy-rsa.tgz
----
[#playwright]
==== Playwright
[,console]
----
$ cp hp
$ pnpm exec playwright install --with-deps --no-shell
----
[NOTE]
====
You can delete all downloaded binaries via:
[,console]
----
$ pnpm exec playwright uninstall --all
----
====