Add Dockerfile and docker-compose.yml
This commit is contained in:
parent
9372fe8f02
commit
6f6a2d1ac5
3 changed files with 33 additions and 1 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -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
|
||||
18
Dockerfile
Normal file
18
Dockerfile
Normal 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
14
docker-compose.yml
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue