From 0ccb57552f9a7123fedfe879b762c721fb486a29 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 18 Mar 2021 11:36:55 -0500 Subject: [PATCH 01/32] Added docker file --- Dockerfile | 36 ++++++++++++++++++++++++++++++++++++ codebuild/buildspec.yml | 23 +++++++++++++++-------- 2 files changed, 51 insertions(+), 8 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..17df3cd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,36 @@ +FROM node:12.8.1 +WORKDIR /app +# Install app dependencies +# A wildcard is used to ensure both package.json AND package-lock.json are copied +# where available (npm@5+) +# Bundle app source +# COPY ./index.js . +# COPY ./dist . +RUN mkdir other +RUN mkdir /code +RUN apt-get update && \ + apt-get install -y \ + python3 \ + python3-pip \ + python3-setuptools \ + groff \ + less \ + && pip3 install --upgrade pip \ + && apt-get clean + +RUN pip3 --no-cache-dir install --upgrade awscli + +RUN aws s3 sync s3://vueproject-simulation/dist/ /code/ +# COPY ./other/dist ./other + +COPY package*.json ./ + +# If you are building your code for production +# RUN npm ci --only=production +COPY dist ./other/dist +COPY /code/dist ./dist +COPY /code/index.js ./ +RUN npm install + + +ENTRYPOINT [ "node", "index.js"] \ No newline at end of file diff --git a/codebuild/buildspec.yml b/codebuild/buildspec.yml index 136c87b..0792f46 100644 --- a/codebuild/buildspec.yml +++ b/codebuild/buildspec.yml @@ -1,17 +1,24 @@ version: 0.2 phases: - install: - commands: - - npm install - - npx vite build - pre_build: - commands: - - aws s3 sync s3://vueproject-simulation/dist/ /home/ec2-user + # install: + # commands: + + # pre_build: + # commands: + build: commands: - - echo Build started on `date` + - npm install + - npx vite build + - echo Build started on `date` + - echo Logging in to Docker Hub... + - docker login --username $username --password $password + - docker build -t crowd-simulation:v0.0.1 . --no-cache + - docker tag crowd-simulation:v0.0.1 sarathkshatri/crowd-simulation:v0.0.1 post_build: commands: - echo Build completed on `date` + - echo Pushing the Docker image... + - docker push sarathkshatri/crowd-simulation:v0.0.1 From 42f1dc80bff9682816b11d96a82c5d8c0ea5ff2f Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 18 Mar 2021 12:05:38 -0500 Subject: [PATCH 02/32] Added docker file --- codebuild/buildspec.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/codebuild/buildspec.yml b/codebuild/buildspec.yml index 0792f46..605e866 100644 --- a/codebuild/buildspec.yml +++ b/codebuild/buildspec.yml @@ -14,7 +14,8 @@ phases: - echo Build started on `date` - echo Logging in to Docker Hub... - docker login --username $username --password $password - - docker build -t crowd-simulation:v0.0.1 . --no-cache + - docker build -t crowd-simulation:v0.0.1 . --no-cache --AWS_ACCESS_KEY_ID $AWS_ACCESS_KEY_ID \ + -- AWS_SECRET_ACCESS_KEY $AWS_SECRET_ACCESS_KEY -- AWS_DEFAULT_REGION $AWS_DEFAULT_REGION - docker tag crowd-simulation:v0.0.1 sarathkshatri/crowd-simulation:v0.0.1 post_build: From 34f1e874c46da8533a7ed55a1855f72cd493893b Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 18 Mar 2021 12:23:20 -0500 Subject: [PATCH 03/32] Added docker file --- Dockerfile | 4 ++++ codebuild/buildspec.yml | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 17df3cd..442d240 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,6 +20,10 @@ RUN apt-get update && \ RUN pip3 --no-cache-dir install --upgrade awscli +ARG AWS_ACCESS_KEY_ID +ARG AWS_SECRET_ACCESS_KEY +ARG AWS_DEFAULT_REGION + RUN aws s3 sync s3://vueproject-simulation/dist/ /code/ # COPY ./other/dist ./other diff --git a/codebuild/buildspec.yml b/codebuild/buildspec.yml index 605e866..1bffa0a 100644 --- a/codebuild/buildspec.yml +++ b/codebuild/buildspec.yml @@ -14,8 +14,8 @@ phases: - echo Build started on `date` - echo Logging in to Docker Hub... - docker login --username $username --password $password - - docker build -t crowd-simulation:v0.0.1 . --no-cache --AWS_ACCESS_KEY_ID $AWS_ACCESS_KEY_ID \ - -- AWS_SECRET_ACCESS_KEY $AWS_SECRET_ACCESS_KEY -- AWS_DEFAULT_REGION $AWS_DEFAULT_REGION + - docker build -t crowd-simulation:v0.0.1 . --no-cache ----build-arg AWS_ACCESS_KEY_ID = $AWS_ACCESS_KEY_ID \ + --build-arg AWS_SECRET_ACCESS_KEY = $AWS_SECRET_ACCESS_KEY --build-arg AWS_DEFAULT_REGION = $AWS_DEFAULT_REGION - docker tag crowd-simulation:v0.0.1 sarathkshatri/crowd-simulation:v0.0.1 post_build: From c49fb2c5e4f9e4be7b40abf937996c5f89ee66fa Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 18 Mar 2021 12:25:28 -0500 Subject: [PATCH 04/32] Added docker file --- codebuild/buildspec.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codebuild/buildspec.yml b/codebuild/buildspec.yml index 1bffa0a..42c4f13 100644 --- a/codebuild/buildspec.yml +++ b/codebuild/buildspec.yml @@ -14,7 +14,7 @@ phases: - echo Build started on `date` - echo Logging in to Docker Hub... - docker login --username $username --password $password - - docker build -t crowd-simulation:v0.0.1 . --no-cache ----build-arg AWS_ACCESS_KEY_ID = $AWS_ACCESS_KEY_ID \ + - docker build -t crowd-simulation:v0.0.1 . --no-cache --build-arg AWS_ACCESS_KEY_ID = $AWS_ACCESS_KEY_ID \ --build-arg AWS_SECRET_ACCESS_KEY = $AWS_SECRET_ACCESS_KEY --build-arg AWS_DEFAULT_REGION = $AWS_DEFAULT_REGION - docker tag crowd-simulation:v0.0.1 sarathkshatri/crowd-simulation:v0.0.1 From 72f7344c48290338b67fe76a74f2657e20a2324f Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 18 Mar 2021 13:01:32 -0500 Subject: [PATCH 05/32] Added docker file --- codebuild/buildspec.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codebuild/buildspec.yml b/codebuild/buildspec.yml index 42c4f13..0e1f66e 100644 --- a/codebuild/buildspec.yml +++ b/codebuild/buildspec.yml @@ -15,7 +15,7 @@ phases: - echo Logging in to Docker Hub... - docker login --username $username --password $password - docker build -t crowd-simulation:v0.0.1 . --no-cache --build-arg AWS_ACCESS_KEY_ID = $AWS_ACCESS_KEY_ID \ - --build-arg AWS_SECRET_ACCESS_KEY = $AWS_SECRET_ACCESS_KEY --build-arg AWS_DEFAULT_REGION = $AWS_DEFAULT_REGION + --build-arg AWS_SECRET_ACCESS_KEY = $AWS_SECRET_ACCESS_KEY --build-arg AWS_DEFAULT_REGION = $AWS_DEFAULT_REGION . --squash - docker tag crowd-simulation:v0.0.1 sarathkshatri/crowd-simulation:v0.0.1 post_build: From 601198190cb68cac94e34dbcac74386c8042aee8 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 18 Mar 2021 20:17:41 -0500 Subject: [PATCH 06/32] Added docker file --- codebuild/buildspec.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codebuild/buildspec.yml b/codebuild/buildspec.yml index 0e1f66e..37d6160 100644 --- a/codebuild/buildspec.yml +++ b/codebuild/buildspec.yml @@ -14,8 +14,8 @@ phases: - echo Build started on `date` - echo Logging in to Docker Hub... - docker login --username $username --password $password - - docker build -t crowd-simulation:v0.0.1 . --no-cache --build-arg AWS_ACCESS_KEY_ID = $AWS_ACCESS_KEY_ID \ - --build-arg AWS_SECRET_ACCESS_KEY = $AWS_SECRET_ACCESS_KEY --build-arg AWS_DEFAULT_REGION = $AWS_DEFAULT_REGION . --squash + - docker build -t crowd-simulation:v0.0.1 . --no-cache -e AWS_ACCESS_KEY_ID = $AWS_ACCESS_KEY_ID \ + -e AWS_SECRET_ACCESS_KEY = $AWS_SECRET_ACCESS_KEY -e AWS_DEFAULT_REGION = $AWS_DEFAULT_REGION . --squash - docker tag crowd-simulation:v0.0.1 sarathkshatri/crowd-simulation:v0.0.1 post_build: From 3027a60e19b85f13adeed6710f33fe73cd88a074 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 18 Mar 2021 20:46:24 -0500 Subject: [PATCH 07/32] Added docker file --- codebuild/buildspec.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/codebuild/buildspec.yml b/codebuild/buildspec.yml index 37d6160..1bb10dc 100644 --- a/codebuild/buildspec.yml +++ b/codebuild/buildspec.yml @@ -14,8 +14,7 @@ phases: - echo Build started on `date` - echo Logging in to Docker Hub... - docker login --username $username --password $password - - docker build -t crowd-simulation:v0.0.1 . --no-cache -e AWS_ACCESS_KEY_ID = $AWS_ACCESS_KEY_ID \ - -e AWS_SECRET_ACCESS_KEY = $AWS_SECRET_ACCESS_KEY -e AWS_DEFAULT_REGION = $AWS_DEFAULT_REGION . --squash + - docker build -t crowd-simulation:v0.0.1 . --build-arg AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID --build-arg AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY --build-arg AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION . --no-cache - docker tag crowd-simulation:v0.0.1 sarathkshatri/crowd-simulation:v0.0.1 post_build: From 8ce82c6f50d113a5810eb3f581c1a1275941464c Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 18 Mar 2021 21:04:46 -0500 Subject: [PATCH 08/32] Added docker file --- Dockerfile | 5 +++++ codebuild/buildspec.yml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 442d240..8bb71d0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,6 +24,11 @@ ARG AWS_ACCESS_KEY_ID ARG AWS_SECRET_ACCESS_KEY ARG AWS_DEFAULT_REGION +ENV AWS_ACCESS_KEY_ID $AWS_ACCESS_KEY_ID +ENV AWS_SECRET_ACCESS_KEY $AWS_SECRET_ACCESS_KEY +ENV AWS_DEFAULT_REGION $AWS_DEFAULT_REGION + + RUN aws s3 sync s3://vueproject-simulation/dist/ /code/ # COPY ./other/dist ./other diff --git a/codebuild/buildspec.yml b/codebuild/buildspec.yml index 1bb10dc..b6226e9 100644 --- a/codebuild/buildspec.yml +++ b/codebuild/buildspec.yml @@ -14,7 +14,7 @@ phases: - echo Build started on `date` - echo Logging in to Docker Hub... - docker login --username $username --password $password - - docker build -t crowd-simulation:v0.0.1 . --build-arg AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID --build-arg AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY --build-arg AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION . --no-cache + - docker build -t crowd-simulation:v0.0.1 . --env AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID --env AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY --env AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION . --no-cache - docker tag crowd-simulation:v0.0.1 sarathkshatri/crowd-simulation:v0.0.1 post_build: From 493aea316e57e790d416d48d6649b36e7ff945e1 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 18 Mar 2021 21:14:57 -0500 Subject: [PATCH 09/32] Added docker file --- codebuild/buildspec.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/codebuild/buildspec.yml b/codebuild/buildspec.yml index b6226e9..85ae796 100644 --- a/codebuild/buildspec.yml +++ b/codebuild/buildspec.yml @@ -14,6 +14,7 @@ phases: - echo Build started on `date` - echo Logging in to Docker Hub... - docker login --username $username --password $password + - echo $AWS_ACCESS_KEY_ID - docker build -t crowd-simulation:v0.0.1 . --env AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID --env AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY --env AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION . --no-cache - docker tag crowd-simulation:v0.0.1 sarathkshatri/crowd-simulation:v0.0.1 From 0c1741f50119e129c851721a8735a800cd86b5e1 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 18 Mar 2021 21:21:59 -0500 Subject: [PATCH 10/32] Added docker file --- codebuild/buildspec.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codebuild/buildspec.yml b/codebuild/buildspec.yml index 85ae796..4970f56 100644 --- a/codebuild/buildspec.yml +++ b/codebuild/buildspec.yml @@ -15,7 +15,7 @@ phases: - echo Logging in to Docker Hub... - docker login --username $username --password $password - echo $AWS_ACCESS_KEY_ID - - docker build -t crowd-simulation:v0.0.1 . --env AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID --env AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY --env AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION . --no-cache + - docker build -t crowd-simulation:v0.0.1 . -AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION . --no-cache - docker tag crowd-simulation:v0.0.1 sarathkshatri/crowd-simulation:v0.0.1 post_build: From 9246678f45782774ee49ab54fcf2a2765a803c7a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 18 Mar 2021 21:24:11 -0500 Subject: [PATCH 11/32] Added docker file --- codebuild/buildspec.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codebuild/buildspec.yml b/codebuild/buildspec.yml index 4970f56..a0f9a9d 100644 --- a/codebuild/buildspec.yml +++ b/codebuild/buildspec.yml @@ -15,7 +15,7 @@ phases: - echo Logging in to Docker Hub... - docker login --username $username --password $password - echo $AWS_ACCESS_KEY_ID - - docker build -t crowd-simulation:v0.0.1 . -AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION . --no-cache + - docker build -t crowd-simulation:v0.0.1 . AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION . --no-cache - docker tag crowd-simulation:v0.0.1 sarathkshatri/crowd-simulation:v0.0.1 post_build: From dfa0afc2a5089ebbf11a1d620d90a9626e337ea0 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 19 Mar 2021 10:15:13 -0500 Subject: [PATCH 12/32] Added docker file --- codebuild/buildspec.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/codebuild/buildspec.yml b/codebuild/buildspec.yml index a0f9a9d..6a6e021 100644 --- a/codebuild/buildspec.yml +++ b/codebuild/buildspec.yml @@ -15,9 +15,10 @@ phases: - echo Logging in to Docker Hub... - docker login --username $username --password $password - echo $AWS_ACCESS_KEY_ID - - docker build -t crowd-simulation:v0.0.1 . AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION . --no-cache + - docker build -t crowd-simulation:v0.0.1 . AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY,AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION . --no-cache - docker tag crowd-simulation:v0.0.1 sarathkshatri/crowd-simulation:v0.0.1 + post_build: commands: - echo Build completed on `date` From 608581ea46c5bb86c36a737a6ebb5bb2a124af52 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 19 Mar 2021 10:23:54 -0500 Subject: [PATCH 13/32] Added docker file --- codebuild/buildspec.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/codebuild/buildspec.yml b/codebuild/buildspec.yml index 6a6e021..3c13ee8 100644 --- a/codebuild/buildspec.yml +++ b/codebuild/buildspec.yml @@ -15,10 +15,11 @@ phases: - echo Logging in to Docker Hub... - docker login --username $username --password $password - echo $AWS_ACCESS_KEY_ID - - docker build -t crowd-simulation:v0.0.1 . AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY,AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION . --no-cache + # - docker build -t crowd-simulation:v0.0.1 . AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY,AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION . --no-cache + - docker build -t crowd-simulation:v0.0.1 AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY,AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION . --no-cache - docker tag crowd-simulation:v0.0.1 sarathkshatri/crowd-simulation:v0.0.1 - + post_build: commands: - echo Build completed on `date` From f6b0b902a96e57f144b6e2f0d64ae470be733c48 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 19 Mar 2021 10:26:52 -0500 Subject: [PATCH 14/32] Added docker file --- codebuild/buildspec.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codebuild/buildspec.yml b/codebuild/buildspec.yml index 3c13ee8..61d106c 100644 --- a/codebuild/buildspec.yml +++ b/codebuild/buildspec.yml @@ -16,7 +16,7 @@ phases: - docker login --username $username --password $password - echo $AWS_ACCESS_KEY_ID # - docker build -t crowd-simulation:v0.0.1 . AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY,AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION . --no-cache - - docker build -t crowd-simulation:v0.0.1 AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY,AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION . --no-cache + - docker build -t crowd-simulation:v0.0.1 AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION . --no-cache - docker tag crowd-simulation:v0.0.1 sarathkshatri/crowd-simulation:v0.0.1 From bff5daf52f312a56ecbb8ab6d958e20f795b30a6 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 19 Mar 2021 10:30:52 -0500 Subject: [PATCH 15/32] Added docker file --- codebuild/buildspec.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codebuild/buildspec.yml b/codebuild/buildspec.yml index 61d106c..a41a960 100644 --- a/codebuild/buildspec.yml +++ b/codebuild/buildspec.yml @@ -16,7 +16,7 @@ phases: - docker login --username $username --password $password - echo $AWS_ACCESS_KEY_ID # - docker build -t crowd-simulation:v0.0.1 . AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY,AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION . --no-cache - - docker build -t crowd-simulation:v0.0.1 AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION . --no-cache + - docker build -t crowd-simulation:v0.0.1 --build-arg AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID --build-arg AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY --build-arg AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION . --no-cache - docker tag crowd-simulation:v0.0.1 sarathkshatri/crowd-simulation:v0.0.1 From 08394d65b66247eb7ea6842ab7888ffdcfc2250b Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 19 Mar 2021 10:57:18 -0500 Subject: [PATCH 16/32] Added docker file --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 8bb71d0..321d806 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,6 +8,7 @@ WORKDIR /app # COPY ./dist . RUN mkdir other RUN mkdir /code +RUN mkdir dist RUN apt-get update && \ apt-get install -y \ python3 \ From dc3e1c611cd246199175121eae56f04998e6a17d Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 19 Mar 2021 11:03:28 -0500 Subject: [PATCH 17/32] Added docker file --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 321d806..bc339d3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,6 +38,7 @@ COPY package*.json ./ # If you are building your code for production # RUN npm ci --only=production COPY dist ./other/dist +RUN cwd COPY /code/dist ./dist COPY /code/index.js ./ RUN npm install From f5025d428e010f641a32fc0cfc7308802aa7620c Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 19 Mar 2021 11:06:22 -0500 Subject: [PATCH 18/32] Added docker file --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index bc339d3..5186701 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,7 +38,7 @@ COPY package*.json ./ # If you are building your code for production # RUN npm ci --only=production COPY dist ./other/dist -RUN cwd +RUN pwd COPY /code/dist ./dist COPY /code/index.js ./ RUN npm install From 9ab30be1c90ff956d6ea041be0ba46c96622ec93 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 19 Mar 2021 11:14:12 -0500 Subject: [PATCH 19/32] Added docker file --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 5186701..15eab5e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ FROM node:12.8.1 +RUN mkdir /app WORKDIR /app # Install app dependencies # A wildcard is used to ensure both package.json AND package-lock.json are copied From 28130079a66253b18d019508495204e731096623 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 19 Mar 2021 11:18:42 -0500 Subject: [PATCH 20/32] Added docker file --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 15eab5e..a1954f0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,9 +40,9 @@ COPY package*.json ./ # RUN npm ci --only=production COPY dist ./other/dist RUN pwd -COPY /code/dist ./dist -COPY /code/index.js ./ -RUN npm install +# COPY /code/dist ./dist +# COPY /code/index.js ./ +# RUN npm install ENTRYPOINT [ "node", "index.js"] \ No newline at end of file From 45db2dad3ed39535373101e6f49ddcf59d6cf7a4 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 19 Mar 2021 11:43:33 -0500 Subject: [PATCH 21/32] Added docker file --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index a1954f0..15eab5e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,9 +40,9 @@ COPY package*.json ./ # RUN npm ci --only=production COPY dist ./other/dist RUN pwd -# COPY /code/dist ./dist -# COPY /code/index.js ./ -# RUN npm install +COPY /code/dist ./dist +COPY /code/index.js ./ +RUN npm install ENTRYPOINT [ "node", "index.js"] \ No newline at end of file From 55da06c5af0eb42f429fa6057fc2f9975c3df0f3 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 19 Mar 2021 11:55:05 -0500 Subject: [PATCH 22/32] Added docker file --- Dockerfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 15eab5e..7eafbf0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,11 +38,11 @@ COPY package*.json ./ # If you are building your code for production # RUN npm ci --only=production -COPY dist ./other/dist -RUN pwd -COPY /code/dist ./dist -COPY /code/index.js ./ -RUN npm install - +# COPY dist ./other/dist +# RUN pwd +# COPY /code/dist ./dist +# COPY /code/index.js ./ +# RUN npm install +COPY .. ./ ENTRYPOINT [ "node", "index.js"] \ No newline at end of file From 0c1730fa01a5bc50d748ce4d6feb52d65552c359 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 19 Mar 2021 12:00:14 -0500 Subject: [PATCH 23/32] Added docker file --- Dockerfile | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7eafbf0..0959758 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,4 @@ FROM node:12.8.1 -RUN mkdir /app WORKDIR /app # Install app dependencies # A wildcard is used to ensure both package.json AND package-lock.json are copied @@ -33,16 +32,14 @@ ENV AWS_DEFAULT_REGION $AWS_DEFAULT_REGION RUN aws s3 sync s3://vueproject-simulation/dist/ /code/ # COPY ./other/dist ./other - +RUN pwd COPY package*.json ./ # If you are building your code for production # RUN npm ci --only=production -# COPY dist ./other/dist -# RUN pwd -# COPY /code/dist ./dist -# COPY /code/index.js ./ -# RUN npm install +COPY dist ./other/dist +COPY /code/dist ./dist +COPY /code/index.js ./ +RUN npm install -COPY .. ./ ENTRYPOINT [ "node", "index.js"] \ No newline at end of file From d91dc223a75c0ebd24d80d999a96d1fc37cd9edc Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 19 Mar 2021 12:04:21 -0500 Subject: [PATCH 24/32] Added docker file --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0959758..3a6fc36 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,7 +32,7 @@ ENV AWS_DEFAULT_REGION $AWS_DEFAULT_REGION RUN aws s3 sync s3://vueproject-simulation/dist/ /code/ # COPY ./other/dist ./other -RUN pwd +RUN ls COPY package*.json ./ # If you are building your code for production From 343996585f83b70699c3570e18ed4ca13773957e Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 19 Mar 2021 12:18:37 -0500 Subject: [PATCH 25/32] Added docker file --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3a6fc36..324b8ca 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,7 +32,8 @@ ENV AWS_DEFAULT_REGION $AWS_DEFAULT_REGION RUN aws s3 sync s3://vueproject-simulation/dist/ /code/ # COPY ./other/dist ./other -RUN ls +RUN cd /code/ +RUN pwd COPY package*.json ./ # If you are building your code for production From 874c411ecc4b5a0393199dc85a7f58664afd5df8 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 19 Mar 2021 12:22:37 -0500 Subject: [PATCH 26/32] Added docker file --- Dockerfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 324b8ca..37430de 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ WORKDIR /app # COPY ./index.js . # COPY ./dist . RUN mkdir other -RUN mkdir /code +RUN mkdir code RUN mkdir dist RUN apt-get update && \ apt-get install -y \ @@ -30,10 +30,8 @@ ENV AWS_SECRET_ACCESS_KEY $AWS_SECRET_ACCESS_KEY ENV AWS_DEFAULT_REGION $AWS_DEFAULT_REGION -RUN aws s3 sync s3://vueproject-simulation/dist/ /code/ +RUN aws s3 sync s3://vueproject-simulation/dist/ code/ # COPY ./other/dist ./other -RUN cd /code/ -RUN pwd COPY package*.json ./ # If you are building your code for production From a97fd5401a6ef804ac5ada9ecd2b7b446d1034d4 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 19 Mar 2021 12:26:39 -0500 Subject: [PATCH 27/32] Added docker file --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 37430de..725c9d2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,8 +37,8 @@ COPY package*.json ./ # If you are building your code for production # RUN npm ci --only=production COPY dist ./other/dist -COPY /code/dist ./dist -COPY /code/index.js ./ +COPY code/dist ./dist +COPY code/index.js ./ RUN npm install ENTRYPOINT [ "node", "index.js"] \ No newline at end of file From f6d5e4edc12eddc722eb4479cd13dea2b0bb76ca Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 20 Mar 2021 13:24:32 -0500 Subject: [PATCH 28/32] Added docker file --- Dockerfile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 725c9d2..19b576e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,9 +6,9 @@ WORKDIR /app # Bundle app source # COPY ./index.js . # COPY ./dist . -RUN mkdir other -RUN mkdir code -RUN mkdir dist +RUN mkdir /app/other +RUN mkdir /app/code +RUN mkdir /app/dist RUN apt-get update && \ apt-get install -y \ python3 \ @@ -30,15 +30,15 @@ ENV AWS_SECRET_ACCESS_KEY $AWS_SECRET_ACCESS_KEY ENV AWS_DEFAULT_REGION $AWS_DEFAULT_REGION -RUN aws s3 sync s3://vueproject-simulation/dist/ code/ +RUN aws s3 sync s3://vueproject-simulation/dist/ /app/code/ # COPY ./other/dist ./other COPY package*.json ./ # If you are building your code for production # RUN npm ci --only=production -COPY dist ./other/dist -COPY code/dist ./dist -COPY code/index.js ./ +COPY ./dist /app/other/dist +COPY /app/code/dist /app/dist +COPY /app/code/index.js /app/ RUN npm install ENTRYPOINT [ "node", "index.js"] \ No newline at end of file From 323f2b76bdabd0ac189419e6b53d50f793198124 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 20 Mar 2021 13:42:00 -0500 Subject: [PATCH 29/32] Added docker file --- Dockerfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 19b576e..136efb0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,9 +6,9 @@ WORKDIR /app # Bundle app source # COPY ./index.js . # COPY ./dist . -RUN mkdir /app/other -RUN mkdir /app/code -RUN mkdir /app/dist +RUN mkdir /other +RUN mkdir /code +RUN mkdir /dist RUN apt-get update && \ apt-get install -y \ python3 \ @@ -30,15 +30,15 @@ ENV AWS_SECRET_ACCESS_KEY $AWS_SECRET_ACCESS_KEY ENV AWS_DEFAULT_REGION $AWS_DEFAULT_REGION -RUN aws s3 sync s3://vueproject-simulation/dist/ /app/code/ +RUN aws s3 sync s3://vueproject-simulation/dist/ /code/ # COPY ./other/dist ./other COPY package*.json ./ # If you are building your code for production # RUN npm ci --only=production COPY ./dist /app/other/dist -COPY /app/code/dist /app/dist -COPY /app/code/index.js /app/ +COPY /code/dist /app/dist +COPY /code/index.js /app/ RUN npm install ENTRYPOINT [ "node", "index.js"] \ No newline at end of file From 51be2f81294ad30f2015563e72aae39c0053cea8 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 20 Mar 2021 13:47:46 -0500 Subject: [PATCH 30/32] Added docker file --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 136efb0..722dee4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,8 +37,8 @@ COPY package*.json ./ # If you are building your code for production # RUN npm ci --only=production COPY ./dist /app/other/dist -COPY /code/dist /app/dist -COPY /code/index.js /app/ +COPY ../code/dist /app/dist +COPY ../code/index.js /app/ RUN npm install ENTRYPOINT [ "node", "index.js"] \ No newline at end of file From 2bcf860cbcd4235587a18077acadf87a2e4470f3 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 20 Mar 2021 13:51:09 -0500 Subject: [PATCH 31/32] Added docker file --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 722dee4..b4c7d84 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,8 +37,8 @@ COPY package*.json ./ # If you are building your code for production # RUN npm ci --only=production COPY ./dist /app/other/dist -COPY ../code/dist /app/dist -COPY ../code/index.js /app/ +RUN cp /code/dist /app/dist +RUN cp /code/index.js /app/ RUN npm install ENTRYPOINT [ "node", "index.js"] \ No newline at end of file From 723202a90702171d1aa116e0f04e860d4250c767 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 20 Mar 2021 13:54:37 -0500 Subject: [PATCH 32/32] Added docker file --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b4c7d84..8b0c84a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,7 +37,7 @@ COPY package*.json ./ # If you are building your code for production # RUN npm ci --only=production COPY ./dist /app/other/dist -RUN cp /code/dist /app/dist +RUN cp -r /code/dist /app/dist RUN cp /code/index.js /app/ RUN npm install