Skip to content

Instantly share code, notes, and snippets.

@viruthagiri viruthagiri/bitnami.yml Secret
Created Jun 7, 2019

Embed
What would you like to do?
MariaDbTaskDefinition:
Type: AWS::ECS::TaskDefinition
Properties:
Family: mariadb-service
Cpu: 512
Memory: 1024
NetworkMode: awsvpc
RequiresCompatibilities:
- EC2
ExecutionRoleArn:
Fn::ImportValue:
!Join [':', [!Ref 'StackName', 'ECSTaskExecutionRole']]
TaskRoleArn:
Fn::If:
- 'HasCustomRole'
- !Ref 'Role'
- !Ref "AWS::NoValue"
ContainerDefinitions:
- Name: mariadb
Image: bitnami/mariadb
Cpu: 512
Memory: 1024
Essential: true
User: root
LogConfiguration:
LogDriver: awslogs
Options:
awslogs-group: !Ref 'MariaDbLogs'
awslogs-region: !Ref "AWS::Region"
awslogs-stream-prefix: dbx
MountPoints:
- SourceVolume: 'MariaDbVolume'
ContainerPath: /bitnami
PortMappings:
- ContainerPort: 3306
Protocol: tcp
Environment:
- Name: MARIADB_USER
Value: 'mariadb'
- Name: MARIADB_PASSWORD
Value: 'mariadb'
- Name: MARIADB_ROOT_PASSWORD
Value: 'mariadb'
- Name: MARIADB_DATABASE
Value: 'wordpress'
HealthCheck:
Command: ["CMD-SHELL", "mysqladmin -h localhost status || exit 1"]
Interval: 30
Retries: 5
StartPeriod: 30
Timeout: 5
Volumes:
- Name: MariaDbVolume
DockerVolumeConfiguration:
Autoprovision: true
Scope: shared
Driver: rexray/ebs
DriverOpts:
Size: 10
VolumeType: gp2
WordPressTaskDefinition:
Type: AWS::ECS::TaskDefinition
Properties:
Family: wordpress-service
Cpu: 256
Memory: 512
NetworkMode: awsvpc
RequiresCompatibilities:
- FARGATE
ExecutionRoleArn:
Fn::ImportValue:
!Join [':', [!Ref 'StackName', 'ECSTaskExecutionRole']]
TaskRoleArn:
Fn::If:
- 'HasCustomRole'
- !Ref 'Role'
- !Ref "AWS::NoValue"
ContainerDefinitions:
- Name: wordpress
Image: bitnami/wordpress
Cpu: 256
Memory: 512
Essential: true
LogConfiguration:
LogDriver: awslogs
Options:
awslogs-group: !Ref 'WordPressLogs'
awslogs-region: !Ref "AWS::Region"
awslogs-stream-prefix: dbx
PortMappings:
- ContainerPort: 80
Protocol: tcp
Environment:
- Name: MARIADB_HOST
Value: 'mariadb.dbx.local'
- Name: MARIADB_PORT_NUMBER
Value: '3306'
- Name: WORDPRESS_DATABASE_NAME
Value: 'wordpress'
- Name: WORDPRESS_DATABASE_USER
Value: 'mariadb'
- Name: WORDPRESS_DATABASE_PASSWORD
Value: 'mariadb'
- Name: WORDPRESS_USERNAME
Value: 'wordpress'
- Name: WORDPRESS_PASSWORD
Value: 'wordpress'
HealthCheck:
Command: ["CMD-SHELL", "curl -f http://localhost:80 || exit 1"]
Interval: 30
Retries: 5
StartPeriod: 30
Timeout: 5
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.