@@ -10,18 +10,43 @@ ssm() {
10
10
echo $( aws --profile uneet-dev ssm get-parameters --names $1 --with-decryption --query Parameters[0].Value --output text)
11
11
}
12
12
13
+ setuplocal () {
14
+ cat << EOF >> .env
15
+ APIENROLL_LAMBDA_URL=http://localhost:4000
16
+ INVITE_LAMBDA_URL=http://localhost:9000
17
+ UNIT_CREATE_LAMBDA_URL=http://localhost:4001/create
18
+ EOF
19
+ }
20
+
13
21
cat << EOF > .env
14
22
BUGZILLA_ADMIN_KEY=$( ssm BUGZILLA_ADMIN_KEY)
15
23
MAIL_URL=smtps://$( ssm SES_SMTP_USERNAME) :$( ssm SES_SMTP_PASSWORD) @email-smtp.us-west-2.amazonaws.com:465
16
24
CLOUDINARY_URL=https://api.cloudinary.com/v1_1/unee-t-staging/image/upload
17
25
CLOUDINARY_PRESET=$( ssm CLOUDINARY_PRESET)
18
26
API_ACCESS_TOKEN=$( ssm API_ACCESS_TOKEN)
19
27
FROM_EMAIL="Local Unee-T Case <[email protected] >"
20
- APIENROLL_LAMBDA_URL=http://localhost:4000
21
- INVITE_LAMBDA_URL=http://localhost:9000
22
- UNIT_CREATE_LAMBDA_URL=http://localhost:4001/create
23
28
STAGE=dev
24
29
DOMAIN=unee-t.com
25
30
PDFGEN_LAMBDA_URL=https://pdfgen.dev.unee-t.com
26
31
PDFCONVERT_LAMBDA_URL=https://prince.dev.unee-t.com
27
32
EOF
33
+
34
+ if ! curl -s localhost:8081
35
+ then
36
+ read -p " https://github.com/unee-t/bugzilla-customisation not running, use https://dashboard.dev.unee-t.com/ ?" -n 1 -r
37
+ echo # (optional) move to a new line
38
+ if [[ $REPLY =~ ^[Yy]$ ]]
39
+ then
40
+ cat << EOF >> .env
41
+ APIENROLL_LAMBDA_URL=https://apienroll.dev.unee-t.com
42
+ INVITE_LAMBDA_URL=https://invite.dev.unee-t.com
43
+ UNIT_CREATE_LAMBDA_URL=https://unit.dev.unee-t.com/create
44
+ BUGZILLA_URL=https://dashboard.dev.unee-t.com/
45
+ EOF
46
+ else
47
+ echo Setting up for local https://github.com/unee-t/bugzilla-customisation
48
+ setuplocal
49
+ fi
50
+ else
51
+ setuplocal
52
+ fi
0 commit comments