Add Dockerfile and docker-compose.yml

This commit is contained in:
Caileb 2025-05-29 14:34:06 -05:00
parent 9372fe8f02
commit 6f6a2d1ac5
3 changed files with 33 additions and 1 deletions

2
.gitignore vendored
View file

@ -41,5 +41,5 @@ db
# ignore all TOML files…
*.toml
# ...but dont ignore the example files
# ...but don't ignore the example files
!*.toml.example

18
Dockerfile Normal file
View file

@ -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"]

14
docker-compose.yml Normal file
View file

@ -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