Compare commits

..

21 Commits
0.4.0 ... 0.4.1

Author SHA1 Message Date
Ben Firshman
b99bb64487 Add sanity check to OS X build script 2014-05-08 13:03:21 +01:00
Ben Firshman
580affa5f3 Add sanity check to linux build script 2014-05-08 13:02:50 +01:00
Ben Firshman
d600b3498b Remove entrypoint from dockerfile 2014-05-08 13:00:39 +01:00
Aanand Prasad
f0eaf84cb9 Merge pull request #217 from orchardup/0.4.1
Ship 0.4.1
2014-05-08 12:51:35 +01:00
Ben Firshman
257a171c0c Ship 0.4.1 2014-05-08 12:43:09 +01:00
Ben Firshman
3c5e818b49 Update install docs for Docker 0.11.0 2014-05-08 12:21:46 +01:00
Ben Firshman
c3c8395cef Merge pull request #215 from marksteve/docker-0.11
Docker 0.11
2014-05-08 10:10:19 +01:00
Mark Steve Samson
38c008e527 Fix index error when getting ghost state of containers 2014-05-08 12:39:15 +08:00
Aanand Prasad
a3d8f7d113 Remove hash from gif URL 2014-05-06 17:13:56 +01:00
Ben Firshman
65a642097c Merge pull request #211 from servebox/project-name
Add the ability to configure the project name using a command line option
2014-05-05 10:50:48 +01:00
Ben Firshman
dff9aa6f0c Add installation and entrypoint to dockerfile 2014-05-05 10:50:23 +01:00
Ben Firshman
ab145b5365 Fix pull requests failing on travis 2014-05-05 10:50:10 +01:00
Jef Mathiot
5878fe3834 Add the ability to configure the project name 2014-05-02 18:00:58 +02:00
Aanand Prasad
715e29d7ba Merge pull request #207 from orchardup/fig-run-correct-exit-code
Return correct exit code from fig run
2014-05-01 18:21:40 +01:00
Ben Firshman
983337401c Return correct exit code from fig run
Closes #197
2014-05-01 18:17:12 +01:00
Ben Firshman
8251dec587 Add docs, build and dist to clean script 2014-05-01 17:17:23 +01:00
Ben Firshman
52f994cf04 Remove /docs/.git-gh-pages from gitignore
It's inside /docs/_site
2014-05-01 17:17:06 +01:00
Ben Firshman
3d4b5cfbfe Update version of docker-osx 2014-05-01 15:34:21 +01:00
Aanand Prasad
33b057bfaf Update tag in docker-osx download URL 2014-05-01 10:51:42 +01:00
Aanand Prasad
629fe771df Update domain in docker-osx download URL 2014-04-30 16:37:20 +01:00
Aanand Prasad
5e6f175b5f Update download URLs on install page 2014-04-30 16:26:46 +01:00
14 changed files with 33 additions and 18 deletions

1
.gitignore vendored
View File

@@ -3,5 +3,4 @@
/build
/dist
/docs/_site
/docs/.git-gh-pages
fig.spec

View File

@@ -12,13 +12,13 @@ install:
- sudo curl -L -o /usr/local/bin/orchard https://github.com/orchardup/go-orchard/releases/download/2.0.5/linux
- sudo chmod +x /usr/local/bin/orchard
before_script:
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && orchard hosts rm -f $TRAVIS_JOB_ID'
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && orchard hosts create $TRAVIS_JOB_ID || false'
- 'if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then orchard hosts rm -f $TRAVIS_JOB_ID || true; fi'
- 'if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then orchard hosts create $TRAVIS_JOB_ID; fi'
script:
- nosetests tests/unit
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && script/travis-integration || false'
- 'if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then script/travis-integration; fi'
after_script:
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && orchard hosts rm -f $TRAVIS_JOB_ID || false'
- 'if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then orchard hosts rm -f $TRAVIS_JOB_ID; fi'
deploy:
provider: pypi
user: orchard

View File

@@ -1,6 +1,11 @@
Change log
==========
0.4.1 (2014-05-08)
------------------
- Add support for Docker 0.11.0.
0.4.0 (2014-04-29)
------------------

View File

@@ -5,6 +5,7 @@ RUN pip install -r requirements.txt
ADD requirements-dev.txt /code/
RUN pip install -r requirements-dev.txt
ADD . /code/
RUN python setup.py develop
RUN useradd -d /home/user -m -s /bin/bash user
RUN chown -R user /code/
USER user

View File

@@ -32,7 +32,7 @@ db:
Then type `fig up`, and Fig will start and run your entire app:
![example fig run](https://orchardup.com/static/images/fig-example-large.f96065fc9e22.gif)
![example fig run](https://orchardup.com/static/images/fig-example-large.gif)
There are commands to:

View File

@@ -30,7 +30,7 @@ db:
Then type `fig up`, and Fig will start and run your entire app:
![example fig run](https://orchardup.com/static/images/fig-example-large.f96065fc9e22.gif)
![example fig run](https://orchardup.com/static/images/fig-example-large.gif)
There are commands to:

View File

@@ -6,9 +6,9 @@ title: Installing Fig
Installing Fig
==============
First, install Docker version 0.10.0. If you're on OS X, you can use [docker-osx](https://github.com/noplay/docker-osx):
First, install Docker version 0.11.0. If you're on OS X, you can use [docker-osx](https://github.com/noplay/docker-osx):
$ curl https://raw.github.com/noplay/docker-osx/0.10.0/docker-osx > /usr/local/bin/docker-osx
$ curl https://raw.githubusercontent.com/noplay/docker-osx/0.11.0/docker-osx > /usr/local/bin/docker-osx
$ chmod +x /usr/local/bin/docker-osx
$ docker-osx shell
@@ -16,12 +16,12 @@ Docker has guides for [Ubuntu](http://docs.docker.io/en/latest/installation/ubun
Next, install Fig. On OS X:
$ curl -L https://github.com/orchardup/fig/releases/download/0.3.2/darwin > /usr/local/bin/fig
$ curl -L https://github.com/orchardup/fig/releases/download/0.4.0/darwin > /usr/local/bin/fig
$ chmod +x /usr/local/bin/fig
On 64-bit Linux:
$ curl -L https://github.com/orchardup/fig/releases/download/0.3.2/linux > /usr/local/bin/fig
$ curl -L https://github.com/orchardup/fig/releases/download/0.4.0/linux > /usr/local/bin/fig
$ chmod +x /usr/local/bin/fig
Fig is also available as a Python package if you're on another platform (or if you prefer that sort of thing):

View File

@@ -1,4 +1,4 @@
from __future__ import unicode_literals
from .service import Service
__version__ = '0.4.0'
__version__ = '0.4.1'

View File

@@ -24,6 +24,7 @@ class Command(DocoptCommand):
def __init__(self):
self.yaml_path = os.environ.get('FIG_FILE', None)
self.explicit_project_name = None
def dispatch(self, *args, **kwargs):
try:
@@ -44,6 +45,8 @@ class Command(DocoptCommand):
def perform_command(self, options, *args, **kwargs):
if options['--file'] is not None:
self.yaml_path = os.path.join(self.base_dir, options['--file'])
if options['--project-name'] is not None:
self.explicit_project_name = options['--project-name']
return super(Command, self).perform_command(options, *args, **kwargs)
@cached_property
@@ -70,6 +73,8 @@ class Command(DocoptCommand):
@cached_property
def project_name(self):
project = os.path.basename(os.getcwd())
if self.explicit_project_name is not None:
project = self.explicit_project_name
project = re.sub(r'[^a-zA-Z0-9]', '', project)
if not project:
project = 'default'

View File

@@ -71,9 +71,10 @@ class TopLevelCommand(Command):
fig -h|--help
Options:
--verbose Show more output
--version Print version and exit
-f, --file FILE Specify an alternate fig file (default: fig.yml)
--verbose Show more output
--version Print version and exit
-f, --file FILE Specify an alternate fig file (default: fig.yml)
-p, --project-name NAME Specify an alternate project name (default: directory name)
Commands:
build Build or rebuild services
@@ -233,10 +234,11 @@ class TopLevelCommand(Command):
with self._attach_to_container(container.id, raw=tty) as c:
service.start_container(container, ports=None, one_off=True)
c.run()
exit_code = container.wait()
if options['--rm']:
container.wait()
log.info("Removing %s..." % container.name)
self.client.remove_container(container.id)
sys.exit(exit_code)
def scale(self, options):
"""

View File

@@ -78,7 +78,7 @@ class Container(object):
def human_readable_state(self):
self.inspect_if_not_inspected()
if self.dictionary['State']['Running']:
if self.dictionary['State']['Ghost']:
if self.dictionary['State'].get('Ghost'):
return 'Ghost'
else:
return 'Up'

View File

@@ -1,5 +1,7 @@
#!/bin/sh
set -ex
mkdir -p `pwd`/dist
chmod 777 `pwd`/dist
docker build -t fig .
docker run -v `pwd`/dist:/code/dist fig pyinstaller -F bin/fig
docker run -v `pwd`/dist:/code/dist fig dist/fig --version

View File

@@ -5,3 +5,4 @@ virtualenv venv
venv/bin/pip install pyinstaller==2.1
venv/bin/pip install .
venv/bin/pyinstaller -F bin/fig
dist/fig --version

View File

@@ -1,3 +1,3 @@
#!/bin/sh
find . -type f -name '*.pyc' -delete
rm -rf docs/_site build dist