Remove irrelevant environment variables
This commit is contained in:
parent
e28b73a2ec
commit
5dc43b2ac6
4 changed files with 7 additions and 19 deletions
|
@ -96,9 +96,9 @@ TEMPLATES = [
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
'default': {
|
'default': {
|
||||||
'ENGINE': 'django.db.backends.postgresql',
|
'ENGINE': 'django.db.backends.postgresql',
|
||||||
'NAME': os.environ['DBNAME'],
|
'NAME': DBNAME,
|
||||||
'USER': os.environ['DBUSER'],
|
'USER': DBUSER,
|
||||||
'PASSWORD': os.environ['DBPASSWD'],
|
'PASSWORD': DBPASSWD,
|
||||||
'PORT': 5432,
|
'PORT': 5432,
|
||||||
'HOST': 'localhost',
|
'HOST': 'localhost',
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,7 +97,6 @@ fill_template evenementiel/settings/secret.py
|
||||||
# Run the usual django admin commands
|
# Run the usual django admin commands
|
||||||
function venv_python {
|
function venv_python {
|
||||||
sudo -H -u vagrant DJANGO_SETTINGS_MODULE=$SETTINGS \
|
sudo -H -u vagrant DJANGO_SETTINGS_MODULE=$SETTINGS \
|
||||||
DBUSER=$DBUSER DBNAME=$DBNAME DBPASSWD=$DBPASSWD \
|
|
||||||
~vagrant/venv/bin/python \
|
~vagrant/venv/bin/python \
|
||||||
$@
|
$@
|
||||||
}
|
}
|
||||||
|
@ -112,18 +111,13 @@ venv_python manage.py migrate
|
||||||
|
|
||||||
cat >> ~vagrant/.bashrc <<EOF
|
cat >> ~vagrant/.bashrc <<EOF
|
||||||
|
|
||||||
# On utilise les settings de développement
|
# Use the development settings
|
||||||
export DJANGO_SETTINGS_MODULE='evenementiel.settings_dev'
|
export DJANGO_SETTINGS_MODULE="$SETTINGS"
|
||||||
|
|
||||||
# Identifiants postgres
|
# Move to the code's folder
|
||||||
export DBUSER="$DBUSER"
|
|
||||||
export DBNAME="$DBNAME"
|
|
||||||
export DBPASSWD="$DBPASSWD"
|
|
||||||
|
|
||||||
# On va dans /vagrant où se trouve le code
|
|
||||||
cd /vagrant
|
cd /vagrant
|
||||||
|
|
||||||
# On active le virtualenv
|
# Activate the virtualenv
|
||||||
source ~vagrant/venv/bin/activate
|
source ~vagrant/venv/bin/activate
|
||||||
EOF
|
EOF
|
||||||
chown vagrant: ~vagrant/.bashrc
|
chown vagrant: ~vagrant/.bashrc
|
||||||
|
|
|
@ -9,9 +9,6 @@ Group=vagrant
|
||||||
TimeoutSec=300
|
TimeoutSec=300
|
||||||
WorkingDirectory=/vagrant
|
WorkingDirectory=/vagrant
|
||||||
Environment="DJANGO_SETTINGS_MODULE={{SETTINGS}}"
|
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 \
|
ExecStart=/home/vagrant/venv/bin/daphne -u /srv/GE/GE.sock \
|
||||||
evenementiel.asgi:channel_layer
|
evenementiel.asgi:channel_layer
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,6 @@ Group=vagrant
|
||||||
TimeoutSec=300
|
TimeoutSec=300
|
||||||
WorkingDirectory=/vagrant
|
WorkingDirectory=/vagrant
|
||||||
Environment="DJANGO_SETTINGS_MODULE={{SETTINGS}}"
|
Environment="DJANGO_SETTINGS_MODULE={{SETTINGS}}"
|
||||||
Environment="DBNAME={{DBNAME}}"
|
|
||||||
Environment="DBUSER={{DBUSER}}"
|
|
||||||
Environment="DBPASSWD={{DBPASSWD}}"
|
|
||||||
ExecStart=/home/vagrant/venv/bin/python manage.py runworker
|
ExecStart=/home/vagrant/venv/bin/python manage.py runworker
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|
Loading…
Reference in a new issue