Created
April 9, 2016 16:59
-
-
Save edgar/eee2271246d67b4f6a4b3b792dd2ef8e to your computer and use it in GitHub Desktop.
Docker compose and makefile using docker-wait
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
search: | |
extends: | |
file: common.yml | |
service: search | |
env_file: | |
- ../env/test | |
depends_on: | |
- es | |
es: | |
extends: | |
file: es.yml | |
service: es | |
wait: | |
image: waisbrot/wait | |
links: | |
- es | |
environment: | |
- TARGETS=es:9200 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IMAGE_NAME := "foo" | |
docker-build: | |
@(docker build -t $(IMAGE_NAME) -f Dockerfile .) | |
test: docker-build | |
@(docker-compose -f dockercompose/test.yml up -d) | |
@(docker-compose -f dockercompose/test.yml run wait) | |
@(docker-compose -f dockercompose/test.yml run search bash -c "rspec") | |
@(docker-compose -f dockercompose/test.yml down) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment