Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

Workflow de mise en production pour Symfony 3

Clone du dépot

git clone ...

Vérfier les deps Symfony

php bin/symfony_requirements

Installation deps

export SYMFONY_ENV=prod
composer install --no-dev --optimize-autoloader
php bin/console cache:clear --env=prod --no-debug

Vérifier/corriger les droits du dossier var

chown -R USER:www-data var

Initialiser la base Doctrine

php bin/console doctrine:schema:update --force

Créer l'utilisateur admin

php bin/console fos:user:create ADMIN_USER ADMIN_EMAIL STRONG_PASSWORD
php bin/console fos:user:promote ADMIN_USER ROLE_ADMIN

Créer le client OAuth2

php bin/console acme:oauth-server:client:create --grant-type="password" --grant-type="refresh_token" --grant-type="http://platform.local/grants/facebook_access_token" --grant-type="http://platform.local/grants/google_access_token"

Mise à jours (nouvelle version)

git pull
git checkout VERSION
export SYMFONY_ENV=prod
php bin/console doctrine:migrations:migrate
php bin/console cache:clear --env=prod

Sources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.