-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.example.sh
More file actions
executable file
·41 lines (31 loc) · 1.13 KB
/
Copy pathdeploy.example.sh
File metadata and controls
executable file
·41 lines (31 loc) · 1.13 KB
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
#!/bin/bash
set -e
BUCKET="mfe"
ENDPOINT="https://storage.yandexcloud.net"
BASE_URL="https://mfe.website.yandexcloud.net"
echo "==> Подготовка prod манифеста..."
cp projects/shell/src/federation.manifest.json projects/shell/src/federation.manifest.dev.json
cp projects/shell/src/federation.manifest.prod.json projects/shell/src/federation.manifest.json
echo "==> Сборка Angular MFE..."
npx ng build angular-mfe
echo "==> Сборка React MFE..."
npm --prefix projects/react-mfe run build
echo "==> Сборка Shell..."
npx ng build shell
echo "==> Загрузка Shell..."
aws s3 sync dist/shell/browser/ s3://$BUCKET/ \
--endpoint-url=$ENDPOINT \
--delete
echo "==> Загрузка Angular MFE..."
aws s3 sync dist/angular-mfe/browser/ s3://$BUCKET/angular-mfe/ \
--endpoint-url=$ENDPOINT \
--delete
echo "==> Загрузка React MFE..."
aws s3 sync projects/react-mfe/dist/ s3://$BUCKET/react-mfe/ \
--endpoint-url=$ENDPOINT \
--delete
echo ""
echo "Деплой завершён"
echo " Shell: $BASE_URL"
echo " Angular MFE: $BASE_URL/angular-mfe"
echo " React MFE: $BASE_URL/react-mfe"