This refactoring allows us to raise an error when there is no
'file' key specified in the .yml and no self.filename set. This
error was specific to the tests, as the tests are
the only place that constructs service dicts without sometimes
setting a filename.
Moving the function within the class as well as it is code that
is exclusively for the use of validating properties for the
ServiceLoader class.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
Split them out into individual validation tests so it is clearer
to see what is going on and to enable adding further validation
tests.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
If we're using self.filename, then it's already a full path and we
don't need to splice off the filename.yml just so we can .join it
back together again.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
If the 'file' key is not set in the extends_options dict then we
look for the 'service' from within the same file.
Fixes this issue: https://github.com/docker/compose/issues/1237
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
The process function contained purely validation checks, so re-named
the function to aid intent clarity.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
This commit adds environment variable parsing to the container side
of the volume mapping in configs. The common use case for this is
mounting SSH agent sockets in a container, using code like:
volumes:
- $SSH_AUTH_SOCK:$SSH_AUTH_SOCK
environment:
- SSH_AUTH_SOCK
Signed-off-by: Jeff Kramer <jeff.kramer@voxmedia.com>
As VALID_CHARS is shared with project names, these chars are also
now allowed within project names.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
These tests were indeed raising a config error, but not for the reason
intended/tested for. I've added in the image name so the config error
raise is correctly testing the Service name.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
boot2docker is the more common case so let's have that one first.
Also be more explicit and clear that the localhost:5000 is applicable
for people running on linux.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
To aid clarity in how to contribute, I've moved the release process
out into it's own RELEASE_PROCESS.md file. The release process info
is only relevant for maintainers who are building new releases of
compose.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
Added a link to boot2docker for those unfamiliar with it.
http://0.0.0.0:5000 didn't resolve for me, however localhost:5000
did, so included reference to that.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
When reading through the code for the first time and seeing redis,
those unfamiliar with docker first thought might be that they need
to install redis. Adding this sentence helps make it clearer that
this is not needed. Docker will take care of this in services.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
When running `docker-compose up`, an extra line of output, from flask,
is outputted. I've included it so anyone new to docker-compose who
sees this output will know that it's expected and not worry that
something might have gone wrong.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>