Skip to content

Instantly share code, notes, and snippets.

@tarto-dev
Created August 27, 2018 15:06
Show Gist options
  • Save tarto-dev/db178f99fb8db2e779865aa51a1e44a7 to your computer and use it in GitHub Desktop.
Save tarto-dev/db178f99fb8db2e779865aa51a1e44a7 to your computer and use it in GitHub Desktop.
#REPLACE my.website.dev with your project url
# Usage : docker-compose run drush <drush command>
drush:
image: drush/drush:7
volumes_from:
- fmsh_dev__application
volumes:
- ../sources:/var/www/drupal
links:
- fmsh_dev__mysql
entrypoint:
- drush
- "--root=/var/www/drupal"
- "--uri=http://my.website.dev"
#REPLACE fmsh_dev with your project-name
fmsh_dev__apache-php5:
volumes:
- ./log:/var/log/apache2
- ./config/virtualhost.conf:/etc/apache2/sites-enabled/000-default.conf
build: apache-php5
container_name: fmsh_dev__apache-php5
# tty: true
restart: always
ports:
- ${APACHE_PORT}:80
volumes_from:
- fmsh_dev__application
links:
- fmsh_dev__mysql
environment:
- VIRTUAL_HOST=${SERVER_NAME}
- SERVER_NAME=${SERVER_NAME}
- SERVER_ADMIN=${SERVER_ADMIN}
- SERVER_ALIAS=${SERVER_ALIAS}
- UPLOAD_SIZE=${UPLOAD_SIZE}
fmsh_dev__mysql:
image: mysql:5.5
container_name: fmsh_dev__mysql
volumes:
- ../db/:/var/lib/mysql
- ./config/my.cnf:/etc/mysql/my.cnf
ports:
- ${MYSQL_PORT}:3306
environment:
MYSQL_ROOT_USERNAME: ${MYSQL_ROOT_USERNAME}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
fmsh_dev__phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: fmsh_dev__phpmyadmin
environment:
- PMA_ARBITRARY=1
- PMA_HOST=fmsh_dev__mysql
restart: always
ports:
- ${PMA_PORT}:80
volumes:
- /sessions
links:
- fmsh_dev__mysql
nginx-proxy:
image: jwilder/nginx-proxy
container_name: nginx-proxy
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./config/nginx.conf:/etc/nginx/nginx.conf:ro
links:
- fmsh_dev__apache-php5
fmsh_dev__application:
image: nimmis/ubuntu
container_name: fmsh_dev__application
volumes:
- ../sources:/var/www/drupal
tty: true
restart: on-failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment