diff --git a/client.go b/client.go index 51f161f..2a522c7 100644 --- a/client.go +++ b/client.go @@ -24,7 +24,6 @@ func GetClient(conf Conf, log Log) (*docker.Client, error) { var client *docker.Client var err error - log.DebugObject(LOG_SEVERITY_DEBUG_WOAH,"Docker client conf: ",conf.Docker) if (strings.HasPrefix(conf.Docker.Host, "tcp://")) { @@ -43,6 +42,7 @@ func GetClient(conf Conf, log Log) (*docker.Client, error) { // TCP DOCKER CLIENT WITHOUT CERTS client, err = docker.NewClient(conf.Docker.Host) + } } else if (strings.HasPrefix(conf.Docker.Host, "unix://")) { diff --git a/conf_confyaml.go b/conf_confyaml.go index 292d24f..2345b4a 100644 --- a/conf_confyaml.go +++ b/conf_confyaml.go @@ -64,10 +64,11 @@ type Conf_Yaml struct { Settings map[string]string `yaml:"Settings,omitempty"` - Docker DockerClientConf `yaml:"Docker,omitempty"` + Docker DockerClientConf `yaml:"Docker,omitempty"` } func (source *Conf_Yaml) toConf(log Log) Conf { + conf := Conf{ Paths: map[string]string{}, Tokens: map[string]string{}, @@ -97,7 +98,6 @@ func (source *Conf_Yaml) toConf(log Log) Conf { conf.Docker.CertPath = source.Docker.CertPath } -log.DebugObject(LOG_SEVERITY_DEBUG_STAAAP,"YAML CONVERT:", source.Docker, conf.Docker) - + log.DebugObject(LOG_SEVERITY_DEBUG_STAAAP,"YAML CONVERT:", source.Docker, conf.Docker) return conf } diff --git a/operation_init_default.go b/operation_init_default.go index dd99559..cafce8f 100644 --- a/operation_init_default.go +++ b/operation_init_default.go @@ -21,6 +21,13 @@ Docker: # Override Docker configuration ".coach/nodes.yml": ` # Files volume container +# +# - A volume container used to hold files assets for an application +# - Also has a place to put backups (separate from file assets) +# - Volatile, and not likely to handle exports well +# +# * Should be used as a ReadWrite container for Links/VolumesFrom +# files: Type: volume @@ -34,6 +41,11 @@ files: - app/backup:/app/backup # host based archive folder # Source volume container +# +# - A volume container to hold application source +# +# * Can be used as a ReadOnly container for Links/VolumesFrom +# source: Type: volume @@ -45,6 +57,11 @@ source: - app/www:/app/www # host based webroots folder (needs /active subroot for nginx conf) # Database service +# +# - Standalone DB server +# +# * ExposedPorts is likely not necessary, it just gives a host port for the server +# db: Type: service Build: docker/db # DB has a docker build so that we can create databases and set custom passwords. @@ -55,16 +72,21 @@ db: ExposedPorts: 3306/tcp: {} - Host: - VolumesFrom: - - files # I am not sure if this is needed - # FPM service +# +# - Standalone php-fpm service +# +# * iIt needs source, and assets +# * ExposedPorts is likely not necessary, it just gives a host port for the server +# +# ! Alternate image: jamesnesbitt/wunder-php7fpm +# ! Alternate image: jamesnesbitt/wunder-hhvm +# fpm: Type: service Config: - Image: jamesnesbitt/wunder-php5fpm # The FPM works, and should have blackfire working + Image: jamesnesbitt/wunder-php56fpm # The FPM works, and should have blackfire working RestartPolicy: on-failure ExposedPorts: @@ -78,6 +100,16 @@ fpm: - source # WWW service +# +# - Standalone nginx service +# - Sets Hostname and DomainName using coach tokens +# - Sets DnsDock Alias ENV var using coach tokens +# - Tries to bind to the Host 8080 port +# +# * It needs source, and assets +# * ExposedPorts are likely not necessary, they just gives a host port for the server +# * If you make this scaled, you will get an error trying to reused the 8080 port +# www: Type: service @@ -86,7 +118,7 @@ www: RestartPolicy: on-failure Hostname: "%PROJECT_%INSTANCE" # Token : project name (can be set in conf.yml) - Domainname: "%DOMAIN" # Token : can be set in conf.yml:Tokens + Domainname: "%DOMAIN" # Token : environment domain (can be set in conf.yml) Env: - "DNSDOCK_ALIAS=%PROJECT.%CONTAINER_DOMAIN" # If you are using DNSDOCK, this will create a DNS Entry. @@ -128,6 +160,8 @@ The www folder is meant to house the htdocs parts of the apllication. This give target for application source code, into which it can be linked or copied. This allows separation of project custom code, from community code for frameworks and libraries. +* The typical nginx configuration expects an application Web Root at www/active + ## Assets The assets folder is meant to be a non-versioned folder that contains elements needed to @@ -138,35 +172,58 @@ Assets folder being the writeable. ## Backups +The backups folder is meant to be a non-versioned fodler that contains backups dumps for +the application, which are kept separate from assets to that they can be managed separately. `, "app/assets/README.md": ` - -`, - "app/backup/README.md": ` The assets folder is meant to be a non-versioned folder that contains elements needed to run the application, but which should not be a part of the project source code. This includes file assets, and cache elements and temprorary elements. The real goal of this folder is to separate filespace into Read-Only and Writeable, with the Assets folder being the writeable. `, - "app/www/active/index.php": `