Skip to content

Commit

Permalink
removed unused parameters from create command, updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
villepietarinen committed Apr 4, 2017
1 parent e44d8de commit 107a4ab
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 10 deletions.
29 changes: 28 additions & 1 deletion README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,30 @@ $ docker ps -a
# Open bash into any container
$ docker exec -it $CONTAINER_ID bash
# Create new project (interactive wizard for setting up project)
$ gdev create
```

## Creating new project
Before creating a new project you should setup a GIT repository for your new project.

It's also advisable to create a config file to your home directory with some default values. File should be named ~/.gdev/gdevconf.yml

Example gdevconf.yml:
```
create:
defaults:
wordpress:
# Flynn stage cloud address
stage: stage.yourdomain.com
# Flynn production cloud address
production: production.yourdomain.com
smtp_host: "172.17.0.1"
components: "dustpress"
theme: "ssh://[email protected]/path/dustpress-theme-boilerplate.git"
nodejs: TODO
silverbullet: TODO
```

## Workflow
Expand All @@ -105,6 +129,8 @@ To resolve this delete stopped containers, dangling images and dangling volumes.
$ gdev cleanup
```

If Docker for Mac still has a bug with freeing up disk space, dump databases you need and reset Docker for Mac settings. This will free all the space Docker is hogging. Then you will need to set up your projects again (import databases).

#### When in doubt, update and restart everything

To update all containers and settings run following global commands:
Expand All @@ -129,6 +155,7 @@ $ gdev reload

* [Nicholas Silva](https://github.com/silvamerica), creator.
* [Onni Hakala](https://github.com/onnimonni), forked the gdev version.
* [Ville Pietarinen](https://github.com/villepietarinen), initial sync and create commands, fixes and development.

## Contributing

Expand All @@ -142,4 +169,4 @@ $ gdev reload

`gdev` is available under the MIT license. See the LICENSE file for more info.

Copyright 2016 Geniem Oy.
Copyright 2017 Geniem Oy.
12 changes: 3 additions & 9 deletions bin/gdev
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ HEREDOC
PROXY_MODIFIED=%w{up run}
OTHER_COMMANDS=%w{wait reload cleanup machine update service status shell exec sync create}

CREATE_HELP='Usage: $ gdev create --type=wordpress --components=dustpress --stage=stage.mydomain.com --production=cloud.mydomain.com --theme=ssh://git@domain:/theme.git --name="My app" --description="Short description of my app" --sitename=myapp --envvars=envvars.json --stage=stage.mydomain.com --production=cloud.mydomain.com --git=ssh://git@mydomain:/my-app.git'
CREATE_HELP='Usage: $ gdev create --type=wordpress --components=dustpress --stage=stage.mydomain.com --production=cloud.mydomain.com --theme=ssh://git@domain:/theme.git --sitename=myapp --envvars=envvars.json --stage=stage.mydomain.com --production=production.mydomain.com --git=ssh://git@mydomain:/my-app.git'

def initialize(args)
if PROXY_UNMODIFIED_TO_COMPOSE.include?(args[0])
Expand Down Expand Up @@ -642,12 +642,6 @@ HEREDOC
project = Hash.new
puts "----------------------= Create new project =---------------------"

puts "Name for the project:"
project['name']=gets.chomp
puts ""
puts "Project description:"
project['description']=gets.chomp
puts ""
puts "Sitename (lowercase characters, dashes and numbers only):"
project['sitename']=gets.chomp
unless validate_string(project['sitename'])
Expand Down Expand Up @@ -683,7 +677,7 @@ HEREDOC
end
# run npm install in theme directory?
# TODO: default value
puts "Run npm install in theme directory? (Y/N)"
puts "Run npm install in theme directory after setup? (Y/N)"
npm_install=gets.chomp
if ['Y','y'].include?(npm_install)
project['npm_install']=true
Expand All @@ -709,7 +703,7 @@ HEREDOC
if defaults['production']
puts "Flynn production cloud address ("+defaults['production']+default_marker+"):"
else
puts "Flynn production cloud address (cloud.mydomain.com):"
puts "Flynn production cloud address (production.mydomain.com):"
end
project['production']=gets.chomp
if project['production'] == '' and defaults['production']
Expand Down

0 comments on commit 107a4ab

Please sign in to comment.