Skip to content

Commit

Permalink
Docker-compose: use variables for depends_on (#8598)
Browse files Browse the repository at this point in the history
  • Loading branch information
kiblik authored Sep 11, 2023
1 parent 51b732b commit e23d2b6
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 11 deletions.
17 changes: 6 additions & 11 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ services:
- postgres-rabbitmq
- postgres-redis
depends_on:
- mysql
- postgres
- ${DD_DOCKERCOMPOSE_DATABASE}
entrypoint: ['/wait-for-it.sh', '${DD_DATABASE_HOST}:${DD_DATABASE_PORT}', '-t', '30', '--', '/entrypoint-uwsgi.sh']
environment:
DD_DEBUG: 'False'
Expand All @@ -69,9 +68,8 @@ services:
- postgres-rabbitmq
- postgres-redis
depends_on:
- mysql
- postgres
- rabbitmq
- ${DD_DOCKERCOMPOSE_DATABASE}
- ${DD_DOCKERCOMPOSE_BROKER}
entrypoint: ['/wait-for-it.sh', '${DD_DATABASE_HOST}:${DD_DATABASE_PORT}', '-t', '30', '--', '/entrypoint-celery-beat.sh']
environment:
DD_DATABASE_URL: ${DD_DATABASE_URL}
Expand All @@ -90,10 +88,8 @@ services:
- postgres-rabbitmq
- postgres-redis
depends_on:
- mysql
- postgres
- rabbitmq
- redis
- ${DD_DOCKERCOMPOSE_DATABASE}
- ${DD_DOCKERCOMPOSE_BROKER}
entrypoint: ['/wait-for-it.sh', '${DD_DATABASE_HOST}:${DD_DATABASE_PORT}', '-t', '30', '--', '/entrypoint-celery-worker.sh']
environment:
DD_DATABASE_URL: ${DD_DATABASE_URL}
Expand All @@ -113,8 +109,7 @@ services:
- postgres-rabbitmq
- postgres-redis
depends_on:
- mysql
- postgres
- ${DD_DOCKERCOMPOSE_DATABASE}
entrypoint: ['/wait-for-it.sh', '${DD_DATABASE_HOST}:${DD_DATABASE_PORT}', '--', '/entrypoint-initializer.sh']
environment:
DD_DATABASE_URL: ${DD_DATABASE_URL}
Expand Down
3 changes: 3 additions & 0 deletions docker/environments/mysql-rabbitmq.env
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ DD_TEST_DATABASE_NAME=test_defectdojo
DD_TEST_DATABASE_URL=mysql://defectdojo:defectdojo@mysql:3306/test_defectdojo?charset=utf8mb4

DD_CELERY_BROKER_URL=amqp://guest:guest@rabbitmq:5672//

DD_DOCKERCOMPOSE_DATABASE=mysql
DD_DOCKERCOMPOSE_BROKER=rabbitmq
3 changes: 3 additions & 0 deletions docker/environments/mysql-redis.env
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ DD_TEST_DATABASE_NAME=test_defectdojo
DD_TEST_DATABASE_URL=mysql://defectdojo:defectdojo@mysql:3306/test_defectdojo?charset=utf8mb4

DD_CELERY_BROKER_URL=redis://redis:6379/0

DD_DOCKERCOMPOSE_DATABASE=mysql
DD_DOCKERCOMPOSE_BROKER=redis
3 changes: 3 additions & 0 deletions docker/environments/postgres-rabbitmq.env
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ DD_TEST_DATABASE_NAME=test_defectdojo
DD_TEST_DATABASE_URL=postgresql://defectdojo:defectdojo@postgres:5432/test_defectdojo

DD_CELERY_BROKER_URL=amqp://guest:guest@rabbitmq:5672//

DD_DOCKERCOMPOSE_DATABASE=postgres
DD_DOCKERCOMPOSE_BROKER=rabbitmq
3 changes: 3 additions & 0 deletions docker/environments/postgres-redis.env
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ DD_TEST_DATABASE_NAME=test_defectdojo
DD_TEST_DATABASE_URL=postgresql://defectdojo:defectdojo@postgres:5432/test_defectdojo

DD_CELERY_BROKER_URL=redis://redis:6379/0

DD_DOCKERCOMPOSE_DATABASE=postgres
DD_DOCKERCOMPOSE_BROKER=redis

0 comments on commit e23d2b6

Please sign in to comment.