Top Banner
Alex Demchenko [email protected] Dockerize with Docker Compose , CI then Deploy the Symfony app
27

Auto deploy symfony app with codeship and elastic beanstalk

Apr 14, 2017

Download

Internet

Alex Demchenko
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Auto deploy symfony app with codeship and elastic beanstalk

Alex [email protected]

Dockerize with Docker Compose, CI then Deploy the Symfony app

Page 2: Auto deploy symfony app with codeship and elastic beanstalk

CEO at Lazy Ants

Founder filecessor.com

Organizer .com.ua

Page 3: Auto deploy symfony app with codeship and elastic beanstalk

Docker?

Page 4: Auto deploy symfony app with codeship and elastic beanstalk
Page 5: Auto deploy symfony app with codeship and elastic beanstalk
Page 6: Auto deploy symfony app with codeship and elastic beanstalk
Page 7: Auto deploy symfony app with codeship and elastic beanstalk

VM’s vs Containers?

Page 8: Auto deploy symfony app with codeship and elastic beanstalk
Page 9: Auto deploy symfony app with codeship and elastic beanstalk

What is container?• namespaces: user, pid, netns, …

— is what you can use• cgroups: memory, CPU, IO,

network, devices, … — is how much you can use

• copy to storage• …

Page 10: Auto deploy symfony app with codeship and elastic beanstalk

Any system where docker live is already

containerized

Page 11: Auto deploy symfony app with codeship and elastic beanstalk

Dev? There’s no Dev stage

Page 12: Auto deploy symfony app with codeship and elastic beanstalk

There’s only Production.

Page 13: Auto deploy symfony app with codeship and elastic beanstalk

Infrastructure is Important part of

service

Page 14: Auto deploy symfony app with codeship and elastic beanstalk

Docker Compose to the rescue

Page 15: Auto deploy symfony app with codeship and elastic beanstalk

Core Concept

Page 16: Auto deploy symfony app with codeship and elastic beanstalk

One container per service

Page 17: Auto deploy symfony app with codeship and elastic beanstalk

symfony nginx

Containers

mysql php-fpm

Page 18: Auto deploy symfony app with codeship and elastic beanstalk

Docker Compose orchestrating container

dependancies

Page 19: Auto deploy symfony app with codeship and elastic beanstalk

Dev is same as Prod

Page 20: Auto deploy symfony app with codeship and elastic beanstalk

> docker-compose build> docker-compose up -d> docker-compose stop> docker-compose run> docker-compose rm> docker-compose ps> docker-compose logs

Commands sheet

Page 21: Auto deploy symfony app with codeship and elastic beanstalk

https://github.com/pilot/symfony-docker-deploy

Page 22: Auto deploy symfony app with codeship and elastic beanstalk

runAWS Elastic Beanstalk

Steps

Page 23: Auto deploy symfony app with codeship and elastic beanstalk

setup CICodeship or Circleci

Steps

Page 24: Auto deploy symfony app with codeship and elastic beanstalk

git push hope your test are green

Steps

Page 25: Auto deploy symfony app with codeship and elastic beanstalk

Voila!you turn

Page 26: Auto deploy symfony app with codeship and elastic beanstalk

Thanks!Questions?

Alex [email protected]

@pilouanic

Page 27: Auto deploy symfony app with codeship and elastic beanstalk

Below links help me a lot

• https://docs.docker.com/engine/getstarted• https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/• https://documentation.codeship.com/• https://pages.codeship.com/docker• https://circleci.com/docs/docker/