dockerize
This commit is contained in:
parent
6401393a10
commit
2a2259f049
3 changed files with 27 additions and 5 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" ]
|
||||
|
15
flake.nix
15
flake.nix
|
@ -18,16 +18,21 @@
|
|||
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
|
||||
with pkgs; {
|
||||
formatter = nixpkgs-fmt;
|
||||
devShells.default = mkShell {
|
||||
packages = [
|
||||
{
|
||||
formatter = pkgs.nixpkgs-fmt;
|
||||
devShells.default = pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
mdbook
|
||||
tailwindcss-language-server
|
||||
];
|
||||
};
|
||||
packages.default = callPackage ./default.nix { };
|
||||
packages = {
|
||||
inherit app;
|
||||
default = package;
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue