From a666e59df3b570cdcbbb22b287343159915e959f Mon Sep 17 00:00:00 2001 From: peter6055 <59694246+peter6055@users.noreply.github.com> Date: Sat, 22 Nov 2025 14:23:17 +1100 Subject: [PATCH 1/5] chore: deploy by docker --- .dockerignore | 14 ++++++++++++++ Dockerfile | 13 +++++++++++++ README.md | 9 ++++++++- 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..fb3316c --- /dev/null +++ b/.dockerignore @@ -0,0 +1,14 @@ +node_modules +.git +*.log +dist +.vscode +.idea +*.swp +*.swo +*~ +.DS_Store +.env.local +.env.*.local +coverage +.cache \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cf09d10 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM node:18-alpine AS builder +WORKDIR /app +COPY package*.json ./ +RUN npm ci +COPY . . +RUN npm run build + +FROM node:18-alpine AS runner +WORKDIR /app +RUN npm install -g serve +COPY --from=builder /app/dist ./dist +EXPOSE 3000 +CMD ["serve", "-s", "dist", "-l", "3000"] \ No newline at end of file diff --git a/README.md b/README.md index 40a34fd..50ba72f 100644 --- a/README.md +++ b/README.md @@ -64,4 +64,11 @@ The app is lightweight and run entirely on your client-side, ensures a seamless - JWT Decoder - SQL Formatter - Unix Timestamp Parser -- Cron Expression Parser \ No newline at end of file +- Cron Expression Parser + +### Deployment +The app is built with [Vite](https://vitejs.dev/) and [React](https://reactjs.org/). To run it locally, follow these steps: +1. Clone the repository +2. Run `docker build -t truedevtools .` to build the Docker image +3. Run `docker run -p 3000:3000 truedevtools` to start the container +4. Open `http://localhost:3000` in your browser \ No newline at end of file From 535ff5b237c4d37c51c6c1b0d73004570ce18856 Mon Sep 17 00:00:00 2001 From: peter6055 <59694246+peter6055@users.noreply.github.com> Date: Sat, 22 Nov 2025 14:25:07 +1100 Subject: [PATCH 2/5] doc: updates readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 50ba72f..3b9bdaa 100644 --- a/README.md +++ b/README.md @@ -70,5 +70,5 @@ The app is lightweight and run entirely on your client-side, ensures a seamless The app is built with [Vite](https://vitejs.dev/) and [React](https://reactjs.org/). To run it locally, follow these steps: 1. Clone the repository 2. Run `docker build -t truedevtools .` to build the Docker image -3. Run `docker run -p 3000:3000 truedevtools` to start the container +3. Run `docker run -d --restart always -p 3000:3000 --name truedevtools truedevtools` to start the container 4. Open `http://localhost:3000` in your browser \ No newline at end of file From f411ca7486a927f5912636fbe41e8a9243a1b110 Mon Sep 17 00:00:00 2001 From: peter6055 <59694246+peter6055@users.noreply.github.com> Date: Sat, 22 Nov 2025 14:25:35 +1100 Subject: [PATCH 3/5] doc: updates readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3b9bdaa..af0f05a 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ The app is lightweight and run entirely on your client-side, ensures a seamless - Cron Expression Parser ### Deployment -The app is built with [Vite](https://vitejs.dev/) and [React](https://reactjs.org/). To run it locally, follow these steps: +The app is built with [Vite](https://vitejs.dev/) and [React](https://reactjs.org/). To deploy it on your own server, follow these steps: 1. Clone the repository 2. Run `docker build -t truedevtools .` to build the Docker image 3. Run `docker run -d --restart always -p 3000:3000 --name truedevtools truedevtools` to start the container From f65b3f19b906a88c427b390c8c4a8b9d3f616071 Mon Sep 17 00:00:00 2001 From: peter6055 <59694246+peter6055@users.noreply.github.com> Date: Sat, 22 Nov 2025 14:30:23 +1100 Subject: [PATCH 4/5] chore: introduces docker compose --- README.md | 8 +++++++- docker-compose.yml | 25 +++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 docker-compose.yml diff --git a/README.md b/README.md index af0f05a..8f9efcc 100644 --- a/README.md +++ b/README.md @@ -67,8 +67,14 @@ The app is lightweight and run entirely on your client-side, ensures a seamless - Cron Expression Parser ### Deployment +#### Use docker The app is built with [Vite](https://vitejs.dev/) and [React](https://reactjs.org/). To deploy it on your own server, follow these steps: 1. Clone the repository 2. Run `docker build -t truedevtools .` to build the Docker image 3. Run `docker run -d --restart always -p 3000:3000 --name truedevtools truedevtools` to start the container -4. Open `http://localhost:3000` in your browser \ No newline at end of file +4. Open `http://localhost:3000` in your browser + +#### Use docker-compose +1. Clone the repository +2. Run `docker-compose up -d --build` to build and start the container +3. Open `http://localhost:3000` in your browser diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..e5e350f --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,25 @@ +version: '3.8' + +services: + truedevtools: + build: + context: . + dockerfile: Dockerfile + container_name: truedevtools + restart: always + ports: + - "3000:3000" + environment: + - NODE_ENV=production + healthcheck: + test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 40s + logging: + driver: "json-file" + options: + max-size: "10m" + max-file: "3" + From b4b8100dd866cb2a26ad19a0531673e73d09768d Mon Sep 17 00:00:00 2001 From: peter6055 <59694246+peter6055@users.noreply.github.com> Date: Sat, 22 Nov 2025 14:33:56 +1100 Subject: [PATCH 5/5] doc: fix incorrect readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8f9efcc..7d29c45 100644 --- a/README.md +++ b/README.md @@ -76,5 +76,5 @@ The app is built with [Vite](https://vitejs.dev/) and [React](https://reactjs.or #### Use docker-compose 1. Clone the repository -2. Run `docker-compose up -d --build` to build and start the container +2. Run `docker compose up -d --build` to build and start the container 3. Open `http://localhost:3000` in your browser