ECCENTRIC DEVELOPER
Oscar Fanelli
Full-stack developer
Zend Framework
Doctrine
ReactJS
Tom's Hardware
Docker
PhpStorm
(sul serio, vi basta cercare "Oscar Fanelli", sanno anche quando vado a fare la cacca)
ECCENTRIC DEVELOPER
Luca Mattivi
.NET Developer
Full-stack Developer
Laravel
AngularJS
Uala CTO
Docker
IoT
MAMP
Brew
brew update && brew upgrade...
% /usr/local/bin/gpg1
dyld: Library not loaded: /usr/local/opt/libusb-compat/lib/libusb-0.1.4.dylib
Referenced from: /usr/local/bin/gpg1
Reason: image not found
[1] 41295 trace trap /usr/local/bin/gpg1
error: unable to unlink old '.gitignore' (Permission denied)
error: unable to create file .travis.yml (Permission denied)
error: unable to create file .yardopts (Permission denied)
error: unable to unlink old 'CODEOFCONDUCT.md' (Permission denied) ...
npm ERR! Darwin 13.3.0
npm ERR! argv "node" "/Users/user/.node/bin/npm" "update" "-g"
npm ERR! node v0.10.32
npm ERR! npm v2.0.0
npm ERR! code EPEERINVALID
npm ERR! peerinvalid The package npmconf does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer npm-registry-client@3.2.2 wants npmconf@^2.1.0
Vagrant
devops...
Docker
Dockerfile
FROM ubuntu:16.04
MAINTAINER Oscar Fanelli <oscar.fanelli@gmail.com>
ENV PROJECT_PATH=/var/www \
DEBIAN_FRONTEND=noninteractive
# Utilities, Apache, PHP, and supplementary programs
RUN apt-get update -q && apt-get upgrade && apt-get install -yqq --force-yes \
npm \
git \
wget \
apache2 \
libapache2-mod-php \
php \
php-curl \
php-mysql \
php-redis \
php-xml
# Apache mods
RUN a2enmod rewrite expires headers
# PHP.ini file: enable <? ?> tags and quiet logging
RUN sed -i "s/short_open_tag = .*/short_open_tag = On/" $PHP_INI && \
sed -i "s/memory_limit = .*/memory_limit = 256M/" $PHP_INI
# VirtualHost
COPY config/docker/apache-virtualhost.conf /etc/apache2/sites-available/000-default.conf
# Port to expose
EXPOSE 80
# Copy site into place
COPY . $PROJECT_PATH
WORKDIR $PROJECT_PATH
# Start apache
CMD /usr/sbin/apache2ctl -D FOREGROUND
Docker Compose
version: '2'
services:
db:
image: mysql:5.7.17
volumes:
- "./.data/db:/var/lib/mysql"
environment:
MYSQL_ROOT_PASSWORD: secret
expose:
- "3306"
redis:
image: redis
phpmyadmin:
image: phpmyadmin/phpmyadmin
depends_on:
- db
web:
build:
context: .
dockerfile: Dockerfile
volumes:
- ".:/var/www/"
depends_on:
- db
- redis
env_file: .env
Upgrade da PHP 5.6 a 7.0
Docker
alcuni numeri su Uala
AWS?
~10/12k € al mese
Private Cloud (con Rancher)
250 € al mese
vs
Necessità
Cosa fa?
TEST & BUILD
CODE & PUSH
PRIVATE REPOSITORY
DEPLOY & RUN
Deployment Flow
oscar.fanelli@gmail.com
@nesis
@pensiero
Oscar Fanelli
Luca Mattivi
luca@uala.it
@leen151
@leen15
Link utili