forked from bcgov/gwells
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.envrc
59 lines (54 loc) · 2.09 KB
/
.envrc
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# If you're using https://direnv.net/, this file assists in ensuring that your environment is set up
# correctly.
# Ensure you're running the correct virtual environment
layout python3
# Set all required environment variables.
export DATABASE_SERVICE_NAME=localhost
export LOCALHOST_SERVICE_HOST=localhost
export LOCALHOST_SERVICE_PORT=5432
export DATABASE_ENGINE=postgresql
export DATABASE_NAME=gwells
export DATABASE_USER=gwells
export DATABASE_PASSWORD=gwells
export DATABASE_SCHEMA=public
export DJANGO_SECRET_KEY=blah
export DJANGO_DEBUG=True
export APP_CONTEXT_ROOT=gwells
export ENABLE_GOOGLE_ANALYTICS=False
export ENABLE_DATA_ENTRY=True
export AXIOS_BASEURL=http://127.0.0.1:8000/
export LEGACY_DATABASE_USER=wells
export LEGACY_DATABASE_NAME=wells
export LEGACY_SCHEMA=wells
export SESSION_COOKIE_SECURE=False
export CSRF_COOKIE_SECURE=False
export ENABLE_ADDITIONAL_DOCUMENTS=True
export DJANGO_ADMIN_URL=admin
export REQUIRE_ENV_VARIABLES=True
export S3_HOST=s3.ca-central-1.amazonaws.com
export S3_ROOT_BUCKET=gwells-docs
# Check if requirements.txt has changed
echo "Checking if requirements has changed..."
read current_md5 _ <<< $(cat requirements.txt | md5 | awk '{print $1}')
read prev_md5 _ <<< $(cat requirements.md5)
if [ "$current_md5" != "$prev_md5" ]
then
echo "requirements.txt seems to have changed, running pip install."
pip install --upgrade -r requirements.txt
echo "Storing md5 for current requirements.txt..."
echo "$current_md5" > requirements.md5
else
echo "requiremens.txt doesn't seem to have changed."
fi