You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-19Lines changed: 19 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
-
Plum
1
+
Fig
2
2
====
3
3
4
4
**WARNING**: This is a work in progress and probably won't work yet. Feedback welcome.
5
5
6
-
Plum is tool for defining and running application environments with Docker. It uses a simple, version-controllable YAML configuration file that looks something like this:
6
+
Fig is tool for defining and running application environments with Docker. It uses a simple, version-controllable YAML configuration file that looks something like this:
7
7
8
8
```yaml
9
9
web:
@@ -20,13 +20,13 @@ Installing
20
20
----------
21
21
22
22
```bash
23
-
$ sudo pip install plum
23
+
$ sudo pip install fig
24
24
```
25
25
26
26
Defining your app
27
27
-----------------
28
28
29
-
Put a `plum.yml` in your app's directory. Each top-level key defines a "service", such as a web app, database or cache. For each service, Plum will start a Docker container, so at minimum it needs to know what image to use.
29
+
Put a `fig.yml` in your app's directory. Each top-level key defines a "service", such as a web app, database or cache. For each service, Fig will start a Docker container, so at minimum it needs to know what image to use.
30
30
31
31
The simplest way to get started is to just give it an image name:
32
32
@@ -35,34 +35,34 @@ db:
35
35
image: orchardup/postgresql
36
36
```
37
37
38
-
You've now given Plum the minimal amount of configuration it needs to run:
38
+
You've now given Fig the minimal amount of configuration it needs to run:
39
39
40
40
```bash
41
-
$ plum start
41
+
$ fig start
42
42
Pulling image orchardup/postgresql...
43
43
Starting myapp_db_1...
44
44
myapp_db_1 is running at 127.0.0.1:45678
45
45
<...output from postgresql server...>
46
46
```
47
47
48
-
For each service you've defined, Plum will start a Docker container with the specified image, building or pulling it if necessary. You now have a PostgreSQL server running at `127.0.0.1:45678`.
48
+
For each service you've defined, Fig will start a Docker container with the specified image, building or pulling it if necessary. You now have a PostgreSQL server running at `127.0.0.1:45678`.
49
49
50
-
By default, `plum start` will run until each container has shut down, and relay their output to the terminal. To run in the background instead, pass the `-d` flag:
50
+
By default, `fig start` will run until each container has shut down, and relay their output to the terminal. To run in the background instead, pass the `-d` flag:
51
51
52
52
```bash
53
-
$ plum start -d
53
+
$ fig start -d
54
54
Starting myapp_db_1... done
55
55
myapp_db_1 is running at 127.0.0.1:45678
56
56
57
-
$ plum ps
57
+
$ fig ps
58
58
Name State Ports
59
59
------------------------------------
60
60
myapp_db_1 Up 5432->45678/tcp
61
61
```
62
62
63
63
### Building services
64
64
65
-
Plum can automatically build images for you if your service specifies a directory with a `Dockerfile` in it (or a Git URL, as per the `docker build` command).
65
+
Fig can automatically build images for you if your service specifies a directory with a `Dockerfile` in it (or a Git URL, as per the `docker build` command).
66
66
67
67
This example will build an image with `app.py` inside it:
68
68
@@ -72,7 +72,7 @@ This example will build an image with `app.py` inside it:
72
72
print"Hello world!"
73
73
```
74
74
75
-
#### plum.yml
75
+
#### fig.yml
76
76
77
77
```yaml
78
78
web:
@@ -91,7 +91,7 @@ web:
91
91
92
92
### Getting your code in
93
93
94
-
If you want to work on an application being run by Plum, you probably don't want to have to rebuild your image every time you make a change. To solve this, you can share the directory with the container using a volume so the changes are reflected immediately:
94
+
If you want to work on an application being run by Fig, you probably don't want to have to rebuild your image every time you make a change. To solve this, you can share the directory with the container using a volume so the changes are reflected immediately:
95
95
96
96
```yaml
97
97
web:
@@ -118,8 +118,8 @@ web:
118
118
This will pass an environment variable called `MYAPP_DB_1_PORT` into the web container, whose value will look like `tcp://172.17.0.4:45678`. Your web app's code can use that to connect to the database. To see all of the environment variables available, run `env` inside a container:
119
119
120
120
```bash
121
-
$ plum start -d db
122
-
$ plum run web env
121
+
$ fig start -d db
122
+
$ fig run web env
123
123
```
124
124
125
125
@@ -152,12 +152,12 @@ web:
152
152
Running a one-off command
153
153
-------------------------
154
154
155
-
If you want to run a management command, use `plum run` to start a one-off container:
155
+
If you want to run a management command, use `fig run` to start a one-off container:
0 commit comments