diff --git a/Dockerfile b/Dockerfile index acdd3c1..ad8e6b1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,23 +3,17 @@ FROM node:20-alpine # Create working directory WORKDIR /opt/app -# RUN apk add --no-cache cmake make g++ python3 openssl-dev py3-setuptools - -# Optional: clean old node_modules if re-building -RUN rm -rf node_modules package-lock.json - # Copy and install dependencies COPY package.json . COPY package-lock.json . COPY babel.config.js . -# COPY tsconfig.json . +COPY tsconfig.json . COPY .env . -# COPY src ./src -COPY dist ./dist -RUN npm install +COPY src ./src +RUN npm install --include=dev # Build project -# RUN npm run build +RUN npm run build # Expose application port EXPOSE 3000 diff --git a/build.sh b/build.sh deleted file mode 100644 index ca4cac1..0000000 --- a/build.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -# exit immediately if a command exits with a non-zero status -set -e - -# run npm install to install dependencies -npm install - -# run the build script defined in package.json -npm run build - -# print a message indicating the build is complete -echo "Build complete!" - -# build docker image -docker compose up --build -d -echo "Docker image built and containers are up!" \ No newline at end of file