update
This commit is contained in:
parent
2541807dfd
commit
f43783e1bf
8 changed files with 31 additions and 15 deletions
11
cli.html
11
cli.html
|
|
@ -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?20140618241628695887053">
|
||||
<link rel="stylesheet" type="text/css" href="css/fig.css?20140711272072728909035">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
|
|
@ -56,13 +56,16 @@
|
|||
<p>For example:</p>
|
||||
<div class="highlight"><pre><code class="text language-text" data-lang="text">$ fig run web python manage.py shell
|
||||
</code></pre></div>
|
||||
<p>Note that this will not start any services that the command's service links to. So if, for example, your one-off command talks to your database, you will need to run <code>fig up -d db</code> first.</p>
|
||||
<p>By default, linked services will be started, unless they are already running.</p>
|
||||
|
||||
<p>One-off commands are started in new containers with the same config as a normal container for that service, so volumes, links, etc will all be created as expected. The only thing different to a normal container is the command will be overridden with the one specified and no ports will be created in case they collide.</p>
|
||||
|
||||
<p>Links are also created between one-off commands and the other containers for that service so you can do stuff like this:</p>
|
||||
<div class="highlight"><pre><code class="text language-text" data-lang="text">$ fig run db /bin/sh -c "psql -h \$DB_1_PORT_5432_TCP_ADDR -U docker"
|
||||
</code></pre></div>
|
||||
<p>If you do not want linked containers to be started when running the one-off command, specify the <code>--no-deps</code> flag:</p>
|
||||
<div class="highlight"><pre><code class="text language-text" data-lang="text">$ fig run --no-deps web python manage.py shell
|
||||
</code></pre></div>
|
||||
<h2>scale</h2>
|
||||
|
||||
<p>Set number of containers to run for a service.</p>
|
||||
|
|
@ -83,9 +86,11 @@ For example:</p>
|
|||
|
||||
<p>Build, (re)create, start and attach to containers for a service.</p>
|
||||
|
||||
<p>Linked services will be started, unless they are already running.</p>
|
||||
|
||||
<p>By default, <code>fig up</code> will aggregate the output of each container, and when it exits, all containers will be stopped. If you run <code>fig up -d</code>, it'll start the containers in the background and leave them running.</p>
|
||||
|
||||
<p>If there are existing containers for a service, <code>fig up</code> will stop and recreate them (preserving mounted volumes with <a href="http://docs.docker.io/en/latest/use/working_with_volumes/">volumes-from</a>), so that changes in <code>fig.yml</code> are picked up.</p>
|
||||
<p>By default if there are existing containers for a service, <code>fig up</code> will stop and recreate them (preserving mounted volumes with <a href="http://docs.docker.io/en/latest/use/working_with_volumes/">volumes-from</a>), so that changes in <code>fig.yml</code> are picked up. If you do no want containers to be stopped and recreated, use <code>fig up --no-recreate</code>. This will still start any stopped containers, if needed.</p>
|
||||
</div>
|
||||
|
||||
<div class="sidebar">
|
||||
|
|
|
|||
|
|
@ -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?20140618241628695887053">
|
||||
<link rel="stylesheet" type="text/css" href="css/fig.css?20140711272072728909035">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
|
|
|
|||
2
env.html
2
env.html
|
|
@ -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?20140618241628695887053">
|
||||
<link rel="stylesheet" type="text/css" href="css/fig.css?20140711272072728909035">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
|
|
|
|||
|
|
@ -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?20140618241628695887053">
|
||||
<link rel="stylesheet" type="text/css" href="css/fig.css?20140711272072728909035">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
|
|
@ -117,8 +117,8 @@ Pulling image orchardup/redis...
|
|||
Building web...
|
||||
Starting figtest_redis_1...
|
||||
Starting figtest_web_1...
|
||||
figtest_redis_1 | [8] 02 Jan 18:43:35.576 # Server started, Redis version 2.8.3
|
||||
figtest_web_1 | * Running on http://0.0.0.0:5000/
|
||||
redis_1 | [8] 02 Jan 18:43:35.576 # Server started, Redis version 2.8.3
|
||||
web_1 | * Running on http://0.0.0.0:5000/
|
||||
</code></pre></div>
|
||||
<p>Open up <a href="http://localhost:5000">http://localhost:5000</a> in your browser (or <a href="http://localdocker:5000">http://localdocker:5000</a> if you're using <a href="https://github.com/noplay/docker-osx">docker-osx</a>) and you should see it running!</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -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?20140618241628695887053">
|
||||
<link rel="stylesheet" type="text/css" href="css/fig.css?20140711272072728909035">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
|
|
@ -27,11 +27,11 @@ $ docker-osx shell
|
|||
<p>Docker has guides for <a href="http://docs.docker.io/en/latest/installation/ubuntulinux/">Ubuntu</a> and <a href="http://docs.docker.io/en/latest/installation/">other platforms</a> in their documentation.</p>
|
||||
|
||||
<p>Next, install Fig. On OS X:</p>
|
||||
<div class="highlight"><pre><code class="text language-text" data-lang="text">$ curl -L https://github.com/orchardup/fig/releases/download/0.4.2/darwin > /usr/local/bin/fig
|
||||
<div class="highlight"><pre><code class="text language-text" data-lang="text">$ curl -L https://github.com/orchardup/fig/releases/download/0.5.0/darwin > /usr/local/bin/fig
|
||||
$ chmod +x /usr/local/bin/fig
|
||||
</code></pre></div>
|
||||
<p>On 64-bit Linux:</p>
|
||||
<div class="highlight"><pre><code class="text language-text" data-lang="text">$ curl -L https://github.com/orchardup/fig/releases/download/0.4.2/linux > /usr/local/bin/fig
|
||||
<div class="highlight"><pre><code class="text language-text" data-lang="text">$ curl -L https://github.com/orchardup/fig/releases/download/0.5.0/linux > /usr/local/bin/fig
|
||||
$ chmod +x /usr/local/bin/fig
|
||||
</code></pre></div>
|
||||
<p>Fig is also available as a Python package if you're on another platform (or if you prefer that sort of thing):</p>
|
||||
|
|
|
|||
|
|
@ -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?20140618241628695887053">
|
||||
<link rel="stylesheet" type="text/css" href="css/fig.css?20140711272072728909035">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
|
|
|
|||
|
|
@ -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?20140618241628695887053">
|
||||
<link rel="stylesheet" type="text/css" href="css/fig.css?20140711272072728909035">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
|
|
|
|||
15
yml.html
15
yml.html
|
|
@ -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?20140618241628695887053">
|
||||
<link rel="stylesheet" type="text/css" href="css/fig.css?20140711272072728909035">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
|
|
@ -65,10 +65,21 @@
|
|||
<span class="l-Scalar-Plain">volumes</span><span class="p-Indicator">:</span>
|
||||
<span class="p-Indicator">-</span> <span class="l-Scalar-Plain">cache/:/tmp/cache</span>
|
||||
|
||||
<span class="l-Scalar-Plain">-- Mount all of the volumes from another service or container</span>
|
||||
<span class="l-Scalar-Plain">volumes_from</span><span class="p-Indicator">:</span>
|
||||
<span class="p-Indicator">-</span> <span class="l-Scalar-Plain">service_name</span>
|
||||
<span class="p-Indicator">-</span> <span class="l-Scalar-Plain">container_name</span>
|
||||
|
||||
<span class="l-Scalar-Plain">-- Add environment variables.</span>
|
||||
<span class="l-Scalar-Plain">-- Environment variables with only a key are resolved to values on the host</span>
|
||||
<span class="l-Scalar-Plain">-- machine, which can be helpful for secret or host-specific values.</span>
|
||||
<span class="l-Scalar-Plain">environment</span><span class="p-Indicator">:</span>
|
||||
<span class="l-Scalar-Plain">RACK_ENV</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">development</span>
|
||||
</code></pre></div></div>
|
||||
<span class="l-Scalar-Plain">SESSION_SECRET</span><span class="p-Indicator">:</span>
|
||||
</code></pre></div>
|
||||
<p>-- Networking mode. Use the same values as the docker client --net parameter
|
||||
net: "host"</p>
|
||||
</div>
|
||||
|
||||
<div class="sidebar">
|
||||
<h1 class="logo">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue