Is your business ready for PHP7?
Find out with Docker!
Kamil Kopaczyk
Intro
PHP7 hype
The problem
Will it work with my application?
Testing the whole thing
Environment
Where and how
Application
Legacy code
Spaghetti code
Application size
Server settings
Dependencies
Methodology
Theory
What do we need:
- docker environment
- source code + php + nginx
Prerequisites
- docker engine
- docker client
- docker-compose
Docker Compose
docker run -p "80" --link some_fpm_container \
--volumes-from some_data_container \
-v ./config:/etc/nginx/conf.d \
-e VIRTUAL_HOST=php7szczecin.docker nginx
# docker-compose.yml
application:
image: iteraptor/symfony_app
volumes:
- ./:/var/www
tty: true
fpm:
image: php:5.6-fpm
working_dir: /var/www
expose:
- "9000"
volumes_from:
- application
nginx:
image: nginx
ports:
- "80"
links:
- fpm
volumes_from:
- application
volumes:
- ./config:/etc/nginx/conf.d
environment:
VIRTUAL_HOST: php7szczecin.docker
# docker-compose.php7.yml
fpm:
image: php:7.0-fpm
Demo time!
...cheap...
...we're one step closer...
CI, testing, staging, prod etc.
...but there are some caveats
Is your business ready for PHP7?
Find out with Docker!
Kamil Kopaczyk