add docker support
This commit is contained in:
30
.dockerignore
Normal file
30
.dockerignore
Normal 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
20
Dockerfile
Normal 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"]
|
||||||
31
README.md
31
README.md
@@ -13,6 +13,18 @@ An intelligent automation bot for the zyBooks learning platform. Automatically c
|
|||||||
|
|
||||||
## Quick Start
|
## 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+)
|
**Prerequisites:** Node.js (v14+)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -31,11 +43,28 @@ Open http://localhost:3000 in your browser.
|
|||||||
3. Use checkboxes for batch selection
|
3. Use checkboxes for batch selection
|
||||||
4. Execute and monitor real-time progress
|
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
|
## Technical Details
|
||||||
|
|
||||||
**Stack:** Node.js, Express.js, JavaScript
|
**Stack:** Node.js, Express.js, JavaScript
|
||||||
**Communication:** HTTP API with Server-Sent Events
|
**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
|
## Important Notes
|
||||||
|
|
||||||
|
|||||||
7
compose.yml
Normal file
7
compose.yml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
services:
|
||||||
|
zybook-auto:
|
||||||
|
build: .
|
||||||
|
ports:
|
||||||
|
- "3000:3000"
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
Reference in New Issue
Block a user