Page MenuHomeSealhub

replace.sh
No OneTemporary

replace.sh

#!/bin/bash
# HOW TO USE:
# chmod +x replace.sh
# app_port=9080 project_name=testing mongo_external_port=9990 nginx_http_port=1123 nginx_https_port=1590 ./replace.sh
function is_not_empty {
if [[ -z "$1" ]]
then
echo "Argument missing!"
exit 1
fi
}
is_not_empty $app_port
is_not_empty $project_name
is_not_empty $mongo_external_port
is_not_empty $nginx_http_port
is_not_empty $nginx_https_port
sed -i "s/<<app_port>>/$app_port/g" app.dockerfile docker-compose.yml sealious.yml vhost.conf src/backend/collections/users.test.js config.js
sed -i "s/<<project_name>>/$project_name/g" app.dockerfile docker-compose.yml package.json src/frontend/index.html src/frontend/components/Main/Main.jsx manifest.js
sed -i "s/<<mongo_external_port>>/$mongo_external_port/g" docker-compose.yml
sed -i "s/<<nginx_http_port>>/$nginx_http_port/g" docker-compose.yml vhost.conf
sed -i "s/<<nginx_https_port>>/$nginx_https_port/g" docker-compose.yml vhost.conf
rm replace.sh

File Metadata

Mime Type
text/x-shellscript
Expires
Sun, Nov 24, 03:25 (20 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
548142
Default Alt Text
replace.sh (989 B)

Event Timeline