Commit 8aec6599 authored by okhin's avatar okhin 🚴

Merge branch 'master' into 'preprod'

Master

See merge request !41
parents 05f969f8 c07b4c58
Pipeline #2195 failed with stages
in 4 minutes and 27 seconds
...@@ -83,7 +83,7 @@ job deploy: ...@@ -83,7 +83,7 @@ job deploy:
environment: production environment: production
variables: variables:
PHINX_ENVIRONMENT: "production" PHINX_ENVIRONMENT: "production"
PROD_HOME: "$PROD_HOME" PROD_HOME: "/home/don/don/"
script: script:
- chmod a+x ci/install.sh - chmod a+x ci/install.sh
- ./ci/install.sh - ./ci/install.sh
......
# Database # Database
SQL_HOST=127.0.0.1 export SQL_HOST=127.0.0.1
SQL_PORT=3306 export SQL_PORT=3306
SQL_DATABASE=soutien export SQL_DATABASE=soutien
SQL_USER=soutien export SQL_USER=soutien
SQL_PASSWORD=soutien export SQL_PASSWORD=soutien
# Phinx configuration # Phinx configuration
PHINX_HOST=${SQL_HOST} export PHINX_HOST=${SQL_HOST}
PHINX_PORT=${SQL_PORT} export PHINX_PORT=${SQL_PORT}
PHINX_DATABASE=${SQL_DATABASE} export PHINX_DATABASE=${SQL_DATABASE}
PHINX_USER=${SQL_USER} export PHINX_USER=${SQL_USER}
PHINX_PASSWORD=${SQL_PASSWORD} export PHINX_PASSWORD=${SQL_PASSWORD}
SYSADMIN=replacewithyour@email.com export SYSADMIN=replacewithyour@email.com
FDNNURL1=https://secure.fd2n.org/fd2n/cb export FDNNURL1=https://secure.fd2n.org/fd2n/cb
FDNNURL2=https://secure.fdn2.org/fdn2/don export FDNNURL2=https://secure.fdn2.org/fdn2/don
BASE_DOMAIN=dev.laquadrature.net export BASE_DOMAIN=dev.laquadrature.net
PAYMENT_URL=http://localhost:5001/payment export PAYMENT_URL=http://localhost:5001/payment
RETURN_CHECK_URL= export RETURN_CHECK_URL=
SITE_ID=XXXXXXXX export SITE_ID=XXXXXXXX
CERTIFICATE=XXXXXXXXXXXXXXXXXXXXXXXXx export CERTIFICATE=XXXXXXXXXXXXXXXXXXXXXXXXx
CTX_MODE=TEST export CTX_MODE=TEST
PIPLOME_PATH=/var/www/site/pdf/ export PIPLOME_PATH=/var/www/site/pdf/
PIPLOME_URL=https://www.laquadrature.net/pdf/ export PIPLOME_URL=https://www.laquadrature.net/pdf/
CAMPAIGN_START_DATE=2016-11-10 export CAMPAIGN_START_DATE=2016-11-10
CAMPAIGN_BUDGET=321000 export CAMPAIGN_BUDGET=321000
LOGS=./ export LOGS=./
SMTP_HOST=smtp.example.com export SMTP_HOST=smtp.example.com
SMTP_PORT=25 export SMTP_PORT=25
SMTP_SECURITY=none export SMTP_SECURITY=none
SMTP_USER=user export SMTP_USER=user
SMTP_PW=password export SMTP_PW=password
DEBUG=0 export DEBUG=0
ENV=dev export ENV=dev
#!/bin/bash #!/bin/bash
# Ce script est utilisé pour paramétrer l'environnement du site # Ce script est utilisé pour paramétrer l'environnement du site
if [ "x$PROD_HOME" != "x" ]
then
HOME=$PROD_HOME
else
HOME=/var/www/dons/
fi
if [ -e "$HOME/app/env" ]
then
source $HOME/app/env
fi
cd /home/don/don cd $HOME
git reset --hard git reset --hard
git pull origin $CI_BUILD_REF_NAME git pull origin $CI_BUILD_REF_NAME
git checkout $CI_BUILD_REF_NAME git checkout $CI_BUILD_REF_NAME
...@@ -12,15 +23,15 @@ composer install --no-dev ...@@ -12,15 +23,15 @@ composer install --no-dev
composer update composer update
# Let's run the migrations # Let's run the migrations
if [ -e "phinx.yml" ] if [ -e "$HOME/phinx.yml" ]
then then
case $CI_BUILD_REF_NAME in case $CI_BUILD_REF_NAME in
master) master)
echo "master" echo "master"
php vendor/robmorgan/phinx/bin/phinx migrate -e production;; php vendor/robmorgan/phinx/bin/phinx migrate -c $HOME/phinx.yml -e production;;
preprod) preprod)
echo "preprod" echo "preprod"
php vendor/robmorgan/phinx/bin/phinx migrate -e development;; php vendor/robmorgan/phinx/bin/phinx migrate -c $HOME/phinx.yml -e development;;
esac esac
else else
case $CI_BUILD_REF_NAME in case $CI_BUILD_REF_NAME in
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment