Created
August 1, 2022 20:43
-
-
Save jjtroberts/a0511cc38625837543a6e5564d3b02f9 to your computer and use it in GitHub Desktop.
Defect Dojo Docker Compose Files
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
# This docker-compose.yml file is fully functional to evaluate DefectDojo | |
# in your local environment. | |
# | |
# Although Docker Compose is one of the supported installation methods to | |
# deploy a containerized DefectDojo in a production environment, the | |
# docker-compose.yml file is not intended for production use without first | |
# customizing it to your particular situation. | |
--- | |
version: '3.8' | |
services: | |
nginx: | |
image: registry1.dso.mil/ironbank/opensource/defectdojo/defectdojo-nginx:2.12.0 | |
profiles: | |
- mysql-rabbitmq | |
- mysql-redis | |
- postgres-rabbitmq | |
- postgres-redis | |
depends_on: | |
- uwsgi | |
environment: | |
NGINX_METRICS_ENABLED: "${NGINX_METRICS_ENABLED:-false}" | |
volumes: | |
- defectdojo_media:/usr/share/nginx/html/media | |
ports: | |
- target: 8080 | |
published: ${DD_PORT:-8080} | |
protocol: tcp | |
mode: host | |
- target: 8443 | |
published: ${DD_TLS_PORT:-8443} | |
protocol: tcp | |
mode: host | |
uwsgi: | |
image: registry1.dso.mil/ironbank/opensource/defectdojo/defectdojo:2.12.0 | |
profiles: | |
- mysql-rabbitmq | |
- mysql-redis | |
- postgres-rabbitmq | |
- postgres-redis | |
depends_on: | |
- mysql | |
- postgres | |
entrypoint: ['/wait-for-it.sh', '${DD_DATABASE_HOST}:${DD_DATABASE_PORT}', '-t', '30', '--', '/entrypoint-uwsgi.sh'] | |
environment: | |
DD_DEBUG: 'False' | |
DD_DJANGO_METRICS_ENABLED: "${DD_DJANGO_METRICS_ENABLED:-False}" | |
DD_ALLOWED_HOSTS: "${DD_ALLOWED_HOSTS:-*}" | |
DD_DATABASE_URL: ${DD_DATABASE_URL} | |
DD_CELERY_BROKER_URL: ${DD_CELERY_BROKER_URL} | |
DD_SECRET_KEY: "${DD_SECRET_KEY:-hhZCp@D28z!n@NED*yB!ROMt+WzsY*iq}" | |
DD_CREDENTIAL_AES_256_KEY: "${DD_CREDENTIAL_AES_256_KEY:-&91a*agLqesc*0DJ+2*bAbsUZfR*4nLw}" | |
volumes: | |
- type: bind | |
source: ./docker/extra_settings | |
target: /app/docker/extra_settings | |
- "defectdojo_media:${DD_MEDIA_ROOT:-/app/media}" | |
celerybeat: | |
image: registry1.dso.mil/ironbank/opensource/defectdojo/defectdojo:2.12.0 | |
profiles: | |
- mysql-rabbitmq | |
- mysql-redis | |
- postgres-rabbitmq | |
- postgres-redis | |
depends_on: | |
- mysql | |
- postgres | |
- rabbitmq | |
entrypoint: ['/wait-for-it.sh', '${DD_DATABASE_HOST}:${DD_DATABASE_PORT}', '-t', '30', '--', '/entrypoint-celery-beat.sh'] | |
environment: | |
DD_DATABASE_URL: ${DD_DATABASE_URL} | |
DD_CELERY_BROKER_URL: ${DD_CELERY_BROKER_URL} | |
DD_SECRET_KEY: "${DD_SECRET_KEY:-hhZCp@D28z!n@NED*yB!ROMt+WzsY*iq}" | |
DD_CREDENTIAL_AES_256_KEY: "${DD_CREDENTIAL_AES_256_KEY:-&91a*agLqesc*0DJ+2*bAbsUZfR*4nLw}" | |
volumes: | |
- type: bind | |
source: ./docker/extra_settings | |
target: /app/docker/extra_settings | |
celeryworker: | |
image: registry1.dso.mil/ironbank/opensource/defectdojo/defectdojo:2.12.0 | |
profiles: | |
- mysql-rabbitmq | |
- mysql-redis | |
- postgres-rabbitmq | |
- postgres-redis | |
depends_on: | |
- mysql | |
- postgres | |
- rabbitmq | |
- redis | |
entrypoint: ['/wait-for-it.sh', '${DD_DATABASE_HOST}:${DD_DATABASE_PORT}', '-t', '30', '--', '/entrypoint-celery-worker.sh'] | |
environment: | |
DD_DATABASE_URL: ${DD_DATABASE_URL} | |
DD_CELERY_BROKER_URL: ${DD_CELERY_BROKER_URL} | |
DD_SECRET_KEY: "${DD_SECRET_KEY:-hhZCp@D28z!n@NED*yB!ROMt+WzsY*iq}" | |
DD_CREDENTIAL_AES_256_KEY: "${DD_CREDENTIAL_AES_256_KEY:-&91a*agLqesc*0DJ+2*bAbsUZfR*4nLw}" | |
volumes: | |
- type: bind | |
source: ./docker/extra_settings | |
target: /app/docker/extra_settings | |
- "defectdojo_media:${DD_MEDIA_ROOT:-/app/media}" | |
initializer: | |
image: registry1.dso.mil/ironbank/opensource/defectdojo/defectdojo:2.12.0 | |
profiles: | |
- mysql-rabbitmq | |
- mysql-redis | |
- postgres-rabbitmq | |
- postgres-redis | |
depends_on: | |
- mysql | |
- postgres | |
entrypoint: ['/wait-for-it.sh', '${DD_DATABASE_HOST}:${DD_DATABASE_PORT}', '--', '/entrypoint-initializer.sh'] | |
environment: | |
DD_DATABASE_URL: ${DD_DATABASE_URL} | |
DD_ADMIN_USER: "${DD_ADMIN_USER:-admin}" | |
DD_ADMIN_MAIL: "${DD_ADMIN_USER:[email protected]}" | |
DD_ADMIN_FIRST_NAME: "${DD_ADMIN_FIRST_NAME:-Admin}" | |
DD_ADMIN_LAST_NAME: "${DD_ADMIN_LAST_NAME:-User}" | |
DD_INITIALIZE: "${DD_INITIALIZE:-true}" | |
DD_SECRET_KEY: "${DD_SECRET_KEY:-hhZCp@D28z!n@NED*yB!ROMt+WzsY*iq}" | |
DD_CREDENTIAL_AES_256_KEY: "${DD_CREDENTIAL_AES_256_KEY:-&91a*agLqesc*0DJ+2*bAbsUZfR*4nLw}" | |
volumes: | |
- type: bind | |
source: ./docker/extra_settings | |
target: /app/docker/extra_settings | |
mysql: | |
image: mysql:5.7.38@sha256:16e159331007eccc069822f7b731272043ed572a79a196a05ffa2ea127caaf67 | |
profiles: | |
- mysql-rabbitmq | |
- mysql-redis | |
environment: | |
MYSQL_RANDOM_ROOT_PASSWORD: 'yes' | |
MYSQL_DATABASE: ${DD_DATABASE_NAME} | |
MYSQL_USER: ${DD_DATABASE_USER} | |
MYSQL_PASSWORD: ${DD_DATABASE_PASSWORD} | |
command: ['mysqld', '--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci'] | |
volumes: | |
- defectdojo_data:/var/lib/mysql | |
postgres: | |
image: registry1.dso.mil/ironbank/opensource/postgres/postgresql:14.4 | |
profiles: | |
- postgres-rabbitmq | |
- postgres-redis | |
environment: | |
POSTGRES_DB: ${DD_DATABASE_NAME} | |
POSTGRES_USER: ${DD_DATABASE_USER} | |
POSTGRES_PASSWORD: ${DD_DATABASE_PASSWORD} | |
volumes: | |
- defectdojo_postgres:/var/lib/postgresql/data | |
rabbitmq: | |
image: rabbitmq:3.10.5-alpine@sha256:079cd149834103f013f32439737a35024219f6c4ea0f9693f9028cb303980b9d | |
profiles: | |
- mysql-rabbitmq | |
- postgres-rabbitmq | |
volumes: | |
- defectdojo_rabbitmq:/var/lib/rabbitmq | |
redis: | |
image: registry1.dso.mil/ironbank/opensource/redis/redis7:7.0.4 | |
profiles: | |
- mysql-redis | |
- postgres-redis | |
volumes: | |
- defectdojo_redis:/data | |
volumes: | |
defectdojo_data: {} | |
defectdojo_postgres: {} | |
defectdojo_media: {} | |
defectdojo_rabbitmq: {} | |
defectdojo_redis: {} |
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
.PHONY: run | |
run: | |
docker-compose --profile postgres-redis --env-file ./docker/environments/postgres-redis.env up --no-deps |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment