Skip to content

Instantly share code, notes, and snippets.

@atusy
Last active September 20, 2018 07:26
Show Gist options
  • Save atusy/ebc95595151b3dda48812989500887f1 to your computer and use it in GitHub Desktop.
Save atusy/ebc95595151b3dda48812989500887f1 to your computer and use it in GitHub Desktop.
docker-compose.yml for Growi with HackMD integration
version: '3'
services:
app:
build:
context: .
dockerfile: ./Dockerfile
ports:
- 3000:3000 # localhost only by default
links:
- mongo:mongo
- elasticsearch:elasticsearch
depends_on:
- mongo
- elasticsearch
environment:
- MONGO_URI=mongodb://mongo:27017/growi
- ELASTICSEARCH_URI=http://elasticsearch:9200/growi
- PASSWORD_SEED=CHANGEME
- FILE_UPLOAD=local # activate this line if you use local storage of server rather than AWS
- MATHJAX=1 # activate this line if you want to use MathJax
- HACKMD_URI=http://192.168.5.38:3100 # activate this line and specify HackMD server URI which can be accessed from GROWI client browsers
- HACKMD_URI_FOR_SERVER=http://hackmd:3000 # activate this line and specify HackMD server URI which can be accessed from this server container
# - PLANTUML_URI=http:// # activate this line and specify if you use your own PlantUML server rather than public plantuml.com
command: "dockerize
-wait tcp://mongo:27017
-wait tcp://elasticsearch:9200
-timeout 60s
npm run server:prod"
volumes:
- growi_data:/data
restart: always
mongo:
image: mongo:3.4
volumes:
- mongo_configdb:/data/configdb
- mongo_db:/data/db
restart: always
elasticsearch:
image: elasticsearch:5.3-alpine
environment:
- "ES_JAVA_OPTS=-Xms256m -Xmx256m" # increase amount if you have enough memory
command:
- sh
- -c
- "./bin/elasticsearch-plugin list | grep -q analysis-kuromoji || ./bin/elasticsearch-plugin install analysis-kuromoji;
./bin/elasticsearch-plugin list | grep -q analysis-icu || ./bin/elasticsearch-plugin install analysis-icu;
/docker-entrypoint.sh elasticsearch"
volumes:
- es_data:/usr/share/elasticsearch/data
- es_plugins:/usr/share/elasticsearch/plugins
- ./esconfig:/usr/share/elasticsearch/config
restart: always
volumes:
growi_data:
mongo_configdb:
mongo_db:
es_data:
es_plugins:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment