David Flores
Software developer | CTO at indava.com | @phpmx User Group Leader
#PHP #Linux #Docker #Symfony #Drupal #InfoSec #Security #Golang
david@indava.com
@dmouse
David Flores
Started @drupalconsole with great friends #Linux #Docker #Symfony #Drupal #Python #GoLang, Techlead @indavaIT. Sometimes ... nerd speaker.
david@indava.com
@dmouse
https://github.com/dmouse
https://phpmexico.mx
Is a tool for defining and running multi-container Docker applications.
https://docs.docker.com/compose/
$ docker run --name app-redis -d redis
$ docker run --name app-php -d --link app-redis:redis php:7-fpm
$ docker run --name app-nginx -d -p 8080:80 \
-v app:/var/www/html --link app-php:php \
-e "NGINX_HOST=foobar.com" -e "NGINX_PORT=80" nginx
app-redis:
image: redis
app-php:
image: php:7-fpm
links:
- app-redis:redis
app-nginx:
image: nginx
links:
- app-php:php
volumes:
- app:/var/www/html
environment:
- NGINX_HOST=foobar.com
- NGINX_PORT=80
ports:
- "8080:80"
$ docker-compose up -d
~/p/w/indava.dev docker-compose up -d
Starting indavadev_indavaComDB_1
Starting indava-dev
https://en.wikipedia.org/wiki/Comparison_of_continuous_integration_software
postgresql:
image: sameersbn/postgresql:9.4-3
environment:
- DB_USER=gitlab
- DB_PASS=password
- DB_NAME=gitlabhq_production
volumes:
- /home/docker/gitlab/postgresql:/var/lib/postgresql
https://github.com/indava/gitlab/
redis:
image: sameersbn/redis:latest
volumes:
- /home/gitlab/redis:/var/lib/redis
https://github.com/indava/gitlab/
gitlab:
image: sameersbn/gitlab:12.9.2
links:
- redis:redisio
- postgresql:postgresql
ports:
- "10080:80"
- "10443:443"
- "2222:22"
environment:
- TZ=America/Mexico_City
- GITLAB_SECRETS_DB_KEY_BASE=4BA
- GITLAB_HOST=domain.com
- GITLAB_PORT=443
- GITLAB_SSH_PORT=2222
- GITLAB_HTTPS=true
https://github.com/indava/gitlab/
runner:
image: gitlab/gitlab-runner:alpine
volumes:
- ./runner:/etc/gitlab-runner
- /var/run/docker.sock:/var/run/docker.sock
restart: always
https://github.com/indava/gitlab/
image: "indava/php:7.3"
stages:
- build
- test
- deploy
services:
- mysql:latest
variables:
DATABASE_URL: "mysql://root:toor@127.0.0.1:3306/ci"
MYSQL_DATABASE: "ci"
MYSQL_ROOT_PASSWORD: "toor"
build:
stage: build
script:
- composer install
phpcs:
stage: test
script:
- ./bin/phpunit
jslint:
stage: test
script:
- eslint .
phpunit:
stage: test
script:
- php bin/phpunit