Skip to content

Commit

Permalink
Add: merge to dev
Browse files Browse the repository at this point in the history
  • Loading branch information
TaehyeonPark committed Feb 3, 2025
2 parents f275b14 + 13cc0d4 commit 11df570
Show file tree
Hide file tree
Showing 118 changed files with 3,113 additions and 1,330 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
/node_modules
/dist
.env
.env.test
.env.production
.env.development
.DS_store
*.code-workspace
*.swp
/logs/*.log
.vscode

# AdminJS 관련 디렉토리
.adminjs
7 changes: 7 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules/
dist/
package.json
tsconfig.json
.prettierrc.json
.eslintrc.cjs
nodemon.json
80 changes: 80 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
module.exports = {
env: {
es2021: true,
node: true,
},
extends: [
"plugin:@typescript-eslint/recommended",
"airbnb-base",
"airbnb-typescript/base",
"plugin:mocha/recommended",
"prettier",
],
overrides: [
{
env: {
node: true,
mocha: true,
},
files: [".eslintrc.{js,cjs}"],
parserOptions: {
sourceType: "script",
},
},
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
project: "./tsconfig.json",
},
plugins: ["import", "@typescript-eslint", "mocha"],
rules: {
"import/extensions": [
"error",
"ignorePackages",
{
js: "never", // temporary fix for #159
ts: "never",
},
],
"import/named": "error",
"import/no-extraneous-dependencies": [
"error",
{
packageDir: "./",
},
],
"mocha/no-mocha-arrows": "off",
"no-console": "error",
"no-restricted-imports": [
"error",
{
patterns: [
{
group: ["../*"],
message:
"Usage of relative parent imports is not allowed. Use path alias instead.",
},
],
},
],
radix: ["error", "as-needed"],
"@typescript-eslint/consistent-type-imports": [
"error",
{
prefer: "type-imports",
},
],
},
settings: {
"import/parsers": {
"@typescript-eslint/parser": [".ts"],
},
"import/resolver": {
typescript: {
project: ["./tsconfig.json"],
},
},
},
};
15 changes: 0 additions & 15 deletions .eslintrc.js

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
/node_modules
/dist
/dump
.env
.env.test
.env.production
.env.development
Expand Down
7 changes: 5 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
node_modules
build
node_modules/
dist/
package.json
tsconfig.json
nodemon.json
2 changes: 1 addition & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
"trailingComma": "es5",
"useTabs": false,
"vueIndentScriptAndStyle": false,
"parser": "babel"
"parser": "typescript"
}
38 changes: 31 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,45 @@
FROM node:18-alpine
#
# First stage: build the app
#
FROM node:18-alpine AS builder

WORKDIR /usr/src/app

# Install curl(for taxi-watchtower) and pnpm
RUN apk update && apk add curl && npm install --global [email protected]
# Install pnpm
RUN npm install --global [email protected]

# pnpm fetch does require only lockfile
COPY pnpm-lock.yaml .
RUN pnpm fetch

COPY . .
RUN pnpm install --offline
RUN pnpm build

#
# Second stage: run the app
#
FROM node:18-alpine

WORKDIR /usr/src/app

# Install pnpm
RUN npm install --global [email protected]

# Install curl for taxi-watchtower
RUN apk update && apk add curl

# Note: devDependencies are not fetched
# devDependencies are not fetched
COPY pnpm-lock.yaml .
RUN pnpm fetch --prod

# Copy repository and install dependencies
ADD . ./
COPY package.json .
RUN pnpm install --offline --prod

# Copy the built app from the previous stage
COPY --from=builder /usr/src/app/dist ./dist

# Run container
EXPOSE 80
ENV PORT 80
CMD ["pnpm", "run", "serve"]
CMD ["pnpm", "serve"]
91 changes: 0 additions & 91 deletions app.js

This file was deleted.

62 changes: 0 additions & 62 deletions loadenv.js

This file was deleted.

15 changes: 9 additions & 6 deletions nodemon.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"ignore": ["node_modules/*"],
"env": {
"TZ": "Asia/Seoul",
"NODE_ENV": "development"
}
}
"ignore": ["node_modules"],
"watch": ["src", ".env.development"],
"ext": "js,json,ts",
"exec": "ts-node --require tsconfig-paths/register src",
"env": {
"TZ": "Asia/Seoul",
"NODE_ENV": "development"
}
}
Loading

0 comments on commit 11df570

Please sign in to comment.