mirror of
https://codeberg.org/demostf/frontend.git
synced 2026-06-03 10:14:13 +02:00
docker
This commit is contained in:
parent
652fd43f36
commit
3ffcb664d2
2 changed files with 29 additions and 3 deletions
20
flake.nix
20
flake.nix
|
|
@ -27,7 +27,7 @@
|
|||
pkgs = (import nixpkgs) {
|
||||
inherit system overlays;
|
||||
};
|
||||
inherit (pkgs) lib callPackage;
|
||||
inherit (pkgs) lib callPackage dockerTools;
|
||||
|
||||
src = lib.sources.sourceByRegex ./. ["Cargo.*" "(src|build|images|script|style)(/.*)?" "sqlx-data.json"];
|
||||
nodeSrc = lib.sources.sourceByRegex ./. ["package.*"];
|
||||
|
|
@ -51,6 +51,24 @@
|
|||
'';
|
||||
nativeBuildInputs = with pkgs; [pkg-config openssl];
|
||||
};
|
||||
docker = dockerTools.buildLayeredImage {
|
||||
name = "demostf/frontend";
|
||||
tag = "latest";
|
||||
maxLayers = 5;
|
||||
contents = [
|
||||
frontend
|
||||
];
|
||||
config = {
|
||||
Cmd = ["frontend"];
|
||||
ExposedPorts = {
|
||||
"80/tcp" = {};
|
||||
};
|
||||
Env = [
|
||||
"LISTEN_ADDRESS=0.0.0.0"
|
||||
"LISTEN_PORT=80"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
devShells.default = pkgs.mkShell {
|
||||
OPENSSL_NO_VENDOR = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue