Skip to content

Commit 2680756

Browse files
committed
Merge pull request #518 from dnephin/env_docs
Add environment variables to cli.md docs
2 parents 9df5481 + 837f368 commit 2680756

1 file changed

Lines changed: 34 additions & 13 deletions

File tree

docs/cli.md

Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,42 +10,44 @@ Most commands are run against one or more services. If the service is omitted, i
1010

1111
Run `fig [COMMAND] --help` for full usage.
1212

13-
## build
13+
## Commands
14+
15+
### build
1416

1517
Build or rebuild services.
1618

1719
Services are built once and then tagged as `project_service`, e.g. `figtest_db`. If you change a service's `Dockerfile` or the contents of its build directory, you can run `fig build` to rebuild it.
1820

19-
## help
21+
### help
2022

2123
Get help on a command.
2224

23-
## kill
25+
### kill
2426

2527
Force stop service containers.
2628

27-
## logs
29+
### logs
2830

2931
View output from services.
3032

31-
## port
33+
### port
3234

3335
Print the public port for a port binding
3436

35-
## ps
37+
### ps
3638

3739
List containers.
3840

39-
## pull
41+
### pull
4042

4143
Pulls service images.
4244

43-
## rm
45+
### rm
4446

4547
Remove stopped service containers.
4648

4749

48-
## run
50+
### run
4951

5052
Run a one-off command on a service.
5153

@@ -65,7 +67,7 @@ If you do not want linked containers to be started when running the one-off comm
6567

6668
$ fig run --no-deps web python manage.py shell
6769

68-
## scale
70+
### scale
6971

7072
Set number of containers to run for a service.
7173

@@ -74,15 +76,15 @@ For example:
7476

7577
$ fig scale web=2 worker=3
7678

77-
## start
79+
### start
7880

7981
Start existing containers for a service.
8082

81-
## stop
83+
### stop
8284

8385
Stop running containers without removing them. They can be started again with `fig start`.
8486

85-
## up
87+
### up
8688

8789
Build, (re)create, start and attach to containers for a service.
8890

@@ -93,3 +95,22 @@ By default, `fig up` will aggregate the output of each container, and when it ex
9395
By default if there are existing containers for a service, `fig up` will stop and recreate them (preserving mounted volumes with [volumes-from]), so that changes in `fig.yml` are picked up. If you do no want containers to be stopped and recreated, use `fig up --no-recreate`. This will still start any stopped containers, if needed.
9496

9597
[volumes-from]: http://docs.docker.io/en/latest/use/working_with_volumes/
98+
99+
100+
## Environment Variables
101+
102+
Fig commands support the following environment variables
103+
104+
### FIG_PROJECT_NAME
105+
106+
Set the project name. Defaults to the `basename` of the current working
107+
directory.
108+
109+
### FIG_FILE
110+
111+
Set the path to the `fig.yml` to use. Defaults to `fig.yml` in the current
112+
working directory.
113+
114+
### DOCKER_HOST
115+
116+
Set the url to the docker remote.

0 commit comments

Comments
 (0)