feat(dashboard): replace homepage with model-driven console #27
3 changed files with 62 additions and 0 deletions
12
.containerignore
Normal file
12
.containerignore
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
.git
|
||||
.svelte-kit
|
||||
build
|
||||
coverage
|
||||
data
|
||||
dist
|
||||
node_modules
|
||||
playwright-report
|
||||
storybook-static
|
||||
test-results
|
||||
.env
|
||||
.env.*
|
||||
30
Containerfile
Normal file
30
Containerfile
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
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,3 +116,23 @@ 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
|
||||
process starts outside the repository root, set `DASHBOARD_MIGRATIONS_DIR` to
|
||||
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