-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathset_values.sh
28 lines (18 loc) · 1.18 KB
/
set_values.sh
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
#!/bin/bash
# frontend variables
sed -i "s|main_host|$BACKEND_HOST|g" ./pixelapp_fe/src/const/node-server-config.js
sed -i "s|be_port|$BACKEND_PORT|g" ./pixelapp_fe/src/const/node-server-config.js
sed -i "s|aws_url|$BUCKET_URL_APP|g" ./pixelapp_fe/src/const/node-server-config.js
# backend variables
sed -i "s|AWS_ACCESS_KEY|$AWS_ACCESS_KEY|g" ./pixelapp_be/const/aws-config.json
sed -i "s|AWS_SECRET_KEY|$AWS_SECRET_KEY|g" ./pixelapp_be/const/aws-config.json
sed -i "s|AWS_APP_REGION|$AWS_APP_REGION|g" ./pixelapp_be/const/aws-config.json
sed -i "s|process.env.HOST|"\"$FRONTEND_HOST\""|g" ./pixelapp_be/const/node-config.js
sed -i "s|process.env.FE_PORT|"\"$FRONTEND_PORT\""|g" ./pixelapp_be/const/node-config.js
sed -i "s|process.env.G_NAME|"\"$G_NAME\""|g" ./pixelapp_be/routes/index.js
sed -i "s|process.env.G_PASS|"\"$G_PASS\""|g" ./pixelapp_be/routes/index.js
sed -i "s|process.env.AWS_BUCKET_NAME|"\"$BUCKET_NAME\""|g" ./pixelapp_be/routes/post.js
sed -i "s|DATABASE_USER|$DB_USER|g" ./pixelapp_be/app.js
sed -i "s|DATABASE_ENDPOINT|$DB_ENDPOINT|g" ./pixelapp_be/app.js
sed -i "s|DATABASE_PASSWORD|$DB_PASS|g" ./pixelapp_be/app.js
sed -i "s|DATABASE_NAME|$DB_NAME|g" ./pixelapp_be/app.js