@@ -75,19 +75,51 @@ Resources:
75
75
- !Ref SecretKey
76
76
- |+
77
77
78
+ - sudo tee -a /env.list <<< EMAIL_USE_TLS=
79
+ - !Ref EMailUseTSL
80
+ - |+
81
+
82
+ - sudo tee -a /env.list <<< EMAIL_HOST=
83
+ - !Ref EMailHost
84
+ - |+
85
+
86
+ - sudo tee -a /env.list <<< EMAIL_PORT=
87
+ - !Ref EMailHostPort
88
+ - |+
89
+
90
+ - sudo tee -a /env.list <<< EMAIL_HOST_USER=
91
+ - !Ref EMailHostUser
92
+ - |+
93
+
94
+ - sudo tee -a /env.list <<< EMAIL_HOST_PASSWORD=
95
+ - !Ref EMailHostPassword
96
+ - |+
97
+
98
+ - sudo tee -a /env.list <<< WORKERS=
99
+ - !Ref WorkersCount
100
+ - |+
101
+
102
+ - sudo tee -a /env.list <<< DEFAULT_FROM_EMAIL=
103
+ - !Ref FromEmail
104
+ - |+
105
+
106
+ - sudo tee -a /env.list <<< DOCKER_IMAGE=
107
+ - !Ref DockerImageName
108
+ - |+
109
+
78
110
- |
79
111
set -a
80
112
- |
81
113
source /env.list
82
114
- |
83
115
set +a
84
116
- |
85
- sudo docker pull doccano/doccano:latest
117
+ sudo docker pull ${DOCKER_IMAGE}
86
118
- >
87
119
sudo docker run -d --name doccano --env-file /env.list -p 80:8000
88
- doccano/doccano:latest
120
+ ${DOCKER_IMAGE}
89
121
- >
90
- sudo docker exec doccano tools/create-admin.sh ${ADMIN} ${EMAIL}
122
+ sleep 3 && sudo docker exec doccano tools/create-admin.sh ${ADMIN} ${EMAIL}
91
123
${PASSWORD}
92
124
Metadata :
93
125
' AWS::CloudFormation::Designer ' :
@@ -195,6 +227,7 @@ Parameters:
195
227
ConstraintDescription : must be the name of an existing EC2 KeyPair.
196
228
AdminUserName :
197
229
Description : The admin account user name
230
+ Default : ' admin'
198
231
Type : String
199
232
MinLength : 1
200
233
MaxLength : 16
@@ -224,6 +257,53 @@ Parameters:
224
257
Description : Secret key for Django
225
258
Type : String
226
259
AllowedPattern : ' ^[a-zA-Z0-9]*$'
260
+ EMailUseTSL :
261
+ Default : ' False'
262
+ AllowedValues :
263
+ - ' False'
264
+ - ' True'
265
+ Description : SMTP will use TSL
266
+ Type : String
267
+ AllowedPattern : ' ^[a-zA-Z0-9]*$'
268
+ EMailHost :
269
+ Description : SMTP Host
270
+ Type : String
271
+ AllowedPattern : ' ^[\w-]+(\.[\w-]+)*(\.[a-z]{2,})$'
272
+ EMailHostUser :
273
+ Description : SMTP Host User
274
+ Type : String
275
+ MinLength : 1
276
+ MaxLength : 25
277
+ AllowedPattern : ' ^[a-zA-Z0-9][a-zA-Z0-9]{1,25}$'
278
+ EMailHostPassword :
279
+ Description : SMTP Host User password
280
+ Type : String
281
+ NoEcho : true
282
+ MinLength : 0
283
+ MaxLength : 60
284
+ AllowedPattern : ' ^\p{Graph}+$'
285
+ EMailHostPort :
286
+ Description : SMTP Port
287
+ Type : String
288
+ MinLength : 1
289
+ MaxLength : 5
290
+ AllowedPattern : ' ^\d+$'
291
+ WorkersCount :
292
+ Description : Workers Count
293
+ Type : String
294
+ MinLength : 1
295
+ MaxLength : 3
296
+ AllowedPattern : ' ^\d+$'
297
+ FromEmail :
298
+ Default : webmaster@localhost
299
+ Description : The email used to send from singup messages
300
+ Type : String
301
+ AllowedPattern : ' ^[\x20-\x45]?[\w-\+]+(\.[\w]+)*@[\w-]+(\.[\w]+)*(\.[a-z]{2,})?$'
302
+ DockerImageName :
303
+ Default : doccano/doccano:latest
304
+ Description : The Docker image name
305
+ Type : String
306
+ AllowedPattern : ' ^[\w_-]+/[\w_-]+:[\w_-]+$'
227
307
Outputs :
228
308
PublicDNS :
229
309
Value : !GetAtt
0 commit comments