forked from IMPHNEN/kamus-gen-z-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4a30396
commit 4b4b06c
Showing
4 changed files
with
55 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.git | ||
.env | ||
**/node_modules/ |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
FROM node:23-alpine AS base | ||
|
||
RUN apk add --no-cache sqlite | ||
|
||
WORKDIR /app | ||
|
||
RUN mkdir -p /app/db | ||
RUN sqlite3 /app/db/database.db "VACUUM;" | ||
|
||
COPY ./yarn.lock ./package.json ./ | ||
|
||
RUN yarn install | ||
|
||
COPY ./prisma ./prisma/ | ||
|
||
ENV DATABASE_URL=file:/app/db/database.db | ||
|
||
RUN npx prisma migrate dev --name init | ||
|
||
COPY ./ ./ | ||
|
||
FROM node:23-alpine | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=base ./app ./ | ||
|
||
ENV DATABASE_URL=file:/app/db/database.db | ||
|
||
CMD ["yarn", "dev"] |
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
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
services: | ||
app: | ||
build: . | ||
ports: | ||
- '3000:3000' | ||
restart: unless-stopped | ||
environment: | ||
JWT_SECRET: NAKANO_ITSUKI | ||
volumes: | ||
- sqlite_data:/app/db | ||
volumes: | ||
sqlite_data: |