fix dockerfile in backend

This commit is contained in:
2026-02-19 11:42:54 +09:00
parent 00194f3826
commit 55a2bc8281
3 changed files with 13 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
# BackEnd # BackEnd
## Backend init ### init
```bash ```bash
# 1. Set up PostgreSQL and fill in .env # 1. Set up PostgreSQL and fill in .env
@@ -17,7 +17,7 @@ npm run seed:admin
npm run seed:posts npm run seed:posts
``` ```
## Compile and run Backend ### Compile and run
```bash ```bash
# development # development
@@ -30,7 +30,7 @@ $ npm run start:dev
$ npm run start:prod $ npm run start:prod
``` ```
## Run tests in Backend ### Run tests
```bash ```bash
# unit tests # unit tests
@@ -52,3 +52,10 @@ $ npm run dev
$ npm run build $ npm run build
``` ```
# Deploy
```
docker compose down --volumes
docker compose build --no-cache
docker compose up --force-recreate
```

View File

@@ -11,4 +11,4 @@ COPY package*.json ./
RUN npm ci --omit=dev RUN npm ci --omit=dev
COPY --from=base /app/dist ./dist COPY --from=base /app/dist ./dist
EXPOSE 3001 EXPOSE 3001
CMD ["node", "dist/main.js"] CMD ["node", "dist/src/main.js"]

View File

@@ -22,7 +22,5 @@
"paths": { "paths": {
"@/*": ["src/*"] "@/*": ["src/*"]
} }
}, }
"include": ["src/**/*", "scripts/**/*"],
"exclude": ["node_modules", "dist", "test"]
} }