From 7bfabcb63459a5ee1a12f7e061f19371eeb720da Mon Sep 17 00:00:00 2001 From: ThomasSheeba2504 Date: Mon, 11 Aug 2025 20:56:53 +0530 Subject: [PATCH 01/12] Create dockerfile --- dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 dockerfile diff --git a/dockerfile b/dockerfile new file mode 100644 index 000000000..362fb439a --- /dev/null +++ b/dockerfile @@ -0,0 +1,6 @@ +FROM node:lts-alpine +WORKDIR /app +COPY . . +RUN yarn install --production +CMD ["node", "src/index.js"] +EXPOSE 3000 From a668a2a1c3d22d1405695254e2558613e515c5b4 Mon Sep 17 00:00:00 2001 From: ThomasSheeba2504 Date: Mon, 11 Aug 2025 22:21:03 +0530 Subject: [PATCH 02/12] Update app.js --- src/static/js/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/static/js/app.js b/src/static/js/app.js index 4ec962cda..3775017a9 100644 --- a/src/static/js/app.js +++ b/src/static/js/app.js @@ -53,7 +53,7 @@ function TodoListCard() { {items.length === 0 && ( -

No items yet! Add one above!

+

You have no todo items yet!! Add one above!

)} {items.map(item => ( Date: Tue, 12 Aug 2025 11:04:21 +0530 Subject: [PATCH 03/12] Create greeting.txt --- greeting.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 greeting.txt diff --git a/greeting.txt b/greeting.txt new file mode 100644 index 000000000..425286d21 --- /dev/null +++ b/greeting.txt @@ -0,0 +1 @@ +This is the apline container From 9e7533ab2e168eb171fa4ed791a183084f439f64 Mon Sep 17 00:00:00 2001 From: ThomasSheeba2504 Date: Tue, 12 Aug 2025 13:02:05 +0530 Subject: [PATCH 04/12] Create compose.yml --- compose.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 compose.yml diff --git a/compose.yml b/compose.yml new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/compose.yml @@ -0,0 +1 @@ + From f44ae283916c677b362e5818cb74671083961984 Mon Sep 17 00:00:00 2001 From: ThomasSheeba2504 Date: Tue, 12 Aug 2025 13:06:33 +0530 Subject: [PATCH 05/12] Update compose.yml --- compose.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/compose.yml b/compose.yml index 8b1378917..070606463 100644 --- a/compose.yml +++ b/compose.yml @@ -1 +1,16 @@ +services: + app: + image: node:18-alpine + command: sh -c "yarn install && yarn run dev" + ports: + - 127.0.0.1:3000:3000 + working_dir: /app + volumes: + - ./:/app + environment: + MYSQL_HOST: mysql + MYSQL_USER: root + MYSQL_PASSWORD: secret + MYSQL_DB: todos + From b6cb2d8c01842e49bc60f7eeeb857dac7fc69f00 Mon Sep 17 00:00:00 2001 From: ThomasSheeba2504 Date: Tue, 12 Aug 2025 13:08:42 +0530 Subject: [PATCH 06/12] Update compose.yml --- compose.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/compose.yml b/compose.yml index 070606463..888e48fb5 100644 --- a/compose.yml +++ b/compose.yml @@ -12,5 +12,17 @@ services: MYSQL_USER: root MYSQL_PASSWORD: secret MYSQL_DB: todos + + mysql: + image: mysql:8.0 + volumes: + - todo-mysql-data:/var/lib/mysql + environment: + MYSQL_ROOT_PASSWORD: secret + MYSQL_DATABASE: todos + +volumes: + todo-mysql-data: + From c111d675b555d10f71126717ff4697fbba0c7740 Mon Sep 17 00:00:00 2001 From: ThomasSheeba2504 Date: Tue, 12 Aug 2025 13:11:58 +0530 Subject: [PATCH 07/12] Rename compose.yml to compose.yaml --- compose.yml => compose.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename compose.yml => compose.yaml (100%) diff --git a/compose.yml b/compose.yaml similarity index 100% rename from compose.yml rename to compose.yaml From 7c556baf690326e69dd36f74671d63d593f2809b Mon Sep 17 00:00:00 2001 From: ThomasSheeba2504 Date: Tue, 12 Aug 2025 13:15:46 +0530 Subject: [PATCH 08/12] Update compose.yaml --- compose.yaml | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/compose.yaml b/compose.yaml index 888e48fb5..c5ee1c048 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,19 +1,19 @@ services: app: image: node:18-alpine - command: sh -c "yarn install && yarn run dev" - ports: - - 127.0.0.1:3000:3000 - working_dir: /app - volumes: - - ./:/app - environment: - MYSQL_HOST: mysql - MYSQL_USER: root - MYSQL_PASSWORD: secret - MYSQL_DB: todos + command: sh -c "yarn install && yarn run dev" + ports: + - 127.0.0.1:3000:3000 + working_dir: /app + volumes: + - ./:/app + environment: + MYSQL_HOST: mysql + MYSQL_USER: root + MYSQL_PASSWORD: secret + MYSQL_DB: todos - mysql: + mysql: image: mysql:8.0 volumes: - todo-mysql-data:/var/lib/mysql @@ -23,6 +23,3 @@ services: volumes: todo-mysql-data: - - - From 67c4b9296a42e70f3f0af8ed736305b1a4a19a14 Mon Sep 17 00:00:00 2001 From: ThomasSheeba2504 Date: Tue, 12 Aug 2025 13:20:48 +0530 Subject: [PATCH 09/12] Update compose.yaml --- compose.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/compose.yaml b/compose.yaml index c5ee1c048..9f3810b33 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,5 +1,6 @@ services: app: + app: image: node:18-alpine command: sh -c "yarn install && yarn run dev" ports: From c9932eda7c22243ae632bcf87701c08fa77f9a72 Mon Sep 17 00:00:00 2001 From: ThomasSheeba2504 Date: Tue, 12 Aug 2025 13:21:35 +0530 Subject: [PATCH 10/12] Update compose.yaml --- compose.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/compose.yaml b/compose.yaml index 9f3810b33..c5ee1c048 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,6 +1,5 @@ services: app: - app: image: node:18-alpine command: sh -c "yarn install && yarn run dev" ports: From 15b2c20ec9661f20b85746d7c0907b07a90ef28d Mon Sep 17 00:00:00 2001 From: ThomasSheeba2504 Date: Tue, 12 Aug 2025 13:23:43 +0530 Subject: [PATCH 11/12] Update dockerfile --- dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dockerfile b/dockerfile index 362fb439a..b6a70bac0 100644 --- a/dockerfile +++ b/dockerfile @@ -1,6 +1,6 @@ FROM node:lts-alpine WORKDIR /app -COPY . . +COPY package.json yarn.lock ./ RUN yarn install --production +COPY . . CMD ["node", "src/index.js"] -EXPOSE 3000 From aa5982a5e924bbef1f8c2e4baa0dadc1e3304155 Mon Sep 17 00:00:00 2001 From: ThomasSheeba2504 Date: Tue, 12 Aug 2025 13:25:17 +0530 Subject: [PATCH 12/12] Update index.html --- src/static/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/static/index.html b/src/static/index.html index 3f6fb5be0..99810c874 100644 --- a/src/static/index.html +++ b/src/static/index.html @@ -8,7 +8,7 @@ - Todo App + Todo Awesome todo App