mirror of
https://github.com/jambonz/jambonz-infrastructure.git
synced 2026-10-31 07:04:11 +00:00
jambonz-mini: build webapp in packer rather than when deployed
This commit is contained in:
1 parent
a8b885a313
commit
9f43c222ae
2 files changed
+7
-5
No files matched your search
@@ -61,7 +61,7 @@ Parameters:
|
||||
Mappings:
|
||||
AWSRegion2AMI:
|
||||
us-east-1:
|
||||
Ami: ami-070ec74766e893dd8
|
||||
Ami: ami-0e2b5e5e6a5fa46ce
|
||||
Resources:
|
||||
VPC:
|
||||
Type: 'AWS::EC2::VPC'
|
||||
@@ -142,9 +142,11 @@ Resources:
|
||||
echo "REACT_APP_ENABLE_SUBSPACE=1" >>
|
||||
/home/admin/apps/jambonz-webapp/.env
|
||||
- >
|
||||
cd /home/admin/apps/jambonz-webapp && npm run build
|
||||
- |
|
||||
# update ecosystem.config.js with private ip
|
||||
REACT_APP_API_BASE_URL=http://${PUBLIC_IPV4}/api/v1
|
||||
- >
|
||||
TAG="<script>window.JAMBONZ = { APP_API_BASE_URL: '${REACT_APP_API_BASE_URL}'};</script>"
|
||||
- >
|
||||
sed -i -e "\@</head>@i\ $TAG" /home/admin/apps/jambonz-webapp/build/index.html
|
||||
- >
|
||||
sudo -u admin bash -c "pm2 restart
|
||||
/home/admin/apps/ecosystem.config.js"
|
||||
|
||||
@@ -13,7 +13,7 @@ cd /home/admin/apps/fsw-clear-old-calls && npm ci --unsafe-perm && sudo npm inst
|
||||
echo "building jambonz-api-server.."
|
||||
cd /home/admin/apps/jambonz-api-server && npm ci --unsafe-perm
|
||||
echo "building jambonz-webapp.."
|
||||
cd /home/admin/apps/jambonz-webapp && npm ci --unsafe-perm
|
||||
cd /home/admin/apps/jambonz-webapp && npm ci --unsafe-perm && npm run build
|
||||
echo "building sbc-options-handler.."
|
||||
cd /home/admin/apps/sbc-options-handler && npm ci --unsafe-perm
|
||||
echo "building sbc-inbound.."
|
||||
|
||||
Reference in new issue
Block a user