Skip to content

Instantly share code, notes, and snippets.

@nkabir
Forked from tomasfejfar/docker-compose.yml
Created June 16, 2022 09:42
Show Gist options
  • Save nkabir/4377a828d016aeadd68e703eef09ed91 to your computer and use it in GitHub Desktop.
Save nkabir/4377a828d016aeadd68e703eef09ed91 to your computer and use it in GitHub Desktop.
Using YAML to reuse parts of existing docker-compose configuration
version: "3"
services:
apache: &apacheConfig
build: .
volumes:
- ./:/var/www/html:cached
- ./docker/php-apache/php.ini:/usr/local/etc/php/php.ini
- ./docker/php-apache/ssl-local:/etc/httpd/ssl
working_dir: /var/www/html
ports:
- "8700:443"
- "8800:80"
links:
- elasticsearch
apache-xdebug:
<<: *apacheConfig
build: docker/xdebug
volumes:
- ./:/var/www/html:cached
- ./docker/php-apache/php.ini:/usr/local/etc/php/php.ini
- ./docker/php-apache/ssl-local:/etc/httpd/ssl
- ./docker/xdebug/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment