Remove irrelevant environment variables

This commit is contained in:
Martin Pépin 2017-05-16 21:43:30 +01:00
parent e28b73a2ec
commit 5dc43b2ac6
4 changed files with 7 additions and 19 deletions

View file

@ -96,9 +96,9 @@ TEMPLATES = [
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': os.environ['DBNAME'],
'USER': os.environ['DBUSER'],
'PASSWORD': os.environ['DBPASSWD'],
'NAME': DBNAME,
'USER': DBUSER,
'PASSWORD': DBPASSWD,
'PORT': 5432,
'HOST': 'localhost',
}

View file

@ -97,7 +97,6 @@ fill_template evenementiel/settings/secret.py
# Run the usual django admin commands
function venv_python {
sudo -H -u vagrant DJANGO_SETTINGS_MODULE=$SETTINGS \
DBUSER=$DBUSER DBNAME=$DBNAME DBPASSWD=$DBPASSWD \
~vagrant/venv/bin/python \
$@
}
@ -112,18 +111,13 @@ venv_python manage.py migrate
cat >> ~vagrant/.bashrc <<EOF
# On utilise les settings de développement
export DJANGO_SETTINGS_MODULE='evenementiel.settings_dev'
# Use the development settings
export DJANGO_SETTINGS_MODULE="$SETTINGS"
# Identifiants postgres
export DBUSER="$DBUSER"
export DBNAME="$DBNAME"
export DBPASSWD="$DBPASSWD"
# On va dans /vagrant où se trouve le code
# Move to the code's folder
cd /vagrant
# On active le virtualenv
# Activate the virtualenv
source ~vagrant/venv/bin/activate
EOF
chown vagrant: ~vagrant/.bashrc

View file

@ -9,9 +9,6 @@ Group=vagrant
TimeoutSec=300
WorkingDirectory=/vagrant
Environment="DJANGO_SETTINGS_MODULE={{SETTINGS}}"
Environment="DBNAME={{DBNAME}}"
Environment="DBUSER={{DBUSER}}"
Environment="DBPASSWD={{DBPASSWD}}"
ExecStart=/home/vagrant/venv/bin/daphne -u /srv/GE/GE.sock \
evenementiel.asgi:channel_layer

View file

@ -10,9 +10,6 @@ Group=vagrant
TimeoutSec=300
WorkingDirectory=/vagrant
Environment="DJANGO_SETTINGS_MODULE={{SETTINGS}}"
Environment="DBNAME={{DBNAME}}"
Environment="DBUSER={{DBUSER}}"
Environment="DBPASSWD={{DBPASSWD}}"
ExecStart=/home/vagrant/venv/bin/python manage.py runworker
[Install]