diff --git a/Dockerfile b/Dockerfile index 2127764..4cdddda 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,5 @@ -FROM node:16-alpine as builder +FROM node:16-alpine -# Set the working directory to /app inside the container -WORKDIR /app # Copy app files COPY . . @@ -9,11 +7,10 @@ COPY . . # Install dependencies (npm ci makes sure the exact versions in the lockfile gets installed) RUN npm install -# Bundle static assets with nginx -FROM node:16-alpine as production - # Copy built assets from `builder` image COPY . . # Expose port -EXPOSE 4324 \ No newline at end of file +EXPOSE 4324 + +CMD ["npm", "start"] \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..2439cf9 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,10 @@ +version: '3' + +services: + test-app: + container_name: test-apps + build: + context: . + dockerfile: Dockerfile + ports: + - 4324:4324 \ No newline at end of file diff --git a/package.json b/package.json index a8afaf0..b256e41 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "server.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "start": "nodemon server.js" + "start": "node server.js" }, "author": "", "license": "ISC",