Skip to content

Commit

Permalink
Merge branch 'dev' into #527-account-delete
Browse files Browse the repository at this point in the history
  • Loading branch information
kmc7468 committed Nov 29, 2024
2 parents 69127d5 + 13cc0d4 commit 423571b
Show file tree
Hide file tree
Showing 144 changed files with 4,587 additions and 2,126 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
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ CORS_WHITELIST=[CORS 정책에서 허용하는 도메인의 목록(e.g. ["http:/
GOOGLE_APPLICATION_CREDENTIALS=[GOOGLE_APPLICATION_CREDENTIALS JSON]
TEST_ACCOUNTS=[스팍스SSO로 로그인시 무조건 테스트로 로그인이 가능한 허용 아이디 목록]
SLACK_REPORT_WEBHOOK_URL=[Slack 웹훅 URL들이 담긴 JSON]
NAVER_MAP_API_ID=[네이버 지도 API ID]
NAVER_MAP_API_KEY=[네이버 지도 API KEY]

# optional environment variables for taxiSampleGenerator
SAMPLE_NUM_OF_ROOMS=[방의 개수]
Expand Down
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"]
87 changes: 0 additions & 87 deletions app.js

This file was deleted.

47 changes: 0 additions & 47 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 423571b

Please sign in to comment.