Some checks failed
Build and Push static-server Image / build (push) Failing after 46s
- deploy-static-site/images/flake.nix: moved from images/flake.nix - .forgejo/workflows/build-static-server.yaml: moved from images/.forgejo/ (Forgejo only picks up workflows from repo root .forgejo/workflows/) - updated path reference in build workflow Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
30 lines
857 B
Nix
30 lines
857 B
Nix
{
|
|
description = "Shared infrastructure OCI images";
|
|
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
outputs = { self, nixpkgs }:
|
|
let
|
|
system = "x86_64-linux";
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
in
|
|
{
|
|
# Single image used by every static-site Nomad job.
|
|
# At container startup it downloads the site tarball from S3, then serves it.
|
|
# The Nomad job spec overrides Cmd with the domain- and hash-specific fetch+serve command.
|
|
packages.${system}.staticServer = pkgs.dockerTools.buildLayeredImage {
|
|
name = "static-server";
|
|
tag = "latest";
|
|
contents = with pkgs; [
|
|
static-web-server
|
|
awscli2
|
|
bash
|
|
coreutils
|
|
gnutar
|
|
gzip
|
|
cacert
|
|
];
|
|
config.ExposedPorts."8080/tcp" = { };
|
|
};
|
|
};
|
|
}
|