# koa_docker_demo **Repository Path**: kuohaowu/koa_docker_demo ## Basic Information - **Project Name**: koa_docker_demo - **Description**: docker开发nodejs应用 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-11-07 - **Last Updated**: 2023-02-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # docker + koa + docker-compose > 使用docker方式开发nodejs应用 # 环境准备 在mac或者win的环境,请先安装docker-desktop,这样才能使用docker和docker-compose命令 ## 生成开发容器 开发环境使用nodemon,修改源码实时重启服务,无需手动重启 ```shell docker-compose -f docker-compose-dev.yml up -d ``` ## 生成生产容器 生产环境使用pm2作为nodejs守护进程 ```shell docker-compose -f docker-compose-prod.yml up -d ```