From 6f6a2d1ac55ca9d88fb80811e53c062610f5aa1b Mon Sep 17 00:00:00 2001 From: Caileb Date: Thu, 29 May 2025 14:34:06 -0500 Subject: [PATCH] Add Dockerfile and docker-compose.yml --- .gitignore | 2 +- Dockerfile | 18 ++++++++++++++++++ docker-compose.yml | 14 ++++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/.gitignore b/.gitignore index af735e0..cfd7161 100644 --- a/.gitignore +++ b/.gitignore @@ -41,5 +41,5 @@ db # ignore all TOML files… *.toml -# ...but don’t ignore the example files +# ...but don't ignore the example files !*.toml.example \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2ac3f2b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +# Dockerfile for the Node.js checkpoint service +FROM node:18-alpine + +# Set working directory +WORKDIR /app + +# Copy package files and install dependencies +COPY package.json package-lock.json ./ +RUN npm ci --only=production + +# Copy application source +COPY . . + +# Expose the application port +EXPOSE 3000 + +# Run the application +CMD ["npm", "start"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..7f1b39a --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,14 @@ +version: "3.8" + +services: + checkpoint: + build: . + container_name: checkpoint + volumes: + - ./data:/app/data + - ./db:/app/db + - ./config:/app/config + - ./.env:/app/.env:ro + ports: + - "3000:3000" + restart: unless-stopped \ No newline at end of file