-
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: ready to deploy openauth service using password as provider (#1)
* feat: ready to deploy openauth service using password as provider * chore: fix prettier * chore: fix test run * fix: user id was not set if user was found * feat: email verification
- Loading branch information
Showing
12 changed files
with
607 additions
and
71 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,15 +1,20 @@ | ||
ARG NODE_IMAGE=node:18-alpine | ||
ARG NODE_IMAGE=node:18-alpine3.21 | ||
|
||
FROM ${NODE_IMAGE} | ||
ENV NODE_ENV=production | ||
EXPOSE 8000 | ||
RUN mkdir /app | ||
RUN chown node:node /app | ||
USER node | ||
WORKDIR /app | ||
COPY --chown=node:node ["package.json", "package-lock.json*", "tsconfig*.json", "./"] | ||
COPY --chown=node:node ["src", "./src"] | ||
COPY ./docker-entrypoint.sh /usr/local/bin/ | ||
RUN chmod +x /usr/local/bin/docker-entrypoint.sh | ||
# Delete prepare script to avoid errors from husky | ||
RUN npm pkg delete scripts.prepare \ | ||
&& npm ci --omit=dev | ||
VOLUME [ "/data" ] | ||
ENV DATA_DIR=/data | ||
|
||
ENTRYPOINT [ "/usr/local/bin/docker-entrypoint.sh" ] | ||
CMD [ "npm", "run", "start" ] |
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,5 @@ | ||
#!/bin/sh | ||
|
||
chown -R node:node $DATA_DIR | ||
|
||
su -p node -c "cd /app && $*" |
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,4 +1,4 @@ | ||
module.exports = { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
}; | ||
testEnvironment: 'node' | ||
}; |
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 |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
"watch": ["src"], | ||
"ext": "ts", | ||
"exec": "node --inspect -r ts-node/register ./src/server.ts" | ||
} | ||
} |
Oops, something went wrong.