This repository has been archived on 2026-10-29. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
GCLP/deploy/rel.sh

20 lines
716 B
Shell
Raw Normal View History

2020-10-03 13:23:48 +07:00
#!/bin/bash
# don't forget to modify it, according to your db credentials
if [ -z "$DATABASE_URL"]; then
echo 'export DATABASE_URL=ecto://postgres:postgres@localhost/lp_dev' >> ~/.bashrc
fi
if [ -z "$SECRET_KEY_BASE"]; then
key=`mix phx.gen.secret`
echo 'export SECRET_KEY_BASE='$key >> ~/.bashrc
fi
if [ -z "$PORT"]; then
2020-10-05 20:05:30 +07:00
echo 'export PORT=80' >> ~/.bashrc
# echo 'export PORT=443' >> ~/.bashrc that was a mistake. it is http port in prod
2020-10-05 17:44:12 +07:00
fi
# and cert paths
if [ -z "$GCLP_SSL_KEY_PATH"]; then
2020-10-05 18:13:01 +07:00
echo 'export GCLP_SSL_KEY_PATH=~/GCLP/lp/priv/cert/selfsigned_key.pem' >> ~/.bashrc
2020-10-05 17:44:12 +07:00
fi
if [ -z "$GCLP_APP_SSL_CERT_PATH"]; then
2020-10-05 18:13:01 +07:00
echo 'export GCLP_APP_SSL_CERT_PATH=~/GCLP/lp/priv/cert/selfsigned.pem' >> ~/.bashrc
2020-10-03 13:23:48 +07:00
fi