dockerize
This commit is contained in:
parent
31bfa9fbd1
commit
8137dc9bc8
3 changed files with 23 additions and 1 deletions
7
.dockerignore
Normal file
7
.dockerignore
Normal file
|
@ -0,0 +1,7 @@
|
|||
.direnv/
|
||||
.git/
|
||||
.github/
|
||||
.pub/
|
||||
result
|
||||
update-version.sh
|
||||
Dockerfile
|
10
Dockerfile
Normal file
10
Dockerfile
Normal file
|
@ -0,0 +1,10 @@
|
|||
FROM nixos/nix:latest
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
|
||||
RUN nix \
|
||||
--extra-experimental-features "nix-command flakes" \
|
||||
build .#app
|
||||
|
||||
CMD [ "/app/result/bin/app" ]
|
||||
|
|
@ -18,6 +18,8 @@
|
|||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
};
|
||||
package = pkgs.callPackage ./default.nix { };
|
||||
app = pkgs.writeShellScriptBin "app" "${pkgs.merecat}/bin/merecat -n -p 8080 ${package}/share/web";
|
||||
in
|
||||
{
|
||||
formatter = pkgs.nixpkgs-fmt;
|
||||
|
@ -26,7 +28,10 @@
|
|||
pkgs.zs
|
||||
];
|
||||
};
|
||||
packages.default = pkgs.callPackage ./default.nix { };
|
||||
packages = {
|
||||
inherit app;
|
||||
default = package;
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue