pilot / symfony-docker-deploy

Auto deploy symfony app with codeship.com and elastic beanstalk
6 stars 3 forks source link

Dockerized Symfony app

How to auto deploy test-green docker base symfony application to the Elastic Beanstalk

Presentation Slides

http://www.slideshare.net/redpilot/auto-deploy-symfony-app-with-codeship-and-elastic-beanstalk

first run

sfcampua

configure codeship.com CI for test and auto deploy

codeship-setup

# <- this is a comment and won't be executed
# Feel free to delete all the comments and type in your own commands
# Each line is treated like a command that you execute in a local shell.
# i.e.: rvm use 2.2.2
# i.e.: bundle install
# Set Environment Vars for Symfony test
export SYMFONY_ENV=test
export SYMFONY__TEST_DATABASE_USER=$MYSQL_USER
export SYMFONY__TEST_DATABASE_PASSWORD=$MYSQL_PASSWORD
export SYMFONY__TEST_DATABASE_NAME=test
# Copy the parameters.yml.dist
cp app/config/parameters.yml.dist app/config/parameters.yml
# Install dependencies through Composer
composer install --prefer-source --no-interaction
# Clear Cache
php ./bin/console --env=test cache:clear

codeship-setup-tests

# <- this is a comment and won't be executed
# Feel free to delete all the comments and type in your own commands
# Each line is treated like a command that you execute in a local shell.
# i.e.: rvm use 2.2.2
# i.e.: bundle install
phpunit -c ./

codeship-test-run

Create application on Elastic Beanstalk

elastic-beanstalk

image

image

elastic-beanstalk-app

Setup Elastic Beanstalk CLI on your local machine

Auto deploy your app

image

image

for Questions

License