mirror of
https://github.com/hercules-ci/arion.git
synced 2024-11-22 15:24:26 +03:00
Duplicate the examples once more, because antora is broken
This commit is contained in:
parent
d0b8e02c28
commit
cabcbcacca
@ -116,7 +116,26 @@ Describe containers using NixOS-style modules. There are a few options:
|
||||
`examples/minimal/arion-compose.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
|
||||
@ -125,7 +144,23 @@ include::arion:ROOT:example$minimal/arion-compose.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
|
||||
|
@ -1,7 +1,7 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
config.project.name = "webapp";
|
||||
config.services = {
|
||||
project.name = "webapp";
|
||||
services = {
|
||||
|
||||
webserver = {
|
||||
image.enableRecommendedContents = true;
|
||||
|
Loading…
Reference in New Issue
Block a user