Skip to content

Instantly share code, notes, and snippets.

@mewm
Created August 1, 2017 11:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mewm/8ab56bf7cace67212c67bb23caae8930 to your computer and use it in GitHub Desktop.
Save mewm/8ab56bf7cace67212c67bb23caae8930 to your computer and use it in GitHub Desktop.
docker-compose dev setup
version: '2'
services:
# Application source
app_source:
image: busybox
volumes:
- ./src:/var/www/site
- /var/log/php-fpm
# Web server/proxy
nginx:
image: tattoodo/nginx:dev
links:
- php
ports:
- 8080:80
volumes_from:
- app_source
volumes:
- ./env/files/nginx/dev.nginx.conf:/etc/nginx/nginx.conf
# PHP runtime
php:
tty: true
environment:
# App envs
- APP_DEBUG=True
- APP_ENV=local
- APP_ENVIRONMENT=local
- APP_FALLBACK_LOCALE=en
image: tattoodo/php7:7.1-fpm-dev
links:
- redis
- mariadb
- elasticsearch
volumes:
- ./env/files/php/dev.php.ini:/usr/local/etc/php/conf.d/tattoodo.ini
- ./env/files/php/dev.www.conf:/usr/local/etc/php-fpm.d/wwwtattoodo.conf
volumes_from:
- app_source
# Database
mariadb:
image: mariadb:10.0.22
environment:
MYSQL_ROOT_PASSWORD:
MYSQL_DATABASE: bapi
MYSQL_USER: dbm
MYSQL_PASSWORD:
ports:
- 3300:3306
#volumes:
#- ./init/db:/docker-entrypoint-initdb.d
# Local cache / queue
redis:
image: redis:3.2-alpine
# Elastic search
elasticsearch:
image: tattoodo/elasticsearch5:latest
ports:
- 9212:9200
volumes:
- ./env/files/elasticsearch_dev.yml:/usr/share/elasticsearch/config/elasticsearch.yml
environment:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
kibana:
image: kibana:5.3
ports:
- 5602:5601
links:
- elasticsearch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment