Skip to content

Commit

Permalink
use fix for docker/compose#374
Browse files Browse the repository at this point in the history
  • Loading branch information
Vijay Vepakomma committed Dec 20, 2018
1 parent e9fbd2b commit 877696a
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 0 deletions.
39 changes: 39 additions & 0 deletions 02.Django-RestApi/docker/dev/waitfor/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
version: "2.1"
services:
test:
build:
context: ../../../
dockerfile: docker/dev/Dockerfile
volumes_from:
- cache
depends_on:
db:
condition: service_healthy
environment:
DJANGO_SETTINGS_MODULE: todobackend.settings.test
MYSQL_HOST: db
MYSQL_USER: root
MYSQL_PASSWORD: password
TEST_OUTPUT_DIR: /reports

cache:
build:
context: ../../../
dockerfile: docker/dev/Dockerfile
volumes:
- /tmp/cache:/cache
entrypoint: "true"

db:
image: mysql:5.6
hostname: db
expose:
- "3306"
environment:
MYSQL_ROOT_PASSWORD: password
healthcheck:
test: mysqladmin -uroot -ppassword ping
interval: 2s
timeout: 5s
retries: 30

2 changes: 2 additions & 0 deletions 05.Docker-Image/13.list-composed-images.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cd ../02.Django-RestApi/docker/dev
docker-compose ps
2 changes: 2 additions & 0 deletions 05.Docker-Image/14.logs-docker-compose.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cd ../02.Django-RestApi/docker/dev
docker-compose logs db
3 changes: 3 additions & 0 deletions 05.Docker-Image/15.remove-composed-containers.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cd ../02.Django-RestApi/docker/dev
docker-compose kill
docker-compose rm -f
4 changes: 4 additions & 0 deletions 05.Docker-Image/16.compose-with-wait-for.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
cd ../02.Django-RestApi/docker/dev/waitfor
docker-compose kill
docker-compose rm -f
docker-compose up test
4 changes: 4 additions & 0 deletions 05.Docker-Image/17.compose-without-wait.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
cd ../02.Django-RestApi/docker/dev
docker-compose kill
docker-compose rm -f
docker-compose up test

0 comments on commit 877696a

Please sign in to comment.