From 76e42d418ac323c4edb06307ba2fc3bd4f4f7835 Mon Sep 17 00:00:00 2001 From: Ben Firshman Date: Thu, 7 Aug 2014 13:38:20 -0700 Subject: [PATCH] update --- cli.html | 7 +++---- django.html | 24 +++++++++++------------- env.html | 7 +++---- index.html | 13 ++++++------- install.html | 7 +++---- rails.html | 9 ++++----- wordpress.html | 7 +++---- yml.html | 7 +++---- 8 files changed, 36 insertions(+), 45 deletions(-) diff --git a/cli.html b/cli.html index a4114fa4..44a8a623 100644 --- a/cli.html +++ b/cli.html @@ -6,7 +6,7 @@ - + @@ -119,11 +119,10 @@ For example:

-

Fig is a project from Orchard, a Docker hosting service.

-

Follow us on Twitter to keep up to date with Fig and other Docker news.

+

Fig is a project from Docker.

diff --git a/django.html b/django.html index 58abe5d5..8171b710 100644 --- a/django.html +++ b/django.html @@ -6,7 +6,7 @@ - + @@ -23,9 +23,8 @@

Let's use Fig to set up and run a Django/PostgreSQL app. Before starting, you'll need to have Fig installed.

Let's set up the three files that'll get us started. First, our app is going to be running inside a Docker container which contains all of its dependencies. We can define what goes inside that Docker container using a file called Dockerfile. It'll contain this to start with:

-
FROM orchardup/python:2.7
+
FROM python:2.7
 ENV PYTHONUNBUFFERED 1
-RUN apt-get update -qq && apt-get install -y python-psycopg2
 RUN mkdir /code
 WORKDIR /code
 ADD requirements.txt /code/
@@ -36,10 +35,11 @@ ADD . /code/
 
 

Second, we define our Python dependencies in a file called requirements.txt:

Django
+psycopg2
 

Simple enough. Finally, this is all tied together with a file called fig.yml. It describes the services that our app comprises of (a web server and database), what Docker images they use, how they link together, what volumes will be mounted inside the containers and what ports they expose.

db:
-  image: orchardup/postgresql
+  image: postgres
 web:
   build: .
   command: python manage.py runserver 0.0.0.0:8000
@@ -65,15 +65,14 @@ Dockerfile       fig.yml          figexample       manage.py        requirements
 
DATABASES = {
     'default': {
         'ENGINE': 'django.db.backends.postgresql_psycopg2',
-        'NAME': 'docker',
-        'USER': 'docker',
-        'PASSWORD': 'docker',
-        'HOST': os.environ.get('DB_1_PORT_5432_TCP_ADDR'),
-        'PORT': os.environ.get('DB_1_PORT_5432_TCP_PORT'),
+        'NAME': 'postgres',
+        'USER': 'postgres',
+        'HOST': 'db_1',
+        'PORT': 5432,
     }
 }
 
-

These settings are determined by the orchardup/postgresql Docker image we are using.

+

These settings are determined by the postgres Docker image we are using.

Then, run fig up:

Recreating myapp_db_1...
@@ -122,11 +121,10 @@ myapp_web_1 | Quit the server with CONTROL-C.
         
         
 
-        

Fig is a project from Orchard, a Docker hosting service.

-

Follow us on Twitter to keep up to date with Fig and other Docker news.

+

Fig is a project from Docker.

diff --git a/env.html b/env.html index 0ebecbe7..b478f2b2 100644 --- a/env.html +++ b/env.html @@ -6,7 +6,7 @@ - + @@ -68,11 +68,10 @@ Fully qualified container name, e.g. DB_1_NAME=/myapp_web_1/myapp_db_1 -

Fig is a project from Orchard, a Docker hosting service.

-

Follow us on Twitter to keep up to date with Fig and other Docker news.

+

Fig is a project from Docker.

diff --git a/index.html b/index.html index 8ef5a6db..46e39bc2 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,7 @@ - + @@ -21,7 +21,7 @@

Fast, isolated development environments using Docker.

Define your app's environment with Docker so it can be reproduced anywhere:

-
FROM orchardup/python:2.7
+
FROM python:2.7
 ADD . /code
 WORKDIR /code
 RUN pip install -r requirements.txt
@@ -35,7 +35,7 @@ RUN pip install -r requirements.txt
   ports:
    - "8000:8000"
 db:
-  image: orchardup/postgresql
+  image: postgres
 

(No more installing Postgres on your laptop!)

@@ -138,7 +138,7 @@ figtest_web_1 /bin/sh -c python app.py Up 5000->5000/tcp

If you started Fig with fig up -d, you'll probably want to stop your services once you've finished with them:

$ fig stop
 
-

That's more-or-less how Fig works. See the reference section below for full details on the commands, configuration file and environment variables. If you have any thoughts or suggestions, open an issue on GitHub or email us.

+

That's more-or-less how Fig works. See the reference section below for full details on the commands, configuration file and environment variables. If you have any thoughts or suggestions, open an issue on GitHub.