diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cc05e82 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM node:14 + +COPY package*.json ./ + +RUN npm i + +COPY src ./src +COPY tsconfig.json ./tsconfig.json + +RUN npm run build + +# Change this to be whichever port the application is running on +EXPOSE 8080 + +CMD npm run start diff --git a/build-docker-image.bat b/build-docker-image.bat new file mode 100644 index 0000000..82535f0 --- /dev/null +++ b/build-docker-image.bat @@ -0,0 +1,2 @@ +:: replace image_name below with the desired image tag name +docker build -t image_name . diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..cdbaaa7 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,9 @@ +version: '3' + +services: + ts-node-starter: # Replace with the service name + image: ts-node-starter # Replace with the image name + container_name: ts-node-starter # Replace with the container name + restart: on-failure + ports: + - "8080:8080" # Replace with the correct ports"