Skip to content

Instantly share code, notes, and snippets.

@sangpt
Last active January 17, 2020 04:06
Show Gist options
  • Save sangpt/4e9387540e3cd5d24d0776d04c4bf287 to your computer and use it in GitHub Desktop.
Save sangpt/4e9387540e3cd5d24d0776d04c4bf287 to your computer and use it in GitHub Desktop.
version: "2"
services:
db:
image: mysql
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --init-connect='SET NAMES UTF8; SET CHARACTER SET utf8mb4;'
ports:
- "3406:3306"
environment:
MYSQL_ROOT_PASSWORD: root
elasticsearch:
image: elasticsearch:1.7.4
#command: cd /usr/share/elasticsearch && bin/plugin install elasticsearch/elasticsearch-mapper-attachments/2.7.1
#command: cd /usr/share/elasticsearch && bin/plugin -install mobz/elasticsearch-head
ports:
- "9300:9200"
redis:
image: redis
ports:
- "6479:6379"
web:
build:
context: .
dockerfile: Dockerfile-web
# command: bundle exec rails s -p 3000 -b "0.0.0.0"
tty: true
volumes:
- .:/xxx
ports:
- "3000:3000"
depends_on:
- db
- redis
- elasticsearch
@sangpt
Copy link
Author

sangpt commented Jan 4, 2018

$ docker-compose build
$ docker-compose up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment