Add EXT:tea docs rendering setup

* Use podman instead of docker.
* Provide wrapper script for rendering.
* Add rendering result as local domain.
This commit is contained in:
Daniel Siepmann 2023-02-05 16:27:09 +01:00
parent e05f6962ef
commit 3dfe633ac2
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
5 changed files with 56 additions and 0 deletions

View file

@ -20,6 +20,7 @@ with pkgs; [
(callPackage ./packages/custom/backup { })
(callPackage ./packages/custom/nextcloud-sync/from-local.nix { })
(callPackage ./packages/custom/nextcloud-sync/from-remote.nix { })
(callPackage ./packages/custom/typo3-documentation-rendering { })
(callPackage ./packages/custom/build-phpactor { })
i3blocks
st
@ -52,6 +53,8 @@ with pkgs; [
wget
kcachegrind
geckodriver
podman
podman-compose
# In order to pull binaries from their.
# E.g. phps: https://github.com/fossar/nix-phps#how-to-use

View file

@ -0,0 +1,22 @@
{
writeShellApplication,
podman
}:
writeShellApplication {
name = "custom-typo3-render-documentation";
runtimeInputs = [
podman
];
# See: https://t3docs.github.io/DRC-The-Docker-Rendering-Container/07-To-be-sorted/quickstart.html#build-html-with-plain-docker-commands
text = ''
podman \
run --rm \
-v "$(pwd)":/PROJECT:ro \
-v "$(pwd)/Documentation-GENERATED-temp":/RESULT \
docker.io/t3docs/render-documentation:latest \
makehtml
'';
}

View file

@ -125,6 +125,10 @@
];
};
virtualisation.podman = {
enable = true;
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;

View file

@ -4,6 +4,7 @@
imports = [
./mkcert.nix
./static-files.nix
./mailhog.localhost.nix
./daniel-siepmann.localhost.nix

View file

@ -0,0 +1,26 @@
{ pkgs, lib, config, ... }:
let
domain = "tea-docs.typo3.localhost";
documentRoot = "${config.custom.web-development.rootPath}/typo3/tea/Documentation-GENERATED-temp/Result/project/0.0.0/";
in {
services = {
httpd.virtualHosts.${domain} = {
forceSSL = true;
sslServerCert = "${config.custom.web-development.certFolder}${domain}.pem";
sslServerKey = "${config.custom.web-development.certFolder}${domain}-key.pem";
inherit documentRoot;
extraConfig = ''
<Directory ${documentRoot}>
AllowOverride All
Require all granted
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
DirectoryIndex index.html Index.html
</Directory>
'';
};
};
}