Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
node_modules
.git
*.log
dist
.vscode
.idea
*.swp
*.swo
*~
.DS_Store
.env.local
.env.*.local
coverage
.cache
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,17 @@ The app is lightweight and run entirely on your client-side, ensures a seamless
- JWT Decoder
- SQL Formatter
- Unix Timestamp Parser
- Cron Expression Parser
- 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

#### 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
25 changes: 25 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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"