Compare commits
No commits in common. "e0a34f7f2f1a2957fd69175ced49ae841ebe4a58" and "eeac37e58e5eb324368f552659349e63789681a7" have entirely different histories.
e0a34f7f2f
...
eeac37e58e
3 changed files with 0 additions and 62 deletions
|
|
@ -1,12 +0,0 @@
|
||||||
.git
|
|
||||||
.svelte-kit
|
|
||||||
build
|
|
||||||
coverage
|
|
||||||
data
|
|
||||||
dist
|
|
||||||
node_modules
|
|
||||||
playwright-report
|
|
||||||
storybook-static
|
|
||||||
test-results
|
|
||||||
.env
|
|
||||||
.env.*
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
FROM docker.io/oven/bun:1.3.14 AS deps
|
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
COPY package.json bun.lock ./
|
|
||||||
RUN bun install --frozen-lockfile
|
|
||||||
|
|
||||||
FROM deps AS build
|
|
||||||
|
|
||||||
COPY . .
|
|
||||||
RUN bun run build
|
|
||||||
|
|
||||||
FROM docker.io/oven/bun:1.3.14 AS runtime
|
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
ENV NODE_ENV=production
|
|
||||||
ENV HOST=0.0.0.0
|
|
||||||
ENV PORT=3000
|
|
||||||
ENV DATABASE_URL=file:/data/dimensionlab.sqlite
|
|
||||||
ENV DASHBOARD_MIGRATIONS_DIR=/app/drizzle
|
|
||||||
|
|
||||||
COPY package.json bun.lock ./
|
|
||||||
RUN bun install --frozen-lockfile --production
|
|
||||||
COPY --from=build /app/build ./build
|
|
||||||
COPY --from=build /app/drizzle ./drizzle
|
|
||||||
|
|
||||||
RUN mkdir -p /data
|
|
||||||
VOLUME ["/data"]
|
|
||||||
EXPOSE 3000
|
|
||||||
|
|
||||||
CMD ["bun", "build/index.js"]
|
|
||||||
20
README.md
20
README.md
|
|
@ -116,23 +116,3 @@ DATABASE_URL=file:/data/dimensionlab.sqlite HOST=0.0.0.0 PORT=3000 bun build/ind
|
||||||
Mount `/data` or set `DATABASE_URL` to another persistent SQLite path. If the
|
Mount `/data` or set `DATABASE_URL` to another persistent SQLite path. If the
|
||||||
process starts outside the repository root, set `DASHBOARD_MIGRATIONS_DIR` to
|
process starts outside the repository root, set `DASHBOARD_MIGRATIONS_DIR` to
|
||||||
the checked-in `drizzle/` directory so startup migrations can run.
|
the checked-in `drizzle/` directory so startup migrations can run.
|
||||||
|
|
||||||
### Internal Container
|
|
||||||
|
|
||||||
The checked-in `Containerfile` builds the SvelteKit adapter output into a Bun
|
|
||||||
runtime image. For the Dimension Lab internal host, run it behind Caddy on a
|
|
||||||
loopback port and mount persistent state at `/data`:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
podman build -t localhost/dimensionlab-website:latest .
|
|
||||||
podman run --rm \
|
|
||||||
--publish 127.0.0.1:25341:3000 \
|
|
||||||
--volume "$HOME/containers/dimensionlab-website/data:/data:Z" \
|
|
||||||
--env-file "$HOME/containers/dimensionlab-website/dimensionlab-website.env" \
|
|
||||||
localhost/dimensionlab-website:latest
|
|
||||||
```
|
|
||||||
|
|
||||||
The env file must provide `AGENT_CONFIG_TOKEN`. Runtime defaults inside the
|
|
||||||
image set `HOST=0.0.0.0`, `PORT=3000`,
|
|
||||||
`DATABASE_URL=file:/data/dimensionlab.sqlite`, and
|
|
||||||
`DASHBOARD_MIGRATIONS_DIR=/app/drizzle`.
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue