fix dockerfile in backend
This commit is contained in:
13
README.md
13
README.md
@@ -1,6 +1,6 @@
|
||||
|
||||
# BackEnd
|
||||
## Backend init
|
||||
### init
|
||||
|
||||
```bash
|
||||
# 1. Set up PostgreSQL and fill in .env
|
||||
@@ -17,7 +17,7 @@ npm run seed:admin
|
||||
npm run seed:posts
|
||||
```
|
||||
|
||||
## Compile and run Backend
|
||||
### Compile and run
|
||||
|
||||
```bash
|
||||
# development
|
||||
@@ -30,7 +30,7 @@ $ npm run start:dev
|
||||
$ npm run start:prod
|
||||
```
|
||||
|
||||
## Run tests in Backend
|
||||
### Run tests
|
||||
|
||||
```bash
|
||||
# unit tests
|
||||
@@ -51,4 +51,11 @@ $ npm run dev
|
||||
# build,deploy
|
||||
$ npm run build
|
||||
|
||||
```
|
||||
|
||||
# Deploy
|
||||
```
|
||||
docker compose down --volumes
|
||||
docker compose build --no-cache
|
||||
docker compose up --force-recreate
|
||||
```
|
||||
@@ -10,5 +10,5 @@ WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm ci --omit=dev
|
||||
COPY --from=base /app/dist ./dist
|
||||
EXPOSE 3001
|
||||
CMD ["node", "dist/main.js"]
|
||||
EXPOSE 3001
|
||||
CMD ["node", "dist/src/main.js"]
|
||||
@@ -22,7 +22,5 @@
|
||||
"paths": {
|
||||
"@/*": ["src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["src/**/*", "scripts/**/*"],
|
||||
"exclude": ["node_modules", "dist", "test"]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user