Skip to content
Snippets Groups Projects
Commit 6681fedc authored by Nadja Geisler's avatar Nadja Geisler :sunny:
Browse files

rename env to venv

parent 53b88764
No related branches found
No related tags found
No related merge requests found
...@@ -48,8 +48,8 @@ Python requirements are listed in ``requirements.txt``. They can be installed wi ...@@ -48,8 +48,8 @@ Python requirements are listed in ``requirements.txt``. They can be installed wi
**Manual Setup** **Manual Setup**
1. setup a virtual environment using the proper python version ``virtualenv env -p python3.7`` 1. setup a virtual environment using the proper python version ``virtualenv venv -p python3.7``
1. activate virtualenv ``source env/bin/activate`` 1. activate virtualenv ``source venv/bin/activate``
1. install python requirements ``pip install -r requirements.txt`` 1. install python requirements ``pip install -r requirements.txt``
1. setup necessary database tables etc. ``python manage.py migrate`` 1. setup necessary database tables etc. ``python manage.py migrate``
1. prepare static files (can be omitted for dev setups) ``python manage.py collectstatic`` 1. prepare static files (can be omitted for dev setups) ``python manage.py collectstatic``
...@@ -78,8 +78,8 @@ Remember to use a secret key that is not stored in any repository or similar, an ...@@ -78,8 +78,8 @@ Remember to use a secret key that is not stored in any repository or similar, an
1. create a folder, e.g. ``mkdir /srv/AKPlanning/`` 1. create a folder, e.g. ``mkdir /srv/AKPlanning/``
1. change to the new directory ``cd /srv/AKPlanning/`` 1. change to the new directory ``cd /srv/AKPlanning/``
1. clone this repository ``git clone URL .`` 1. clone this repository ``git clone URL .``
1. setup a virtual environment using the proper python version ``virtualenv env -p python3.7`` 1. setup a virtual environment using the proper python version ``virtualenv venv -p python3.7``
1. activate virtualenv ``source env/bin/activate`` 1. activate virtualenv ``source venv/bin/activate``
1. update tools ``pip install --upgrade setuptools pip wheel`` 1. update tools ``pip install --upgrade setuptools pip wheel``
1. install python requirements ``pip install -r requirements.txt`` 1. install python requirements ``pip install -r requirements.txt``
1. create the file ``AKPlanning/settings_secrets.py`` (copy from ``settings_secrets.py.sample``) and fill it with the necessary secrets (e.g. generated by ``tr -dc 'a-z0-9!@#$%^&*(-_=+)' < /dev/urandom | head -c50``) (it is a good idea to restrict read permissions from others) 1. create the file ``AKPlanning/settings_secrets.py`` (copy from ``settings_secrets.py.sample``) and fill it with the necessary secrets (e.g. generated by ``tr -dc 'a-z0-9!@#$%^&*(-_=+)' < /dev/urandom | head -c50``) (it is a good idea to restrict read permissions from others)
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# activate virtualenv when necessary # activate virtualenv when necessary
if [ -z ${VIRTUAL_ENV+x} ]; then if [ -z ${VIRTUAL_ENV+x} ]; then
source env/bin/activate source venv/bin/activate
fi fi
# enable really all warnings, some of them are silenced by default # enable really all warnings, some of them are silenced by default
......
...@@ -6,12 +6,12 @@ ...@@ -6,12 +6,12 @@
set -ex set -ex
# remove old virtualenv # remove old virtualenv
rm -rf env/ rm -rf venv/
# Setup Python Environment # Setup Python Environment
# Requires: Virtualenv, appropriate Python installation # Requires: Virtualenv, appropriate Python installation
virtualenv env -p python3.7 virtualenv venv -p python3.7
source env/bin/activate source venv/bin/activate
pip install --upgrade setuptools pip wheel pip install --upgrade setuptools pip wheel
pip install -r requirements.txt pip install -r requirements.txt
......
...@@ -7,7 +7,7 @@ set -ex ...@@ -7,7 +7,7 @@ set -ex
# activate virtualenv if necessary # activate virtualenv if necessary
if [ -z ${VIRTUAL_ENV+x} ]; then if [ -z ${VIRTUAL_ENV+x} ]; then
source env/bin/activate source venv/bin/activate
fi fi
# set environment variable when we want to update in production # set environment variable when we want to update in production
......
...@@ -4,7 +4,7 @@ socket = 127.0.0.1:3035 ...@@ -4,7 +4,7 @@ socket = 127.0.0.1:3035
chdir = /srv/AKPlanning chdir = /srv/AKPlanning
wsgi-file = AKPlanning/wsgi.py wsgi-file = AKPlanning/wsgi.py
touch-reload = %(wsgi-file) touch-reload = %(wsgi-file)
virtualenv = env/ virtualenv = venv/
env = DJANGO_SETTINGS_MODULE=AKPlanning.settings_production env = DJANGO_SETTINGS_MODULE=AKPlanning.settings_production
processes = 4 processes = 4
threads = 2 threads = 2
......
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