attempted docker file

This commit is contained in:
talksik
2022-06-03 09:01:40 -07:00
parent 296c044ee4
commit 13efe5e951
6 changed files with 48 additions and 27 deletions
+1
View File
@@ -0,0 +1 @@
node_modules/
+17
View File
@@ -0,0 +1,17 @@
# This file specifies files that are *not* uploaded to Google Cloud
# using gcloud. It follows the same syntax as .gitignore, with the addition of
# "#!include" directives (which insert the entries of the given .gitignore-style
# file at that point).
#
# For more information, run:
# $ gcloud topic gcloudignore
#
.gcloudignore
# If you would like to upload your .git directory, .gitignore file or files
# from your .gitignore file, remove the corresponding line
# below:
.git
.gitignore
# Node.js dependencies:
node_modules/
+27
View File
@@ -0,0 +1,27 @@
# IMPORTANT: run from root of monolithic repo
FROM ubuntu
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
# run and compile the core package
WORKDIR /app/packages/core
# todo: might not need this and just do from level higher
RUN yarn install
WORKDIR /app/packages/api
RUN yarn install --production
RUN yarn build
CMD ["yarn", "start"]
# docker build -t talksik/nirvana-api:1.0
# docker run -p 5000:8080 -d
+1
View File
@@ -0,0 +1 @@
runtime: nodejs14
+2
View File
@@ -5,6 +5,8 @@
"license": "MIT",
"scripts": {
"dev": "NODE_ENV=development nodemon",
"start": "node dist/index.js",
"gcp-build": "tsc -p .",
"start:dev": "ts-node index.ts",
"production": "NODE_ENV=production nodemon"
},