-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaws.yml
145 lines (127 loc) · 2.9 KB
/
aws.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
version: '3.8'
services:
wordpress:
deploy:
resources:
reservations:
cpus: 1.0
memory: 1G
volumes:
- persistent:/bitnami/wordpress
environment:
WORDPRESS_SKIP_INSTALL: "no"
x-scaling:
Range: 1-5
x-alarms:
Predefined:
HighRamUsageAndMaxScaledOut:
Topics:
- x-sns: alarms
volumes:
persistent:
x-efs:
Properties:
LifecyclePolicies:
TransitionToIA: AFTER_14_DAYS
MacroParameters:
EnforceIamAuth: True
x-sns:
Topics:
alarms: {}
# Storage settings
x-rds:
wordpress-db:
Properties:
Engine: "aurora-mysql"
EngineVersion: "5.7"
BackupRetentionPeriod: 1
DatabaseName: wordpress
StorageEncrypted: True
Tags:
- Key: Name
Value: "dummy-db"
Services:
- name: wordpress
access: RW
SecretsMappings:
Mappings:
host: MARIADB_HOST
port: MARIADB_PORT_NUMBER
username: WORDPRESS_DATABASE_USER
password: WORDPRESS_DATABASE_PASSWORD
dbname: WORDPRESS_DATABASE_NAME
x-s3:
wp-data-bucket:
Properties:
AccessControl: BucketOwnerFullControl
PublicAccessBlockConfiguration:
BlockPublicAcls: True
BlockPublicPolicy: True
IgnorePublicAcls: True
RestrictPublicBuckets: False
BucketEncryption:
ServerSideEncryptionConfiguration:
- ServerSideEncryptionByDefault:
SSEAlgorithm: AES256
Services:
- name: wordpress
access:
Bucket: ListOnly
Objects: RW
# DNS and Ingress settings
x-dns:
PublicZone:
Name: demos.lambda-my-aws.io
Lookup: True
Records:
- Properties:
Name: wordpress.demos.lambda-my-aws.io
Type: A
Target: x-elbv2::wordpress-lb
x-acm:
wordpress-demo:
Lookup:
Tags:
- Name: demos.lambda-my-aws.io
- wildcard: "True"
x-elbv2:
wordpress-lb:
Properties:
Scheme: internet-facing
Type: application
MacroParameters:
Ingress:
ExtSources:
- IPv4: 0.0.0.0/0
Name: ANY
Description: "ANY"
Listeners:
- Port: 80
Protocol: HTTP
DefaultActions:
- Redirect: HTTP_TO_HTTPS
- Port: 443
Protocol: HTTPS
Certificates:
- x-acm: wordpress-demo
Targets:
- name: wordpress:wordpress
access: /
Services:
- name: wordpress:wordpress
port: 8080
protocol: HTTP
healthcheck: 8080:HTTP:/:7:2:15:5
# ECS Cluster settings
x-cluster:
Properties:
CapacityProviders:
- FARGATE
- FARGATE_SPOT
ClusterName: demo
DefaultCapacityProviderStrategy:
- Base: 2
CapacityProvider: FARGATE_SPOT
Weight: 2
- CapacityProvider: FARGATE
Weight: 1