Skip to content
This repository was archived by the owner on Mar 30, 2020. It is now read-only.

Add host variable to environment. #23

Merged
merged 1 commit into from
Jul 21, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions core/dockerfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func (d *Dockerfile) resolveInfoVariables(result []byte) []byte {
"ENV": d.environment.Name,
"VCS": string(d.project.Repository),
"REV": d.revision.GetShort(),
"HOST": d.environment.Host,
}

for name, value := range vars {
Expand Down
1 change: 1 addition & 0 deletions core/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ type Environment struct {
CertPath string `json:"-"`
EtcdServers []string `gcfg:"EtcdServer"`
Name string
Host string `gcfg:"Host"`
}

func (e *Environment) String() string {
Expand Down
3 changes: 2 additions & 1 deletion documentation/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,12 @@ An environment is a logical group of any number of Docker servers. Dockership su

* `DockerEndPoint` (mandatory, multiple): [Docker Remote API](https://docs.docker.com/reference/api/docker_remote_api/) address, if dockership and Docker are running in the same host you can use `unix:///var/run/docker.sock` if not you should enable remote access at the docker daemon (with -H parameter) and use a TCP endpoint. (eg.: `tcp://172.17.42.1:4243`)

* `Host` (optional): The hostname that the machine will be exposed at. Reachable thorugh the `DOCKERSHIP_HOST` variable in Dockerfiles.

* `CertPath` (optional): If you are running Docker with TLS support you must provide the path to your keys files, just like the [DOCKER_CERT_PATH](https://docs.docker.com/articles/https/) looks.

* `EtcdServer` (multiple, optional): if none is configured the `Global.EtcdServer` will be used


### Project

`Project` section defines the configuration for every project to be deployed in the environments. The relation between repositories is one-to-one, so the repository should contain the `Dockerfile` and all the files needed to build the Docker image. The Project as Environment is defined as a section with subsection: `[Project "disruptive-app"]`
Expand Down
1 change: 1 addition & 0 deletions documentation/creating_your_dockerfiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ This kind of variables are sourced from the internal process of Dockerfile given
* `$DOCKERSHIP_VCS`: Repository URLs, the `Repository` variable from the project.
* `$DOCKERSHIP_REV`: Revision identifier
* `$DOCKERSHIP_ENV`: Environment name where the Dockerfile is being deployed.
* `$DOCKERSHIP_HOST`: Hostname of the environment.

### etcd support

Expand Down