Skip to content
Snippets Groups Projects
Commit 9f155a62 authored by derneuere's avatar derneuere
Browse files

Remove secret key

parent 8e3387ad
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,23 @@
export PYTHONUNBUFFERED=TRUE
export PYTHONFAULTHANDLER=1
mkdir -p /logs
if [ -n "$SECRET_KEY" ]
then
echo "Use env SECRET_KEY"
else
if [ -f /logs/secret.key ]
then
echo "Use existing secret.key"
SECRET_KEY=`cat /logs/secret.key`
export SECRET_KEY=$SECRET_KEY
else
echo "Create new secret.key"
SECRET_KEY=$(python -c 'from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())')
echo $SECRET_KEY > /logs/secret.key
export SECRET_KEY=$SECRET_KEY
fi
fi
python image_similarity/main.py 2>&1 | tee /logs/gunicorn_image_similarity.log &
python manage.py showmigrations | tee /logs/show_migrate.log
python manage.py migrate | tee /logs/command_migrate.log
......
......@@ -10,9 +10,6 @@ myPhotos=./librephotos/pictures
# Internal data of LibrePhotos
data=./librephotos/data
# Secret Key. Get one here https://rb.gy/emgmwo (Shortened random.org link)
shhhhKey=D2VymuMn2gAhx4tmAawd
# ------------------------------------------------------------------------------------------------
# Wow, we are at the optional now. Pretty easy so far. You do not have to change any of the below.
......@@ -21,7 +18,7 @@ shhhhKey=D2VymuMn2gAhx4tmAawd
httpPort=3000
# What branch should we install the latest weekly build or the development branch (dev)
tag=latest
tag=dev
# Number of workers, which take care of the request to the api. This setting can dramatically affect the ram usage.
# A positive integer generally in the 2-4 x $(NUM_CORES) range.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment