diff --git a/CHANGES.md b/CHANGES.md index 0b9c91f..7444ea1 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # Changelog +## v1.0.3 + +- Removes the bindings between `VIRTUAL_HOST` and `hostname` (`-h` in the `docker run`) for the web container. This fixes the incorrect hostname format when a composite `VIRTUAL_HOST` is passed in via `env` + ## v1.0.2 - Fixes a bug in v1.0.1 which broke "dup build" diff --git a/dup.nimble b/dup.nimble index 3c794e2..7500fd4 100644 --- a/dup.nimble +++ b/dup.nimble @@ -1,6 +1,6 @@ [Package] name = "dup" -version = "1.0.2" +version = "1.0.3" author = "Josh Girvin , Nathan Craike " description = "CLI wrapper for local Docker web development" license = "MIT" diff --git a/src/container.nim b/src/container.nim index 0d6a83b..154b600 100644 --- a/src/container.nim +++ b/src/container.nim @@ -129,15 +129,19 @@ proc startWebCmd*(conf: ProjectConfig, hasDb: bool = true): string {.raises: [], noSideEffect.} = var hostname = conf.name & ".docker" + vhost = "" for arg in conf.envVars: if arg.name == "VIRTUAL_HOST": - hostname = arg.value + vhost = arg.value let link = if hasDB: "--link " & conf.db & ":db " else: "" port = if conf.port == "": "" else: "-p " & conf.port var folder = "-v $PWD/" & conf.volume if conf.volume == "": folder = "-v $PWD/code:/var/www" + var vhostEnv = "" + if vhost == "": + vhostEnv = "-e VIRTUAL_HOST=" & quoteShellPosix(vhost) result = join([ "docker run", @@ -148,7 +152,7 @@ proc startWebCmd*(conf: ProjectConfig, hasDb: bool = true): string {.raises: [], folder, link, "-e TERM=xterm-256color", - "-e VIRTUAL_HOST=" & quoteShellPosix(hostname), + vhostEnv, quoteShellPosix(conf.name & ":latest") ], " ") diff --git a/src/dup.nim b/src/dup.nim index d930366..b2e59fc 100644 --- a/src/dup.nim +++ b/src/dup.nim @@ -13,7 +13,7 @@ from database import newDBConfig from container import checkDockerfile, checkAndParseDupFile ## Define our version constant for re-use -const version = "dup 1.0.2" +const version = "dup 1.0.3" ## Define our docopt parsing schema let doc = """