mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 16:10:05 +01:00
switch formatting to nixpkgs-fmt
This commit is contained in:
parent
3598716c73
commit
2712e89716
65 changed files with 4839 additions and 5222 deletions
|
|
@ -1,44 +1,40 @@
|
|||
{
|
||||
pkgs,
|
||||
dockerTools,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{ pkgs, dockerTools, lib, ... }:
|
||||
with lib; {
|
||||
curl = dockerTools.buildLayeredImage {
|
||||
name = "curl";
|
||||
tag = "latest";
|
||||
config.Cmd = ["${pkgs.bash}" "-c" "sleep infinity"];
|
||||
contents = [pkgs.bash pkgs.curl pkgs.cacert];
|
||||
config.Cmd = [ "${pkgs.bash}" "-c" "sleep infinity" ];
|
||||
contents = [ pkgs.bash pkgs.curl pkgs.cacert ];
|
||||
};
|
||||
|
||||
nginx = let
|
||||
nginxPort = "80";
|
||||
nginxConf = pkgs.writeText "nginx.conf" ''
|
||||
user nginx nginx;
|
||||
daemon off;
|
||||
error_log /dev/stdout info;
|
||||
pid /dev/null;
|
||||
events {}
|
||||
http {
|
||||
access_log /dev/stdout;
|
||||
server {
|
||||
listen ${nginxPort};
|
||||
index index.html;
|
||||
location / {
|
||||
root ${nginxWebRoot};
|
||||
nginx =
|
||||
let
|
||||
nginxPort = "80";
|
||||
nginxConf = pkgs.writeText "nginx.conf" ''
|
||||
user nginx nginx;
|
||||
daemon off;
|
||||
error_log /dev/stdout info;
|
||||
pid /dev/null;
|
||||
events {}
|
||||
http {
|
||||
access_log /dev/stdout;
|
||||
server {
|
||||
listen ${nginxPort};
|
||||
index index.html;
|
||||
location / {
|
||||
root ${nginxWebRoot};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
'';
|
||||
nginxWebRoot = pkgs.writeTextDir "index.html" ''
|
||||
<html><body><h1>Hello from NGINX</h1></body></html>
|
||||
'';
|
||||
in
|
||||
'';
|
||||
nginxWebRoot = pkgs.writeTextDir "index.html" ''
|
||||
<html><body><h1>Hello from NGINX</h1></body></html>
|
||||
'';
|
||||
in
|
||||
dockerTools.buildLayeredImage {
|
||||
name = "xtruder/nginx";
|
||||
tag = "latest";
|
||||
contents = [pkgs.nginx];
|
||||
contents = [ pkgs.nginx ];
|
||||
extraCommands = ''
|
||||
mkdir -p etc
|
||||
chmod u+w etc
|
||||
|
|
@ -50,9 +46,9 @@ with lib; {
|
|||
echo "nginx:x:1000:nginx" > etc/group
|
||||
'';
|
||||
config = {
|
||||
Cmd = ["nginx" "-c" nginxConf];
|
||||
Cmd = [ "nginx" "-c" nginxConf ];
|
||||
ExposedPorts = {
|
||||
"${nginxPort}/tcp" = {};
|
||||
"${nginxPort}/tcp" = { };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue