Dockerfile and docker-compose are added correctly
This commit is contained in:
parent
bbabb3f75e
commit
1e37363dfb
3 changed files with 29 additions and 0 deletions
1
.dockerignore
Normal file
1
.dockerignore
Normal file
|
@ -0,0 +1 @@
|
|||
node_modules
|
16
Dockerfile
Normal file
16
Dockerfile
Normal file
|
@ -0,0 +1,16 @@
|
|||
|
||||
FROM node:18
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
|
||||
RUN npm install
|
||||
|
||||
COPY . .
|
||||
|
||||
ARG SERVER_PORT
|
||||
ENV PORT $SERVER_PORT
|
||||
EXPOSE $SERVER_PORT
|
||||
|
||||
CMD ["npm", "run", "start:dev"]
|
12
docker-compose.yaml
Normal file
12
docker-compose.yaml
Normal file
|
@ -0,0 +1,12 @@
|
|||
version: "3.8"
|
||||
services:
|
||||
nest-app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
SERVER_PORT: ${SERVER_PORT}
|
||||
ports:
|
||||
- "${SERVER_PORT}:${SERVER_PORT}"
|
||||
env_file:
|
||||
- .env
|
Loading…
Reference in a new issue