Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Here is my docker-compose.yml for doing local development with Nginx, PHP-FPM, MySQL, Redis, ElasticSearch & Kibana
version: "3"
services:
db:
container_name: db
image: db:latest
environment:
- MYSQL_ROOT_PASSWORD=REDACTED
- APP=db
ports:
- "3306:3306"
volumes:
- /path/to/Repositories/Docker/mysql/data:/var/lib/mysql
redis:
container_name: redis
image: cache:latest
environment:
- APP=redis
ports:
- "6379:6379"
volumes:
- /path/to/Repositories/Docker/redis/data:/data
app:
container_name: app
image: app:latest
environment:
- APP=app
links:
- db
- redis
- es
volumes:
- "/path/to/Projects:${CONTAINER_DIR}:delegated"
external_links:
- web:alpha.tld
- web:bravo.tld
- web:yankee.rxmg
- web:zulu.rxmg
web:
container_name: web
image: web:latest
environment:
- APP=web
links:
- app
ports:
- "80:80"
- "443:443"
volumes:
- "/path/to/Projects:${CONTAINER_DIR}:delegated"
es:
image: es:latest
container_name: es
hostname: es
environment:
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms2g -Xmx2g"
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
ports:
- "9200:9200"
- "9300:9300"
volumes:
- "elasticsearch_data:/usr/share/elasticsearch/data"
kb:
image: kb:latest
container_name: kb
hostname: kb
links:
- es
ports:
- "5601:5601"
volumes:
mysql_data:
driver: local
cache_data:
driver: local
elasticsearch_data:
driver: local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment