add docker support

This commit is contained in:
2025-10-05 04:19:26 -07:00
parent cdba7de935
commit e1da9cbb4e
4 changed files with 87 additions and 1 deletions

30
.dockerignore Normal file
View File

@@ -0,0 +1,30 @@
# Dependencies
node_modules
npm-debug.log*
# Git
.git
.gitignore
# Docker
Dockerfile
.dockerignore
# Development files
*.log
.env
.env.local
# OS generated files
.DS_Store
Thumbs.db
# IDE files
.vscode/
.idea/
*.swp
*.swo
# Cache directories
.npm
.cache

20
Dockerfile Normal file
View File

@@ -0,0 +1,20 @@
# Use Node.js official image
FROM node:lts-alpine
# Set working directory
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm ci --only=production
# Copy application files
COPY . .
# Expose port
EXPOSE 3000
# Start the application
CMD ["npm", "start"]

View File

@@ -13,6 +13,18 @@ An intelligent automation bot for the zyBooks learning platform. Automatically c
## Quick Start
### Option 1: Docker (Recommended)
**Prerequisites:** Docker and Docker Compose
```bash
git clone https://git.qzydustin.com/qzydustin/zyBooksBot
cd zyBooksBot
docker-compose up -d
```
### Option 2: Local Development
**Prerequisites:** Node.js (v14+)
```bash
@@ -31,11 +43,28 @@ Open http://localhost:3000 in your browser.
3. Use checkboxes for batch selection
4. Execute and monitor real-time progress
## Docker Commands
```bash
# Start the application
docker-compose up -d
# View logs
docker-compose logs -f
# Stop the application
docker-compose down
# Rebuild after code changes
docker-compose up --build -d
```
## Technical Details
**Stack:** Node.js, Express.js, JavaScript
**Communication:** HTTP API with Server-Sent Events
**Key Features:** Real-time streaming, frontend state management
**Key Features:** Real-time streaming, frontend state management
**Deployment:** Docker containerized with health checks
## Important Notes

7
compose.yml Normal file
View File

@@ -0,0 +1,7 @@
services:
zybook-auto:
build: .
ports:
- "3000:3000"
restart: unless-stopped