Skip to content

Instantly share code, notes, and snippets.

@Koc
Created May 2, 2018 14:07
Show Gist options
  • Save Koc/a559dada7c0464134db8e9910f661269 to your computer and use it in GitHub Desktop.
Save Koc/a559dada7c0464134db8e9910f661269 to your computer and use it in GitHub Desktop.
satin-docker
version: '3'
services:
satin-web:
image: brouzie/php:7.0
# build:
# context: build/web
# dockerfile: php-7.0/Dockerfile
container_name: satin-web
hostname: satin-web
links:
- satin-mysql
- satin-redis
- satin-elasticsearch
- satin-mailcatcher
external_links:
- satin-old-mysql
networks:
- default
- satinold_default
volumes:
- composer-cache-volume:/home/dev/.composer/cache
- ./mount/var/log/apache2:/var/log/apache2
- ./mount/etc/apache2/sites-enabled:/etc/apache2/sites-enabled
# - ./..:/var/www/html
- web-data-volume:/var/www/html
depends_on:
- satin-mysql
- satin-redis
- satin-elasticsearch
environment:
PASSWORD: 112233
EXPOSE_HOSTS: |-
satin.test
www.satin.test
COMPOSER_AUTH: |-
{
"bitbucket-oauth": {},
"github-oauth": {
"github.com": "${GITHUB_OAUTH_TOKEN}"
},
"gitlab-oauth": {},
"http-basic": {
"repo.magento.com": {
"username": "${MAGENTO_ACCESS_PUBLIC_KEY}",
"password": "${MAGENTO_ACCESS_PRIVATE_KEY}"
}
}
}
satin-elasticsearch:
build: build/elasticsearch
container_name: satin-elasticsearch
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- script.inline=on
- script.indexed=on
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- elasticsearch-data-volume:/usr/share/elasticsearch/data
satin-redis:
image: redis:alpine
container_name: satin-redis
satin-mysql:
image: percona/percona-server:5.7
container_name: satin-mysql
environment:
MYSQL_ROOT_PASSWORD: satin
MYSQL_USER: satin
MYSQL_PASSWORD: satin
MYSQL_DATABASE: satin
volumes:
- mysql-data-volume:/var/lib/mysql
- ./mount/var/log/mysql:/var/log/mysql
# bind mount my local my.cnf
# - $PWD/my.cnf:/etc/my.cnf
command:
# Workaround for no my.cnf in image
- '--innodb-file-per-table --innodb-strict-mode=off --max_allowed_packet=1024M'
# - '--user=mysql --innodb-file-per-table'
satin-mailcatcher:
image: yappabe/mailcatcher
container_name: satin-mailcatcher
environment:
HTTP_PORT: 80
SMTP_PORT: 25
EXPOSE_HOSTS: |-
satin-mailcatcher.test
volumes:
web-data-volume:
mysql-data-volume:
elasticsearch-data-volume:
composer-cache-volume:
external: true
networks:
satinold_default:
external: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment