Files
droid2api/Dockerfile
1e0n ad862f73d1 Add Docker deployment support
- Add Dockerfile for containerization
- Add docker-compose.yml for easy deployment
- Add .dockerignore to optimize build
- Add .env.example for environment configuration
- Add DOCKER_DEPLOY.md with comprehensive deployment guide

Support for:
- Local Docker deployment
- Cloud platforms (Render, Railway, Fly.io, GCP, AWS)
- Persistent storage configuration
- Health checks and monitoring
2025-10-06 02:17:37 +08:00

24 lines
417 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 使用官方 Node.js 运行时作为基础镜像
FROM node:24-alpine
# 设置工作目录
WORKDIR /app
# 复制 package.json 和 package-lock.json
COPY package*.json ./
# 安装项目依赖
RUN npm ci --only=production
# 复制项目文件
COPY . .
# 暴露端口默认3000可通过环境变量覆盖
EXPOSE 3000
# 设置环境变量
ENV NODE_ENV=production
# 启动应用
CMD ["node", "server.js"]