Config Vagrant partielle
fixes needed
This commit is contained in:
parent
c6d1fc2791
commit
18ec91f642
1 changed files with 4 additions and 2 deletions
|
@ -9,12 +9,13 @@ DBPASSWD="4KZt3nGPLVeWSvtBZPsd9jdssdJMds78"
|
||||||
|
|
||||||
# Installation de paquets utiles
|
# Installation de paquets utiles
|
||||||
apt-get update && apt-get install -y python3-pip python3-dev \
|
apt-get update && apt-get install -y python3-pip python3-dev \
|
||||||
libpq-dev postgresql postgresql-contrib
|
libpq-dev postgresql postgresql-contrib libjpeg-dev
|
||||||
|
|
||||||
# Setup Database and User
|
# Setup Database and User
|
||||||
sudo -u postgres createdb $DBNAME
|
sudo -u postgres createdb $DBNAME
|
||||||
sudo -u postgres createuser -SDR $DBUSER
|
sudo -u postgres createuser -SDR $DBUSER
|
||||||
sudo -u postgres psql -c "ALTER USER $DBUSER WITH PASSWORD '$DBPASSWD';"
|
sudo -u postgres psql -c "ALTER USER $DBUSER WITH PASSWORD '$DBPASSWD';"
|
||||||
|
sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $DBNAME TO $DBUSER;"
|
||||||
|
|
||||||
# Mise en place du .bash_profile pour tout configurer lors du `vagrant ssh`
|
# Mise en place du .bash_profile pour tout configurer lors du `vagrant ssh`
|
||||||
cat > ~vagrant/.bash_profile <<EOF
|
cat > ~vagrant/.bash_profile <<EOF
|
||||||
|
@ -35,7 +36,8 @@ chown vagrant: ~vagrant/.bash_profile
|
||||||
cd /vagrant
|
cd /vagrant
|
||||||
|
|
||||||
# Installation des dépendances python
|
# Installation des dépendances python
|
||||||
sudo -H -u vagrant pip3 install --user -r requirements.txt -r requirements-devel.txt
|
sudo -H -u vagrant pip3 install --user -r requirements.txt
|
||||||
|
sudo -H -u vagrant pip3 install --user -r requirements-devel.txt
|
||||||
|
|
||||||
# Préparation de Django
|
# Préparation de Django
|
||||||
sudo -H -u vagrant DJANGO_SETTINGS_MODULE='evenementiel.settings_dev' DBUSER=$DBUSER DBNAME=$DBNAME DBPASSWD=$DBPASSWD python3 manage.py migrate
|
sudo -H -u vagrant DJANGO_SETTINGS_MODULE='evenementiel.settings_dev' DBUSER=$DBUSER DBNAME=$DBNAME DBPASSWD=$DBPASSWD python3 manage.py migrate
|
||||||
|
|
Loading…
Reference in a new issue