Skip to content

Instantly share code, notes, and snippets.

@tomtoump tomtoump/docker-compose.yml Secret
Last active Jul 18, 2019

Embed
What would you like to do?
Deploy DefectDojo at AWS ECS
---
version: '3'
services:
nginx:
image: defectdojo/defectdojo-nginx:${NGINX_VERSION:-latest}
links:
- uwsgi
ports:
- "8080:8080"
uwsgi:
image: defectdojo/defectdojo-django:${DJANGO_VERSION:-latest}
links:
- mysql
entrypoint: ['/wait-for-it.sh', 'mysql:3306', '-t', '30', '--', '/entrypoint-uwsgi.sh']
environment:
DD_DEBUG: 'off'
DD_ALLOWED_HOSTS: ${DD_ALLOWED_HOSTS:-*}
DD_DATABASE_URL: ${DD_DATABASE_URL:-mysql://defectdojo:defectdojo@mysql:3306/defectdojo}
DD_CELERY_BROKER_USER: ${DD_CELERY_BROKER_USER:-guest}
DD_CELERY_BROKER_PASSWORD: ${DD_CELERY_BROKER_USER:-guest}
celerybeat:
image: defectdojo/defectdojo-django:latest
links:
- mysql
- rabbitmq
entrypoint: ['/wait-for-it.sh', 'mysql:3306', '-t', '30', '--', '/entrypoint-celery-beat.sh']
environment:
DD_DATABASE_URL: ${DD_DATABASE_URL:-mysql://defectdojo:defectdojo@mysql:3306/defectdojo}
DD_CELERY_BROKER_USER: ${DD_CELERY_BROKER_USER:-guest}
DD_CELERY_BROKER_PASSWORD: ${DD_CELERY_BROKER_USER:-guest}
celeryworker:
image: defectdojo/defectdojo-django:latest
links:
- mysql
- rabbitmq
entrypoint: ['/wait-for-it.sh', 'mysql:3306', '-t', '30', '--', '/entrypoint-celery-worker.sh']
environment:
DD_DATABASE_URL: ${DD_DATABASE_URL:-mysql://defectdojo:defectdojo@mysql:3306/defectdojo}
DD_CELERY_BROKER_USER: ${DD_CELERY_BROKER_USER:-guest}
DD_CELERY_BROKER_PASSWORD: ${DD_CELERY_BROKER_USER:-guest}
initializer:
image: defectdojo/defectdojo-django:latest
links:
- mysql
entrypoint: ['/wait-for-it.sh', 'mysql:3306', '--', '/entrypoint-initializer.sh']
environment:
DD_DATABASE_URL: ${DD_DATABASE_URL:-mysql://defectdojo:defectdojo@mysql:3306/defectdojo}
DD_ADMIN_USER: ${DD_ADMIN_USER:-admin}
DD_ADMIN_MAIL: ${DD_ADMIN_USER:-admin@defectdojo.local}
DD_ADMIN_FIRST_NAME: ${DD_ADMIN_FIRST_NAME:-Admin}
DD_ADMIN_LAST_NAME: ${DD_ADMIN_LAST_NAME:-User}
DD_INITIALIZE: ${DD_INITIALIZE:-true}
mysql:
image: mysql:5.7
environment:
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
DD_DATABASE_URL: ${DD_DATABASE_URL:-mysql://defectdojo:defectdojo@mysql:3306/defectdojo}
MYSQL_USER: ${DD_DATABASE_USER:-defectdojo}
MYSQL_PASSWORD: ${DD_DATABASE_PASSWORD:-defectdojo}
MYSQL_DATABASE: ${DD_DATABASE_NAME:-defectdojo}
command: ['mysqld', '--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci']
volumes:
- defectdojo_data:/var/lib/mysql
rabbitmq:
image: rabbitmq:3.7
volumes:
defectdojo_data: {}
version: 1
task_definition:
task_execution_role: ecsTaskExecutionRole
ecs_network_mode: bridge
task_size:
mem_limit: 1GB
cpu_limit: 256
run_params:
network_configuration:
awsvpc_configuration:
# Replace with output of `ecs-cli up`
subnets:
- "subnet-*****************"
- "subnet-*****************"
security_groups:
- "sg-*****************"
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Allow",
"Principal": {
"Service": "ecs-tasks.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.