use API_PORT instead of EMS_PORT for NestJS backend

This commit is contained in:
2025-09-18 16:37:35 +09:00
parent 34529cea68
commit c2560b073b
3 changed files with 6 additions and 6 deletions

View File

@ -28,9 +28,9 @@ services:
context: ./server
dockerfile: Dockerfile
environment:
- EMS_PORT=${EMS_PORT}
- API_PORT=${API_PORT}
ports:
- ${EMS_PORT}:${EMS_PORT}
- ${API_PORT}:${API_PORT}
restart: always
ems:

View File

@ -1,4 +1,4 @@
FROM node:lts-alpine AS base
FROM node:20 AS base
FROM base AS builder
@ -6,12 +6,12 @@ WORKDIR /app
COPY package*.json ./
RUN npm ci
RUN npm install
COPY . .
RUN npm run build
EXPOSE $EMS_PORT
EXPOSE $API_PORT
CMD ["node", "dist/main"]

View File

@ -18,6 +18,6 @@ async function bootstrap() {
const documentFactory = () => SwaggerModule.createDocument(app, config)
SwaggerModule.setup('docs', app, documentFactory)
await app.listen(process.env.EMS_PORT ?? 3000);
await app.listen(process.env.API_PORT ?? 3000);
}
bootstrap();