feat: Dahoam start page with accounts, cards and search
Replica of the reference start page: wallpaper, serif clock, search bar and link cards, as a TanStack Start app. - Better Auth: email/password and OIDC single sign-on - Postgres with Drizzle for the auth tables, cards, links, settings and uploaded wallpapers; the server applies the migrations on start - cards group links; links are dragged inside and between cards - search with DuckDuckGo, SearXNG or Google, suggestions and / commands - settings page: name, search engine, wallpaper, account - UI from collabry-components, copied into src/vendor/collabry - Dockerfile and a Gitea workflow that checks the code, builds the image for amd64 and arm64 and pushes it to the registry on main
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
||||
# The build stage runs on the builder's own platform ($BUILDPLATFORM). The Nitro output is plain JS and the final
|
||||
# stage has no RUN, so a linux/amd64 + linux/arm64 build needs no emulation (the CI runner has no QEMU).
|
||||
FROM --platform=$BUILDPLATFORM node:26.13.1-alpine@sha256:6bd9ab43c0ec0190ca7b2d193906cb8b7edf6e7f4afa43ddeccd6452710bffb5 AS build
|
||||
WORKDIR /app
|
||||
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml .npmrc ./
|
||||
# Node 26 images have no corepack: install the pnpm version from package.json's packageManager field.
|
||||
RUN npm install -g "pnpm@$(node -p "require('./package.json').packageManager.split('@')[1]")" \
|
||||
&& pnpm install --frozen-lockfile
|
||||
COPY . .
|
||||
RUN pnpm build
|
||||
|
||||
# Self-contained Nitro output (dependencies are bundled): no node_modules install in the runtime image.
|
||||
FROM node:26.13.1-alpine@sha256:6bd9ab43c0ec0190ca7b2d193906cb8b7edf6e7f4afa43ddeccd6452710bffb5
|
||||
ENV NODE_ENV=production PORT=3000
|
||||
WORKDIR /app
|
||||
COPY --from=build --chown=node:node /app/.output ./
|
||||
# The server applies these on start (src/db/index.ts).
|
||||
COPY --chown=node:node drizzle ./drizzle
|
||||
USER node
|
||||
EXPOSE 3000
|
||||
# /login needs the database, so healthy also means migrated.
|
||||
HEALTHCHECK --interval=15s --timeout=5s --start-period=20s \
|
||||
CMD node -e "fetch('http://127.0.0.1:3000/login').then(r=>process.exit(r.ok?0:1),()=>process.exit(1))"
|
||||
CMD ["node", "server/index.mjs"]
|
||||
Reference in New Issue
Block a user