-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add sqlite db to test api (#54)
Setup the test-api to use a sqlite db to store stats file, and expose a route to fetch the store information.
- Loading branch information
1 parent
c1fdbd6
commit 803897e
Showing
6 changed files
with
89 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,17 @@ | ||
# syntax=docker/dockerfile:1 | ||
ARG BUILDPLATFORM=arm64 | ||
FROM --platform=$BUILDPLATFORM node:20-alpine | ||
WORKDIR /app | ||
# use the official Bun image | ||
# see all versions at https://hub.docker.com/r/oven/bun/tags | ||
FROM oven/bun:1-alpine | ||
WORKDIR /usr/src/app | ||
|
||
ENV NODE_ENV=production | ||
RUN apk update && apk upgrade | ||
RUN apk add --no-cache sqlite | ||
|
||
COPY . . | ||
RUN bun install --frozen-lockfile | ||
|
||
RUN npm install -g pnpm | ||
RUN pnpm install | ||
|
||
RUN addgroup --system --gid 1001 nodejs | ||
RUN adduser --system --uid 1001 hono | ||
|
||
USER hono | ||
# run the app | ||
USER bun | ||
EXPOSE 8000 | ||
ENV PORT 8000 | ||
|
||
CMD ["pnpm", "run", "start"] | ||
CMD [ "bun", "run", "src/index.ts" ] |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,5 +10,8 @@ | |
}, | ||
"volta": { | ||
"extends": "../../package.json" | ||
}, | ||
"devDependencies": { | ||
"@types/bun": "^1.0.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.