chore: flake wip
This commit is contained in:
parent
74df47531c
commit
bba420386f
2 changed files with 44 additions and 45 deletions
14
flake.nix
14
flake.nix
|
|
@ -8,8 +8,7 @@
|
||||||
|
|
||||||
outputs = { self, nixpkgs, flake-utils, ... }:
|
outputs = { self, nixpkgs, flake-utils, ... }:
|
||||||
flake-utils.lib.eachDefaultSystem (system:
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
let
|
let pkgs = import nixpkgs { inherit system; };
|
||||||
pkgs = import nixpkgs { inherit system; };
|
|
||||||
appSrc = ./.;
|
appSrc = ./.;
|
||||||
|
|
||||||
app = pkgs.dockerTools.buildLayeredImage {
|
app = pkgs.dockerTools.buildLayeredImage {
|
||||||
|
|
@ -49,14 +48,13 @@
|
||||||
|
|
||||||
extraCommands = ''
|
extraCommands = ''
|
||||||
export PATH=${pkgs.bun}/bin:$PATH
|
export PATH=${pkgs.bun}/bin:$PATH
|
||||||
mkdir -p app
|
mkdir -p /app
|
||||||
cp -r ${appSrc}/* app/
|
cp -r ${./dist}/* /app/
|
||||||
cd app
|
|
||||||
bun install --frozen-lockfile --production
|
|
||||||
bun run build
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
in {
|
in {
|
||||||
packages.default = app;
|
packages.default = app;
|
||||||
});
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "bun run --watch src/index.tsx",
|
"dev": "bun run --watch src/index.tsx",
|
||||||
"hot": "bun run --hot src/index.tsx",
|
"hot": "bun run --hot src/index.tsx",
|
||||||
|
"start": "bun run src/index.tsx",
|
||||||
"format": "eslint --fix .",
|
"format": "eslint --fix .",
|
||||||
"build": "bunx @tailwindcss/cli -i ./src/main.css -o ./public/generated.css",
|
"build": "bunx @tailwindcss/cli -i ./src/main.css -o ./public/generated.css",
|
||||||
"lint": "run-p 'lint:*'",
|
"lint": "run-p 'lint:*'",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue