This commit is contained in:
Ben Firshman 2014-01-28 12:46:16 +00:00
commit aa18d51760
8 changed files with 13 additions and 11 deletions

View file

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href='http://fonts.googleapis.com/css?family=Lilita+One|Lato:300,400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/fig.css?20140128041078430247910">
<link rel="stylesheet" type="text/css" href="css/fig.css?20140128041233288693912">
</head>
<body>
<div class="container">

View file

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href='http://fonts.googleapis.com/css?family=Lilita+One|Lato:300,400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/fig.css?20140128041078430247910">
<link rel="stylesheet" type="text/css" href="css/fig.css?20140128041233288693912">
</head>
<body>
<div class="container">
@ -29,7 +29,7 @@ ADD requirements.txt /code/
RUN pip install -r requirements.txt
ADD . /code/
</code></pre></div>
<p>That&#39;ll install our application inside an image with Python installed alongside all of our Python dependencies.</p>
<p>That&#39;ll install our application inside an image with Python installed alongside all of our Python dependencies. For more information on how to write Dockerfiles, see the <a href="https://www.docker.io/learn/dockerfile/">Dockerfile tutorial</a> and the <a href="http://docs.docker.io/en/latest/use/builder/">Dockerfile reference</a>.</p>
<p>Second, we define our Python dependencies in a file called <code>requirements.txt</code>:</p>
<div class="highlight"><pre><code class="text language-text" data-lang="text">Django
@ -90,7 +90,7 @@ myapp_web_1 | Django version 1.6.1, using settings &#39;figexample.settings&#39;
myapp_web_1 | Starting development server at http://0.0.0.0:8000/
myapp_web_1 | Quit the server with CONTROL-C.
</code></pre></div>
<p>And your Django app should be running at localhost:3000 (or localdocker:3000 if you&#39;re using docker-osx).</p>
<p>And your Django app should be running at <a href="http://localhost:8000">localhost:8000</a> (or <a href="http://localdocker:8000">localdocker:8000</a> if you&#39;re using docker-osx).</p>
<p>You can also run management commands with Docker. To set up your database, for example, run <code>fig up</code> and in another terminal run:</p>
<div class="highlight"><pre><code class="text language-text" data-lang="text">$ fig run web python manage.py syncdb

View file

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href='http://fonts.googleapis.com/css?family=Lilita+One|Lato:300,400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/fig.css?20140128041078430247910">
<link rel="stylesheet" type="text/css" href="css/fig.css?20140128041233288693912">
</head>
<body>
<div class="container">

View file

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href='http://fonts.googleapis.com/css?family=Lilita+One|Lato:300,400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/fig.css?20140128041078430247910">
<link rel="stylesheet" type="text/css" href="css/fig.css?20140128041233288693912">
</head>
<body>
<div class="container">

View file

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href='http://fonts.googleapis.com/css?family=Lilita+One|Lato:300,400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/fig.css?20140128041078430247910">
<link rel="stylesheet" type="text/css" href="css/fig.css?20140128041233288693912">
</head>
<body>
<div class="container">

View file

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href='http://fonts.googleapis.com/css?family=Lilita+One|Lato:300,400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/fig.css?20140128041078430247910">
<link rel="stylesheet" type="text/css" href="css/fig.css?20140128041233288693912">
</head>
<body>
<div class="container">
@ -30,7 +30,7 @@ ADD Gemfile /myapp/Gemfile
RUN bundle install
ADD . /myapp
</code></pre></div>
<p>That&#39;ll put our application code inside an image with Ruby, Bundler and all our dependencies.</p>
<p>That&#39;ll put our application code inside an image with Ruby, Bundler and all our dependencies. For more information on how to write Dockerfiles, see the <a href="https://www.docker.io/learn/dockerfile/">Dockerfile tutorial</a> and the <a href="http://docs.docker.io/en/latest/use/builder/">Dockerfile reference</a>.</p>
<p>Next, we have a bootstrap <code>Gemfile</code> which just loads Rails. It&#39;ll be overwritten in a moment by <code>rails new</code>.</p>
<div class="highlight"><pre><code class="text language-text" data-lang="text">source &#39;https://rubygems.org&#39;

View file

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href='http://fonts.googleapis.com/css?family=Lilita+One|Lato:300,400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/fig.css?20140128041078430247910">
<link rel="stylesheet" type="text/css" href="css/fig.css?20140128041233288693912">
</head>
<body>
<div class="container">
@ -28,6 +28,8 @@ ADD wp-config.php /wordpress/wp-config.php
ADD router.php /router.php
</code></pre></div>
<p>This instructs Docker on how to build an image that contains PHP and Wordpress. For more information on how to write Dockerfiles, see the <a href="https://www.docker.io/learn/dockerfile/">Dockerfile tutorial</a> and the <a href="http://docs.docker.io/en/latest/use/builder/">Dockerfile reference</a>.</p>
<p>Next up, <code>fig.yml</code> starts our web service and a separate MySQL instance:</p>
<div class="highlight"><pre><code class="text language-text" data-lang="text">web:
build: .

View file

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href='http://fonts.googleapis.com/css?family=Lilita+One|Lato:300,400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/fig.css?20140128041078430247910">
<link rel="stylesheet" type="text/css" href="css/fig.css?20140128041233288693912">
</head>
<body>
<div class="container">