forked from DGNum/gestioCOF
Integrate the new settings workflow into vagrant
This commit is contained in:
parent
a5fb162aaf
commit
40abe81402
3 changed files with 8 additions and 5 deletions
|
@ -36,7 +36,7 @@ chown -R ubuntu:www-data /var/www/static
|
|||
# Mise en place du .bash_profile pour tout configurer lors du `vagrant ssh`
|
||||
cat >> ~ubuntu/.bashrc <<EOF
|
||||
# On utilise la version de développement de GestioCOF
|
||||
export DJANGO_SETTINGS_MODULE='cof.settings_dev'
|
||||
export DJANGO_SETTINGS_MODULE='cof.settings.dev'
|
||||
|
||||
# Identifiants MySQL
|
||||
export DBUSER="$DBUSER"
|
||||
|
@ -61,8 +61,11 @@ sudo -H -u ubuntu python3 -m venv ~ubuntu/venv
|
|||
sudo -H -u ubuntu ~ubuntu/venv/bin/pip install -U pip
|
||||
sudo -H -u ubuntu ~ubuntu/venv/bin/pip install -r requirements.txt -r requirements-devel.txt
|
||||
|
||||
# Installation des secrets
|
||||
sudo -H -u ubuntu cp cof/settings/secret_example.py cof/settings/secret.py
|
||||
|
||||
# Préparation de Django
|
||||
sudo -H -u ubuntu DJANGO_SETTINGS_MODULE='cof.settings_dev' DBUSER=$DBUSER DBNAME=$DBNAME DBPASSWD=$DBPASSWD bash provisioning/prepare_django.sh
|
||||
sudo -H -u ubuntu DJANGO_SETTINGS_MODULE='cof.settings.dev' DBUSER=$DBUSER DBNAME=$DBNAME DBPASSWD=$DBPASSWD bash provisioning/prepare_django.sh
|
||||
|
||||
# Installation du cron pour les mails de rappels
|
||||
sudo -H -u ubuntu crontab provisioning/cron.dev
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# On utilise la version de développement de GestioCOF
|
||||
DJANGO_SETTINGS_MODULE='cof.settings_dev'
|
||||
DJANGO_SETTINGS_MODULE='cof.settings.dev'
|
||||
|
||||
# Identifiants MySQL
|
||||
DBUSER="cof_gestion"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
command=/home/ubuntu/venv/bin/python /vagrant/manage.py runworker
|
||||
directory=/vagrant/
|
||||
user=ubuntu
|
||||
environment=DBUSER={DBUSER},DBNAME={DBNAME},DBPASSWD={DBPASSWD},DJANGO_SETTINGS_MODULE="cof.settings_dev"
|
||||
environment=DBUSER={DBUSER},DBNAME={DBNAME},DBPASSWD={DBPASSWD},DJANGO_SETTINGS_MODULE="cof.settings.dev"
|
||||
autostart=true
|
||||
autorestart=true
|
||||
redirect_stderr=true
|
||||
|
@ -11,7 +11,7 @@ redirect_stderr=true
|
|||
|
||||
[program:interface]
|
||||
command=/home/ubuntu/venv/bin/daphne -b 127.0.0.1 -p 8001 cof.asgi:channel_layer
|
||||
environment=DBUSER={DBUSER},DBNAME={DBNAME},DBPASSWD={DBPASSWD},DJANGO_SETTINGS_MODULE="cof.settings_dev"
|
||||
environment=DBUSER={DBUSER},DBNAME={DBNAME},DBPASSWD={DBPASSWD},DJANGO_SETTINGS_MODULE="cof.settings.dev"
|
||||
directory=/vagrant/
|
||||
redirect_stderr=true
|
||||
autostart=true
|
||||
|
|
Loading…
Reference in a new issue