Duplicate the examples once more, because antora is broken

This commit is contained in:
Robert Hensing 2022-12-16 02:44:50 +01:00
parent d0b8e02c28
commit cabcbcacca
2 changed files with 39 additions and 4 deletions

View file

@ -116,7 +116,26 @@ Describe containers using NixOS-style modules. There are a few options:
`examples/minimal/arion-compose.nix` `examples/minimal/arion-compose.nix`
[,nix] [,nix]
---- ----
include::arion:ROOT:example$minimal/arion-compose.nix[] { pkgs, ... }:
{
project.name = "webapp";
services = {
webserver = {
image.enableRecommendedContents = true;
service.useHostStore = true;
service.command = [ "sh" "-c" ''
cd "$$WEB_ROOT"
${pkgs.python3}/bin/python -m http.server
'' ];
service.ports = [
"8000:8000" # host:container
];
service.environment.WEB_ROOT = "${pkgs.nix.doc}/share/doc/nix/manual";
service.stop_signal = "SIGINT";
};
};
}
---- ----
==== NixOS: run full OS ==== NixOS: run full OS
@ -125,7 +144,23 @@ include::arion:ROOT:example$minimal/arion-compose.nix[]
[,nix] [,nix]
---- ----
include::arion:ROOT:example$full-nixos/arion-compose.nix[] {
project.name = "full-nixos";
services.webserver = { pkgs, lib, ... }: {
nixos.useSystemd = true;
nixos.configuration.boot.tmpOnTmpfs = true;
nixos.configuration.services.nginx.enable = true;
nixos.configuration.services.nginx.virtualHosts.localhost.root = "${pkgs.nix.doc}/share/doc/nix/manual";
nixos.configuration.services.nscd.enable = false;
nixos.configuration.system.nssModules = lib.mkForce [];
nixos.configuration.systemd.services.nginx.serviceConfig.AmbientCapabilities =
lib.mkForce [ "CAP_NET_BIND_SERVICE" ];
service.useHostStore = true;
service.ports = [
"8000:80" # host:container
];
};
}
---- ----
==== Docker image from DockerHub ==== Docker image from DockerHub

View file

@ -1,7 +1,7 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
config.project.name = "webapp"; project.name = "webapp";
config.services = { services = {
webserver = { webserver = {
image.enableRecommendedContents = true; image.enableRecommendedContents = true;