Browse Source

Rejig introduction

Signed-off-by: Aanand Prasad <[email protected]>
Aanand Prasad 11 years ago
parent
commit
5e8bcd2d29
2 changed files with 46 additions and 38 deletions
  1. 29 19
      README.md
  2. 17 19
      docs/index.md

+ 29 - 19
README.md

@@ -3,17 +3,30 @@ Docker Compose
 
 
 [![wercker status](https://app.wercker.com/status/d5dbac3907301c3d5ce735e2d5e95a5b/s/master "wercker status")](https://app.wercker.com/project/bykey/d5dbac3907301c3d5ce735e2d5e95a5b)
 [![wercker status](https://app.wercker.com/status/d5dbac3907301c3d5ce735e2d5e95a5b/s/master "wercker status")](https://app.wercker.com/project/bykey/d5dbac3907301c3d5ce735e2d5e95a5b)
 
 
-Fast, isolated development environments using Docker.
-
-Define your app's environment with Docker so it can be reproduced anywhere:
-
-    FROM python:2.7
-    ADD . /code
-    WORKDIR /code
-    RUN pip install -r requirements.txt
-    CMD python app.py
+Compose is a tool for defining and running complex applications with Docker.
+With Compose, you define a multi-container application in a single file, then
+spin your application up in a single command which does everything that needs to
+be done to get it running.
+
+Compose is great for development environments, staging servers, and CI. We don't
+recommend that you use it in production yet.
+
+Using Compose is basically a three-step process.
+
+First, you define your app's environment with a `Dockerfile` so it can be
+reproduced anywhere:
+
+```Dockerfile
+FROM python:2.7
+WORKDIR /code
+ADD requirements.txt /code/
+RUN pip install -r requirements.txt
+ADD . /code
+CMD python app.py
+```
 
 
-Define the services that make up your app so they can be run together in an isolated environment:
+Next, you define the services that make up your app in `docker-compose.yml` so
+they can be run together in an isolated environment:
 
 
 ```yaml
 ```yaml
 web:
 web:
@@ -22,21 +35,18 @@ web:
    - db
    - db
   ports:
   ports:
    - "8000:8000"
    - "8000:8000"
-   - "49100:22"
 db:
 db:
   image: postgres
   image: postgres
 ```
 ```
 
 
-(No more installing Postgres on your laptop!)
-
-Then type `docker-compose up`, and Compose will start and run your entire app.
+Lastly, run `docker-compose up` and Compose will start and run your entire app.
 
 
-There are commands to:
+Compose has commands for managing the whole lifecycle of your application:
 
 
- - start, stop and rebuild services
- - view the status of running services
- - tail running services' log output
- - run a one-off command on a service
+ * Start, stop and rebuild services
+ * View the status of running services
+ * Stream the log output of running services
+ * Run a one-off command on a service
 
 
 Installation and documentation
 Installation and documentation
 ------------------------------
 ------------------------------

+ 17 - 19
docs/index.md

@@ -5,26 +5,27 @@ page_keywords: documentation, docs,  docker, compose, orchestration, containers
 
 
 ## Overview
 ## Overview
 
 
-Compose is a tool that allows you to orchestrate multiple Docker containers.
-With Compose, you can build clusters of containers which provide the resources
-(services, volumes, etc.) needed to build and run a complete distributed
-application.
+Compose is a tool for defining and running complex applications with Docker.
+With Compose, you define a multi-container application in a single file, then
+spin your application up in a single command which does everything that needs to
+be done to get it running.
 
 
-You can use Compose to build your app with containers hosted locally, or on a
-remote server, including cloud-based instances - anywhere a Docker daemon can
-run. Its primary use case is for development environments, but it can be used
-just as easily for staging or CI.
+Compose is great for development environments, staging servers, and CI. We don't
+recommend that you use it in production yet.
 
 
 Using Compose is basically a three-step process.
 Using Compose is basically a three-step process.
 
 
 First, you define your app's environment with a `Dockerfile` so it can be
 First, you define your app's environment with a `Dockerfile` so it can be
 reproduced anywhere:
 reproduced anywhere:
 
 
-    FROM python:2.7
-    WORKDIR /code
-    ADD requirements.txt /code/
-    RUN pip install -r requirements.txt
-    ADD . /code
+```Dockerfile
+FROM python:2.7
+WORKDIR /code
+ADD requirements.txt /code/
+RUN pip install -r requirements.txt
+ADD . /code
+CMD python app.py
+```
 
 
 Next, you define the services that make up your app in `docker-compose.yml` so
 Next, you define the services that make up your app in `docker-compose.yml` so
 they can be run together in an isolated environment:
 they can be run together in an isolated environment:
@@ -32,7 +33,6 @@ they can be run together in an isolated environment:
 ```yaml
 ```yaml
 web:
 web:
   build: .
   build: .
-  command: python app.py
   links:
   links:
    - db
    - db
   ports:
   ports:
@@ -41,16 +41,14 @@ db:
   image: postgres
   image: postgres
 ```
 ```
 
 
-(No more installing Postgres on your laptop!)
-
 Lastly, run `docker-compose up` and Compose will start and run your entire app.
 Lastly, run `docker-compose up` and Compose will start and run your entire app.
 
 
-Compose includes commands to:
+Compose has commands for managing the whole lifecycle of your application:
 
 
  * Start, stop and rebuild services
  * Start, stop and rebuild services
  * View the status of running services
  * View the status of running services
- * tail the log output of running services
- * run a one-off command on a service
+ * Stream the log output of running services
+ * Run a one-off command on a service
 
 
 
 
 ## Quick start
 ## Quick start