Skip to content

Commit

Permalink
Fix nix docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
jhh committed Feb 2, 2024
1 parent c288019 commit 4199118
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 25 deletions.
19 changes: 0 additions & 19 deletions web/Makefile

This file was deleted.

10 changes: 4 additions & 6 deletions web/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,10 @@
}
'';
in
pkgs.dockerTools.buildLayeredImage {
name = "j3ff/deadeye-admin";
pkgs.dockerTools.buildImage {
name = "j3ff/deadeye-web";
tag = "latest";
contents = with pkgs; [
bashInteractive
busybox
copyToRoot = with pkgs; [
nginx
];

Expand Down Expand Up @@ -92,7 +90,7 @@
#
devShells.default = pkgs.mkShell {
# inputsFrom = [ self.packages.${system}.deadeye-admin ];
packages = with pkgs; [ nodejs_18 node2nix ];
packages = with pkgs; [ just nodejs_18 node2nix ];
};
});
}
19 changes: 19 additions & 0 deletions web/justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# just manual: https://github.com/casey/just#readme

default:
@just --list

IMAGE := "j3ff/deadeye-web"
VERSION := `git rev-parse --short HEAD`

docker:
nix build .#dockerImage
docker load < result
docker tag {{ IMAGE }}:latest {{ IMAGE }}:{{VERSION}}

run: docker
docker run -it --rm --name deadeye-web -p 80:80 {{IMAGE}}:{{VERSION}}


deploy: docker
docker push {{ IMAGE }}:{{VERSION}}

0 comments on commit 4199118

Please sign in to comment.