mirror of
https://github.com/thiloho/archtika.git
synced 2025-11-22 19:01:35 +01:00
46 lines
831 B
Nix
46 lines
831 B
Nix
|
|
{
|
||
|
|
pkgs,
|
||
|
|
...
|
||
|
|
}:
|
||
|
|
|
||
|
|
# Behaviour of the Nix module needs to be replicated, which includes PostgreSQL, NGINX, ACME (DNS01), env variables, etc.
|
||
|
|
# Basic initialisation template can be found below
|
||
|
|
let
|
||
|
|
archtika = pkgs.callPackage ./package.nix { };
|
||
|
|
|
||
|
|
postgresConf = pkgs.writeText "postgres.conf" ''
|
||
|
|
|
||
|
|
'';
|
||
|
|
|
||
|
|
nginxConf = pkgs.writeText "nginx.conf" ''
|
||
|
|
|
||
|
|
'';
|
||
|
|
|
||
|
|
entrypoint = pkgs.writeShellScriptBin "entrypoint" ''
|
||
|
|
|
||
|
|
'';
|
||
|
|
in
|
||
|
|
pkgs.dockerTools.buildLayeredImage {
|
||
|
|
name = "archtika";
|
||
|
|
tag = "latest";
|
||
|
|
contents = [
|
||
|
|
archtika
|
||
|
|
entrypoint
|
||
|
|
pkgs.postgresql_16
|
||
|
|
pkgs.nginx
|
||
|
|
pkgs.acme-sh
|
||
|
|
pkgs.bash
|
||
|
|
pkgs.coreutils
|
||
|
|
];
|
||
|
|
config = {
|
||
|
|
Cmd = [ "${entrypoint}/bin/entrypoint" ];
|
||
|
|
ExposedPorts = {
|
||
|
|
"80" = { };
|
||
|
|
"443" = { };
|
||
|
|
};
|
||
|
|
Volumes = {
|
||
|
|
"/var/lib/postgresql/data" = { };
|
||
|
|
};
|
||
|
|
};
|
||
|
|
}
|