Use podman for t3 docs rendering but docker-compose everywhere else

podman-compose has some issues on ubuntu and with volumes.
I'll keep docker-compose.

But I prefer podman for t3docs rendering as it doesn't fuck up the file
permissions.
This commit is contained in:
Daniel Siepmann 2023-04-06 13:52:54 +02:00
parent 664d9338d6
commit a3ebd243a8
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
4 changed files with 10 additions and 18 deletions

View file

@ -40,6 +40,8 @@ with pkgs; [
kcachegrind
geckodriver
docker-compose
# In order to pull binaries from their.
# E.g. phps: https://github.com/fossar/nix-phps#how-to-use
cachix
@ -76,9 +78,6 @@ with pkgs; [
gtkpod
podman
podman-compose
] else [
# hikari 2

View file

@ -8,9 +8,7 @@
(callPackage ./update-system { })
(callPackage ./nextcloud-sync/from-local.nix { })
(callPackage ./nextcloud-sync/from-remote.nix { })
(callPackage ./typo3-documentation-rendering {
inherit ownLib;
})
(callPackage ./typo3-documentation-rendering { })
(callPackage ./build-phpactor { })
(callPackage ./project {
inherit ownLib;

View file

@ -1,28 +1,23 @@
{
writeShellApplication,
ownLib,
podman
}:
let
usePodman = ownLib.onHikari {};
runner = if usePodman then "podman" else "docker";
image = (if usePodman then "docker.io/" else "") + "t3docs/render-documentation:latest";
runtimeInputs = if usePodman then [ podman ] else [ ];
in writeShellApplication {
writeShellApplication {
name = "custom-typo3-render-documentation";
inherit runtimeInputs;
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 = ''
mkdir -p Documentation-GENERATED-temp
${runner} \
podman \
run --rm \
-v "$(pwd)":/PROJECT:ro \
-v "$(pwd)/Documentation-GENERATED-temp":/RESULT \
${image} \
docker.io/t3docs/render-documentation:latest \
makehtml
'';
}

View file

@ -32,4 +32,4 @@ See: https://github.com/NixOS/nixos-hardware
TODOs
-----
* Add docker-compose / podman-compose for Elasticsearch, proxy, solr.
* Add docker-compose for Elasticsearch, proxy, solr.