Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7bf8fc0

Browse files
add CD flow, use docker machine to create vm using digitalocean driver and deploy app
1 parent 0ba9a3c commit 7bf8fc0

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

‎README.md‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,4 +166,17 @@ Introduction to Continuous Integration(Github and CircleCI)
166166
```
167167
> ssh-keygen -t rsa -b 4096 -C "your_email@example.com" (genrate ssh key)
168168
> cat ~/.ssh/id_rsa.pub
169+
```
170+
![alt text](https://github.com/smalltide/docker-tutorial-devops/blob/master/img/ci-flow.png "ci-flow")
171+
172+
use docker machine to create vm using digitalocean driver and deploy app
173+
```
174+
> docker-machine create --driver digitalocean --digitalocean-access-token <DigitalOcean API ACCESS TOKEN> dockerapp-vm
175+
> docker-machine ls
176+
> docker-machine env dockerapp-vm
177+
> eval $(docker-machine env dockerapp-vm)
178+
> docker info (now see docker client connect to digitalocean)
179+
> cp docker-compose.yml prod.yml
180+
> revise "build: ." to "image: smalltides/dockerapp' in rod.yml
181+
> docker-compose -f prod.yml up -d
169182
```

‎img/ci-flow.png‎

209 KB
Loading[フレーム]

‎prod.yml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: "3.0"
2+
services:
3+
dockerapp:
4+
image: smalltides/dockerapp
5+
ports:
6+
- "5000:5000"
7+
depends_on:
8+
- redis
9+
redis:
10+
image: redis:3.2.0

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /