Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mcotton-v1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
mCotton
mcotton-v1
Commits
c9929e66
Commit
c9929e66
authored
Dec 08, 2016
by
Hao Chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Docker build info to README
parent
a621080f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
9 deletions
+55
-9
workspace.xml
.idea/workspace.xml
+0
-0
README.md
README.md
+55
-9
No files found.
.idea/workspace.xml
View file @
c9929e66
This diff is collapsed.
Click to expand it.
README.md
View file @
c9929e66
...
...
@@ -106,12 +106,58 @@ If you want to set your admin, you can change the file : /app/server/fixtures.js
详情参见
[
egg.md
](
docs/egg.md
)
# Docker build
docker build -t mcotton_v1 .
# Docker run
docker run -d -p 27017:27017 --name mymongo -v $(cd ~ && pwd)/data/mongo:/data mongo
# Docker
## 开机后启动服务:
docker start mymongo
docker start mcotton_v1
docker exec -it mcotton_v1 bash
> cd mcotton-v1
> ./start_mcotton.sh
## 环境重建
**本节内容用于mCotton系统毁坏后的创建,如非必要,请不要执行**
### 重建 Mongo Docker
docker pull mongo
docker stop mymongo
docker rm mymongo
docker run -d -p 27017:27017 --name mymongo -v $(cd ~ && pwd)/data/mongo:/data mongo
### 重新构建 mCotton Docker
cd ~/workshops/mcotton-v1
git clone https://git.microduino.cn/mCotton/mcotton-v1.git
git reset --hard HEAD
git pull
docker build -t mcotton_v1 .
### 运行 mcotton_v1 Docker
docker stop mcotton_v1
docker rm mcotton_v1
docker run -d -p 80:3000 -p 1883:1883 --link mymongo:mongodb --name mcotton_v1 -w /data mcotton_v1
docker exec -it mcotton_v1 bash
> cd mcotton-v1
> meteor npm install --save bcrypt
> ./start_mcotton.sh
### 推送 docker 到 hub.microduino.cn
docker login -u %user% -p %password% hub.microduino.cn
docker run -d -p 3000:3000 -p 1883:1883 --link mymongo:mongodb --name mcotton_v1 -v $(cd ~ && pwd)/data/mcotton_v1:/data -w /data mcotton_v1
\ No newline at end of file
docker commit mcotton_v1 mcotton_v1
docker tag mcotton_v1 hub.microduino.cn/mcotton/mcotton_v1
docker push hub.microduino.cn/mcotton/mcotton_v1
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment