-
Notifications
You must be signed in to change notification settings - Fork 1
/
env.html
100 lines (83 loc) · 4.62 KB
/
env.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<!DOCTYPE html>
<html lang="en-gb">
<head>
<meta charset="utf-8">
<title>Fig environment variables reference</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href='https://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?20150226081472935746419">
<link rel="canonical" href="http://www.fig.sh/env.html">
</head>
<body>
<div class="container">
<nav class="deprecation">
<p>Fig has been replaced by Docker Compose, and is now deprecated. The new documentation is on the <a href="http://docs.docker.com/compose/env">Docker website</a>.</p>
</nav>
<div class="logo mobile-logo">
<a href="index.html">
<img src="img/logo.png">
Fig
</a>
</div>
<div class="content"><h1>Environment variables reference</h1>
<p><strong>Note:</strong> Environment variables are no longer the recommended method for connecting to linked services. Instead, you should use the link name (by default, the name of the linked service) as the hostname to connect to. See the <a href="yml.html#links">fig.yml documentation</a> for details.</p>
<p>Fig uses <a href="http://docs.docker.com/userguide/dockerlinks/">Docker links</a> to expose services' containers to one another. Each linked container injects a set of environment variables, each of which begins with the uppercase name of the container.</p>
<p>To see what environment variables are available to a service, run <code>fig run SERVICE env</code>.</p>
<p><b><i>name</i>_PORT</b><br>
Full URL, e.g. <code>DB_PORT=tcp://172.17.0.5:5432</code></p>
<p><b><i>name</i>_PORT_<i>num</i>_<i>protocol</i></b><br>
Full URL, e.g. <code>DB_PORT_5432_TCP=tcp://172.17.0.5:5432</code></p>
<p><b><i>name</i>_PORT_<i>num</i>_<i>protocol</i>_ADDR</b><br>
Container's IP address, e.g. <code>DB_PORT_5432_TCP_ADDR=172.17.0.5</code></p>
<p><b><i>name</i>_PORT_<i>num</i>_<i>protocol</i>_PORT</b><br>
Exposed port number, e.g. <code>DB_PORT_5432_TCP_PORT=5432</code></p>
<p><b><i>name</i>_PORT_<i>num</i>_<i>protocol</i>_PROTO</b><br>
Protocol (tcp or udp), e.g. <code>DB_PORT_5432_TCP_PROTO=tcp</code></p>
<p><b><i>name</i>_NAME</b><br>
Fully qualified container name, e.g. <code>DB_1_NAME=/myapp_web_1/myapp_db_1</code></p>
</div>
<div class="sidebar">
<h1 class="logo">
<a href="index.html">
<img src="img/logo.png">
Fig
</a>
</h1>
<ul class="nav">
<li><a href="index.html">Home</a></li>
<li><a href="install.html">Install</a></li>
<li><a href="rails.html">Get started with Rails</a></li>
<li><a href="django.html">Get started with Django</a></li>
<li><a href="wordpress.html">Get started with Wordpress</a></li>
</ul>
<ul class="nav">
<li>Reference:</li>
<ul>
<li><a href="yml.html">fig.yml</a></li>
<li><a href="cli.html">Commands</a></li>
<li><a href="env.html">Environment variables</a></li>
</ul>
</ul>
<ul class="nav">
<li><a href="https://github.com/docker/fig">Fig on GitHub</a></li>
<li><a href="http://webchat.freenode.net/?channels=%23docker-fig&uio=d4">#docker-fig on Freenode</a></li>
</ul>
<p>Fig is a project from <a href="https://www.docker.com">Docker</a>.</p>
<div class="badges">
<iframe src="https://ghbtns.com/github-btn.html?user=docker&repo=fig&type=watch&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="100" height="20"></iframe>
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://www.fig.sh/">Tweet</a>
</div>
</div>
</div>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-43996733-3', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>