From aa9b5aa954122a1badf7eddad861c761eac74789 Mon Sep 17 00:00:00 2001 From: talksik Date: Fri, 3 Jun 2022 09:53:02 -0700 Subject: [PATCH] adding semi working docker file... --- packages/api/Dockerfile => Dockerfile | 10 +++++----- packages/api/.dockerignore | 1 - packages/api/package.json | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) rename packages/api/Dockerfile => Dockerfile (83%) delete mode 100644 packages/api/.dockerignore diff --git a/packages/api/Dockerfile b/Dockerfile similarity index 83% rename from packages/api/Dockerfile rename to Dockerfile index e7f7a23..1914276 100644 --- a/packages/api/Dockerfile +++ b/Dockerfile @@ -1,15 +1,16 @@ # IMPORTANT: run from root of monolithic repo -FROM ubuntu +FROM node WORKDIR /app # The global package.json only contains build dependencies COPY ./package.json . -COPY ./yarn.lock . # copy the source coded needed for all dependencies -COPY ./packages/core packages/core -COPY ./packages/api packages/api +COPY packages/core packages/core +COPY packages/api packages/api + +# RUN npm i -g yarn # run and compile the core package WORKDIR /app/packages/core @@ -22,6 +23,5 @@ RUN yarn build CMD ["yarn", "start"] - # docker build -t talksik/nirvana-api:1.0 # docker run -p 5000:8080 -d \ No newline at end of file diff --git a/packages/api/.dockerignore b/packages/api/.dockerignore deleted file mode 100644 index 40b878d..0000000 --- a/packages/api/.dockerignore +++ /dev/null @@ -1 +0,0 @@ -node_modules/ \ No newline at end of file diff --git a/packages/api/package.json b/packages/api/package.json index de953ad..e693f7d 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -6,7 +6,7 @@ "scripts": { "dev": "NODE_ENV=development nodemon", "start": "node dist/index.js", - "gcp-build": "tsc -p .", + "build": "tsc -p .", "start:dev": "ts-node index.ts", "production": "NODE_ENV=production nodemon" },