mirror of
https://github.com/profullstack/logicsrc.git
synced 2026-10-01 12:23:50 +00:00
Restore .nixpacks so deploy-dev2 can build master again (#217)
PR #216 deleted .nixpacks/ and git-ignored it; both dev2 deploy workflows
build from .nixpacks/Dockerfile, so every deploy of master since has failed
before the build (lstat app/.nixpacks: no such file or directory). Restored
from f478025.
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
587c073f72
commit
c535aaa32c
4 changed files with 58 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -15,4 +15,3 @@ supabase/.temp
|
||||||
# Nixpacks build plan generated by `railway up`. It bakes absolute paths to the
|
# Nixpacks build plan generated by `railway up`. It bakes absolute paths to the
|
||||||
# worktree it was generated in and a one-off image tag, so it is never reusable
|
# worktree it was generated in and a one-off image tag, so it is never reusable
|
||||||
# and every regeneration conflicts with the last one.
|
# and every regeneration conflicts with the last one.
|
||||||
.nixpacks/
|
|
||||||
|
|
|
||||||
36
.nixpacks/Dockerfile
Normal file
36
.nixpacks/Dockerfile
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
FROM ghcr.io/railwayapp/nixpacks:ubuntu-1745885067
|
||||||
|
|
||||||
|
ENTRYPOINT ["/bin/bash", "-l", "-c"]
|
||||||
|
WORKDIR /app/
|
||||||
|
ARG PUBLIC_URL
|
||||||
|
ENV PUBLIC_URL=$PUBLIC_URL
|
||||||
|
|
||||||
|
|
||||||
|
COPY .nixpacks/nixpkgs-ffeebf0acf3ae8b29f8c7049cd911b9636efd7e7.nix .nixpacks/nixpkgs-ffeebf0acf3ae8b29f8c7049cd911b9636efd7e7.nix
|
||||||
|
RUN nix-env -if .nixpacks/nixpkgs-ffeebf0acf3ae8b29f8c7049cd911b9636efd7e7.nix && nix-collect-garbage -d
|
||||||
|
|
||||||
|
|
||||||
|
ARG CI NIXPACKS_METADATA NIXPACKS_NODE_VERSION NODE_ENV NPM_CONFIG_PRODUCTION
|
||||||
|
ENV CI=$CI NIXPACKS_METADATA=$NIXPACKS_METADATA NIXPACKS_NODE_VERSION=$NIXPACKS_NODE_VERSION NODE_ENV=$NODE_ENV NPM_CONFIG_PRODUCTION=$NPM_CONFIG_PRODUCTION
|
||||||
|
|
||||||
|
# setup phase
|
||||||
|
# noop
|
||||||
|
|
||||||
|
# install phase
|
||||||
|
ENV NIXPACKS_PATH=/app/node_modules/.bin:$NIXPACKS_PATH
|
||||||
|
COPY . /app/.
|
||||||
|
RUN --mount=type=cache,id=myZsC0wNW9Q-/root/npm,target=/root/.npm npm ci
|
||||||
|
|
||||||
|
# build phase
|
||||||
|
COPY . /app/.
|
||||||
|
RUN --mount=type=cache,id=myZsC0wNW9Q-apps/logicsrc-web/next/cache,target=/app/apps/logicsrc-web/.next/cache --mount=type=cache,id=myZsC0wNW9Q-node_modules/cache,target=/app/node_modules/.cache npm run build
|
||||||
|
|
||||||
|
|
||||||
|
RUN printf '\nPATH=/app/node_modules/.bin:$PATH' >> /root/.profile
|
||||||
|
|
||||||
|
|
||||||
|
# start
|
||||||
|
COPY . /app
|
||||||
|
|
||||||
|
CMD ["npm run start"]
|
||||||
|
|
||||||
1
.nixpacks/build.sh
Normal file
1
.nixpacks/build.sh
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
docker build /home/anthony/src/profullstack/logicsrc/.claude/worktrees/dev2-logicsrc.com-8sr7z6_r -f /home/anthony/src/profullstack/logicsrc/.claude/worktrees/dev2-logicsrc.com-8sr7z6_r/.nixpacks/Dockerfile -t 4c321096-0f24-4fcc-8a9b-8098036fecc1 --build-arg CI=true --build-arg NIXPACKS_METADATA=node --build-arg NIXPACKS_NODE_VERSION=22 --build-arg NODE_ENV=production --build-arg NPM_CONFIG_PRODUCTION=false
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
{ }:
|
||||||
|
|
||||||
|
let pkgs = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/ffeebf0acf3ae8b29f8c7049cd911b9636efd7e7.tar.gz") { overlays = [ (import (builtins.fetchTarball "https://github.com/railwayapp/nix-npm-overlay/archive/main.tar.gz")) ]; };
|
||||||
|
in with pkgs;
|
||||||
|
let
|
||||||
|
APPEND_LIBRARY_PATH = "${lib.makeLibraryPath [ gcc-unwrapped ] }";
|
||||||
|
myLibraries = writeText "libraries" ''
|
||||||
|
export LD_LIBRARY_PATH="${APPEND_LIBRARY_PATH}:$LD_LIBRARY_PATH"
|
||||||
|
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
buildEnv {
|
||||||
|
name = "ffeebf0acf3ae8b29f8c7049cd911b9636efd7e7-env";
|
||||||
|
paths = [
|
||||||
|
(runCommand "ffeebf0acf3ae8b29f8c7049cd911b9636efd7e7-env" { } ''
|
||||||
|
mkdir -p $out/etc/profile.d
|
||||||
|
cp ${myLibraries} $out/etc/profile.d/ffeebf0acf3ae8b29f8c7049cd911b9636efd7e7-env.sh
|
||||||
|
'')
|
||||||
|
nodejs_22 npm-9_x
|
||||||
|
];
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue