File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ venv_dir="$sort_dir/venv"
17
17
pip=" $venv_dir /bin/pip"
18
18
python_version=" python3.12"
19
19
python=" $venv_dir /bin/python"
20
+ env_file=" $sort_dir /.env"
20
21
21
22
# Install British UTF-8 locale so we can use this with PostgreSQL.
22
23
# This is important to avoid the limitations of the LATIN1 character set.
@@ -25,6 +26,7 @@ sudo locale-gen en_GB.UTF-8
25
26
sudo update-locale
26
27
27
28
# Create Python virtual environment
29
+ mkdir --parents " $sort_dir "
28
30
apt update -qq
29
31
apt install --upgrade --yes -qq " $python_version " " $python_version -venv"
30
32
python3 -m venv " $venv_dir "
@@ -33,6 +35,11 @@ python3 -m venv "$venv_dir"
33
35
$pip install --quiet -r requirements.txt
34
36
cp --recursive * " $sort_dir /"
35
37
38
+ # Create environment file
39
+ sudo touch " $env_file "
40
+ sudo chown gunicorn:gunicorn " $env_file "
41
+ sudo chmod 600 " $env_file "
42
+
36
43
# Install static files into DJANGO_STATIC_ROOT
37
44
# This runs in a subshell because it's changing directory
38
45
(cd " $sort_dir " && exec $python manage.py collectstatic --no-input)
You can’t perform that action at this time.
0 commit comments